Andreas Schneider asn at
Mon Jan 27 10:48:55 MST 2014

On Sunday 26 January 2014 11:15:58 you wrote:
> Hi Andreas,

Hi Stefan,

> 2b687986482f4797c1 Using just '' works for the system
> provided version?
> If so you can add this in lib/uid_wrapper/wscript
> ...
>   if conf.CHECK_BUNDLED_SYSTEM('uid_wrapper', minversion=VERSION,
> set_target=False):
>       libuid_wrapper_so_path = ''
>   else:
>       libuid_wrapper_so_path = 'bin/shared/private/'
>   conf.DEFINE('LIBUID_WRAPPER_SO_PATH', libuid_wrapper_so_path)
> ...

I've added that now. Compiling a working uid_wrapper wasn't easy.

> Do we still nee conf.DEFINE('UID_WRAPPER', 1) ?

selftest/wscript has:

    if (not CONFIG_SET(opt, 'NSS_WRAPPER') or
        not CONFIG_SET(opt, 'UID_WRAPPER') or
        not CONFIG_SET(opt, 'SOCKET_WRAPPER')):
        print("ERROR: You must use --enable-selftest to enable selftest")

I wanted to still print the error if something went wrong.

> In selftest/wscript we need something like:
> And then use $ENV{LIBUID_WRAPPER_SO_PATH} in selftest/

I've passed it using --uid_wrapper_so_path to selftest now.;a=shortlog;h=refs/heads/cwrap

> So Samba will pick up the system version of if the
> version is
> >= the internal version, otherwise we'll use our own one, correct?
> So we can rely on having the features of our own copy, correct?

Yes, it checks for the version using pkg-config. If the right version is not 
detected it will build the internal version.

As a developer you should use the system version. It is the only way you can 
be sure that socket_wrapper doesn't have bugs while bisecting with git!

> Can we get the fd-passing with inet/inet6 sockets implemented for 1.0.0?

No, I will not get this working in time. The release is Feb 2nd and we found 
some issues we want to fix correctly. We need to cleanup stale fds. It is 
possible that glibc closes sockets internally and then the fd is reused when 
we open a normal file.

The solution is to have a swrap_discard() which is called by open().

> I guess we need to handle it in recvmsg() similar to accept(),
> we just need to check is it's already in our list, if so we just add
> the additional fd to the entry.

First we need a test!

	-- andreas

Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at

More information about the samba-technical mailing list