Re: Pass a fd to program in another mount namespace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2014-01-21 at 17:07 -0600, Serge Hallyn wrote:
> Quoting Rob van der Hoeven (robvanderhoeven@xxxxxxxx):
> > Hi,
> > 
> > I was wondering if it is possible to send a file descriptor to a program
> > running in another mount namespace. Sendmsg/recvmsg can pass fd's in the
> > ancillary data and this works great until my program switches to another
> > mount namespace using:
> > 
> > unshare(CLONE_NEWNS)
> > pivot_root(".", "./us_rootfs")
> > 
> > If there is a way to pass descriptors across mount namespaces then it
> > would greatly benefit my program so I hope this is possible. 
> 
> Yes, it is possible.  Your email makes it sound like you've tried
> and it didn't work for you, in which case a short test case showing
> what fails might be useful here.
> 
> -serge

Hi Serge,

Problem solved. It turned out that I had not properly initialized the
ancillary header. Because the problem only showed itself after switching
to another mount namespace I wrongly assumed that this had something to
do with the error. Very happy that this works now.

Your answer made me investigate this further, thanks!
Rob van der Hoeven.
http://freedomboxblog.nl


_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/containers




[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux