Subject: Re: Question about netns & AF_UNIX

From: Daniel Lezcano <[email-masked]>
Date: Thu, 27 May 2010 22:16:28 +0200

On 05/27/2010 04:38 PM, Martín Ferrari wrote:
> Hi, again a question about netns...
>
> I seem to recall being able to use AF_UNIX sockets across network name
> spaces, but I cannot reproduce that with a current kernel. Probably my
> test was fubar (I've lost the script).
>    

No, that was never the case. Maybe you tested with a patched kernel 
allowing to cross-namespace connect.
> In any case: is a design decision to forbid this, even when the file
> system is shared? I found some discussions from 2008, but I don't see
> an agreement being reached...
>    

There was a discussion about that but with a simple hack removing the 
test against the namespace when connecting.
The problem is nobody investigated that against credentials in ancillary 
messages, or other particularity of the af_unix socket vs the namespaces.

> I also wonder if filedescriptor passing thru ancilliary messages will
> work (that is, with unix sockets that I've created before the netns
> change).
>    

Yes.

Thanks
   -- Daniel