This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix nscd lookup for innetgr when netgroup has wildcards (BZ #16758)


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

On 03/26/2014 05:54 PM, Carlos O'Donell wrote:
> On 03/26/2014 05:48 AM, Siddhesh Poyarekar wrote:
>> nscd works correctly when the request in innetgr is a wildcard,
>> i.e. when one or more of host, user or domain parameters is NULL.
>> However, it does not work when the the triplet in the netgroup
>> definition has a wildcard.  This is easy to reproduce for a triplet
>> defined as follows:
> 
>>     foonet (,foo,)
> 
>> Here, an innetgr call that looks like this:
> 
>>     innetgr ("foonet", "foohost", "foo", NULL);
> 
>> should succeed and so should:
> 
>>     innetgr ("foonet", NULL, "foo", "foodomain");
> 
>> It does succeed with nscd disabled, but not with nscd enabled.  This
>> fix adds this additional check for all three parts of the triplet so
>> that it gives the correct result.
> 
>> Tested on x86_64.
> 
>> Siddhesh
> 
>> 	[BZ #16758]
>> 	* nscd/netgroupcache.c (addinnetgrX): Succeed if triplet has
>> 	blank values.
> 
> OK to checkin as long as for the sake of completeness tested the
> other two missing combinations of NULLs in calls to innetgr with
> and without nscd and it worked.

You would also make me very happy to see the testing permutations
include permuting the triplet in /etc/netgroups so the null moves
to all possible spaces and is tested that way to flush out any
other corner cases.

Cheers,
Carlos.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTM02xAAoJECXvCkNsKkr/K9YIAMLIbEERF/rE4qJ+ysKd0fbB
1VYtwX5br4ckD+vMCS/PCmq3oRvmhexELrYyyYAG8XD6NP9/M9pAXi5g5zB3vkj/
cBM2BXGu78aUUXBGjWu/Sutj+CCnoR17wsgnRX2DPLuuXiMTdADwJtvCJTu6ZeKn
LQLiFuojtbw6AoAwFPFyM6/PHgu97jjLLKLqV/nH1AdFESMQkQEgee39Rr/Qpdhi
Jov18z3LnkLqAD1PX2zSGSifkdJTm2K41Ka86NLmhqUqzHBkVPcsX1lJFT8qJQbw
S0o0WtICv1yt96fLx2wjZbdw3q2PAjyj0SZ1p6MORTI+xVEwDgnQO41b9viur+4=
=/6Rw
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]