AF_UNIX status report
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Nov 18 08:34:47 GMT 2020
On Nov 17 14:57, Ken Brown via Cygwin-developers wrote:
> On 11/9/2020 4:08 AM, Corinna Vinschen wrote:
> > The duplicated handle has to be closed at one point but otherwise
> > the approach makes sense.
>
> After wasting a ridiculous amount of time because of careless mistakes with
> handle duplication, I've finally gotten something working (currently for
> disk files only and with some limitations that have to removed). I've
> pushed it to the topic/af_unix branch in case you want to review it and/or
> test it.
This is soooo fantastic! Apart from files, the nexst most interesting
case is sharing a socket, probably. We could activcate the 2nd half of
privilege separation in sshd then.
> If you do test it, the main limitation currently is that the sending process
> can't exit until the receiving process has received and processed the
> SCM_RIGHTS data.
While this is strictly a flaw, that may not be much of a limitation.
It would be interesting to know how many applications send descriptors
just to exit immediately. Not so many, probably.
> I'll keep working on improving this and removing limitations, but at least
> I'm confident now that the basic idea of sending serialized fhandlers works.
> Thanks for suggesting that. I wouldn't have known where to start otherwise.
Thanks for working on this stuff!
Corinna
More information about the Cygwin-developers
mailing list