[PATCH] NSS Wrapper 04

Stefan (metze) Metzmacher metze at samba.org
Tue Oct 30 06:34:38 GMT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Bartlett schrieb:
> On Fri, 2007-10-19 at 11:34 +0200, Stefan (metze) Metzmacher wrote:
>> Hi,
>>
>> here's a patchset that implements NSS Wrapper
>> simular to Socket Wrapper.
>>
>> This also removes the build-farm specific faked users hack.
>>
>> It works like this:
>> - the envvars NSS_WRAPPER_PASSWD and NSS_WRAPPER_GROUP
>>   should hold the path of files formated like /etc/passwd
>>   and /etc/group. The behavior is simluar to the nss_files
>>   backend, but the initgroups() call always returns EPERM.
>> - with the nss_wrapper.pl script it's possible to add or delete
>>   entries (currently only users).
>>
>> This can be extended in future as needed, but it's much better
>> then the build-farm specific hack, and it makes it possible to
>> start winbindd in make test, as the objects are created persistent
>> and not in memory of one specific process.
>>
>> Comments are welcome:-)
> 
> While the GIT format is great for showing how you constructed the patch,
> it's also rather hard to read for 'what is the end result'.  That said
> code looks pretty good, as I would expect, and it is nice to get rid of
> the build farm hacks.
> 
> My one comment is about nwrap_getgrgid_r().  Is it really safe/correct
> to have it calling nwrap_getgrgid() internally?  Shouldn't that be the
> other way around?

As this code isn't thread safe by design (as the socket_wrapper code)
this is no problem.

metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHJtB9m70gjA5TCD8RAgpdAJ9xjvL9/wn37zf1RyXeAeVDwJcNCwCgn2B/
u9+ehBEAiOw/iz7xTOVzF4s=
=1YGm
-----END PGP SIGNATURE-----


More information about the samba-technical mailing list