The Wrapper Project

Andreas Schneider asn at samba.org
Tue Aug 13 07:55:46 MDT 2013


On Tuesday 09 July 2013 16:35:10 Andreas Schneider wrote:
> Hello samba-technical,
> 
> in the Samba project we have some wrapper we link against each executable
> and library to be able to run 'make test'. As you might know I've been
> working to get uid_wrapper [1], nss_wrapper [2] and socket_wrapper [3]
> working as libraries you can load into any application using LD_PRELOAD
> (man ld.so). If you can preload one of these libraries you can use it with
> whatever project you want and you can create tests with optimized binaries.
> 
> To get it working I needed to improve the wrappers and also add new
> important features. The biggest feature in nss_wrapper is that it provides
> name resolution using its own hosts file now. So you can call getaddrinfo()
> to resolve hosts in socket_wrapper. socket_wrapper got a destructor to
> cleanup UDP socket files. uid_wrapper still needs work, to make sure that
> it is thread safe.

I just wanted to give an update.

nss_wrapper supports new functions in the meantime:

getnameinfo()
gethostname() (can be set with a env variable)
gethostbyaddr_r()
gethostbyname_r()

I've correctly implemented uid changing which also has support for threading 
in uid_wrapper. I haven't written any threading tests yet but it should work. 

You can find the changes in my working tree:

http://git.cryptomilk.org/users/asn/uid_wrapper.git/log/?h=thread



	-- andreas

-- 
Andreas Schneider                   GPG-ID: F33E3FC6
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list