delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/14/03:54:02

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Tue, 14 Feb 2012 09:53:18 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Can not make port forwarding from Cygwin when ControlMaster/ControlPath used.
Message-ID: <20120214085318.GB20357@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <84r4xzw0q8 DOT fsf AT bifit DOT com DOT ua> <20120213135313 DOT GB32512 AT calimero DOT vinschen DOT de> <20120213140027 DOT GC32512 AT calimero DOT vinschen DOT de> <4F39AFD8 DOT 5080503 AT cwilson DOT fastmail DOT fm>
MIME-Version: 1.0
In-Reply-To: <4F39AFD8.5080503@cwilson.fastmail.fm>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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).
>    http://cygwin.com/ml/cygwin/2009-10/msg00397.html
> 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.


Corinna


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


> 
> --
> Chuck
> 
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019