[SCM] Socket Wrapper Repository - branch master updated

Stefan (metze) Metzmacher metze at samba.org
Mon Jan 27 18:54:59 MST 2014


Hi Andreas,

> Changeset truncated at 500 lines:
> 
> diff --git a/TODO b/TODO
> index f4b8a12..2ce46ff 100644
> --- a/TODO
> +++ b/TODO
> @@ -1,3 +1,19 @@
> -* Add recvmsg() with support for IP_PKTINFO
> -* We might need serialization so we don't call wrapper symbols recursively.
> -* Add logging for debug.
> +TODO
> +=====
> +
> +Library:
> +---------

I think we also need some mutexes to protect the global linked list
and some thread tests.

> +* Add IP_PKTINFO support for sendmsg/recvmsg.
> +* Add support for fd passing in sendmsg/recvmsg.
> +  Scenario:
> +  We accept a connection from a client and need to pass the fd to another
> +  child we forked. socket_wrapper then needs to send the 'struct socket_info'
> +  to the child first and set it up there.

I think it would be better to handle it like accept()
and use getpeername() and getsockname() on the received fd
and construct the inet socket_info by converting the magic
unix domain socket path.

Then we look for an existing struct socket_info, if we find a match,
we just add a new struct socket_info_fd, otherwise we add a new socket_info
and socket_info_fd.

This was we only need to modify swrap_recvmsg() (or some subfunction of it)

metze


More information about the samba-technical mailing list