[REVIEW REQUEST] recvmsg in socket_wrapper

Stefan (metze) Metzmacher metze at samba.org
Tue Jan 21 00:20:58 MST 2014

Am 20.01.2014 23:04, schrieb Andreas Schneider:
> On Monday 20 January 2014 21:10:48 Stefan  Metzmacher wrote:
>> Hi Andreas,
>>>>> http://git.cryptomilk.org/projects/socket_wrapper.git/log/?h=recvmsg
>>>> Thanks! It's nice to see that my work is finally finished:-)
>>>> However I don't see were you transfer the 'struct socket_info'
>>>> transparently while doing fd-passing. Otherwise it's not possible to
>>>> pass socket fds across to another process.
>>> Well, the fd-passing is handled in the kernel. I can't fake the kernel
>>> internals here :) That's why you can only pass fds on the local system
>>> over
>>> unix sockets.
>> We need be able to test fd-passing of AF_INET/AF_INET6 sockets
>> from one process to another process on the same system, while
>> passing it over a AF_UNIX socket between the two processes.
>> and getpeername() and getsockname() need to return the same
>> in both processes.
> http://git.cryptomilk.org/projects/socket_wrapper.git/commit/?h=recvmsg_fdpass
> Here is a start, I'm not sure if this is the nicest way and if it will work 
> ...

Yes, I thought about something like that. But maybe we could also handle it
like accept and construct the AF_INET info from the unix path, but I'm
not sure
if we can reconstruct both addresses.


More information about the samba-technical mailing list