This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can not make port forwarding from Cygwin when ControlMaster/ControlPath used.

On Feb 13 19:50, Charles Wilson wrote:
> On 2/13/2012 9:00 AM, Corinna Vinschen wrote:
> > Btw., connection sharing doesn't work on Cygwin.  For this to work we
> > need descriptor passing over AF_LOCAL sockets, which isn't implemented
> > in Cygwin.
> Yes, please!  (I know, I know, SHTDI).
> See Corinna's and cgf's comments downthread.

...and in contrast to what Dave replied even the DuplicateHandle part is
not trivial.  It requires one of the processes to have PROCESS_DUP_HANDLE
rights for the other process.  But since you're connected over a socket,
you don't know the process ID of your peer(*).  And then, either one of
the processes is an admin process, or both processes belong to the same
user account, or one of the processes must know the SID of the peer
process and open up its process for PROCESS_DUP_HANDLE access to that
user account.


(*) getpeereid only works for the listening/connecting processes, not for
    forked child processes thereof.

> --
> Chuck
> --
> Problem reports:
> FAQ:         
> Documentation:
> Unsubscribe info:

Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]