svn commit: samba r23244 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/nsswitch SAMBA_3_0/source/passdb SAMBA_3_0_26/source/include SAMBA_3_0_26/source/nsswitch SAMBA_3_0_26/source/passdb

jerry at samba.org jerry at samba.org
Wed May 30 19:47:37 GMT 2007


Author: jerry
Date: 2007-05-30 19:47:35 +0000 (Wed, 30 May 2007)
New Revision: 23244

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23244

Log:
Fix loop with nscd and NSS recusive calls.

> Here's the problem I hit:
>
> getgrnam("foo") -> nscd -> NSS -> winbindd ->
>   winbindd_passdb.c:nam_to_sid() -> lookup_global_sam_name() ->
>   getgrnam("foo") -> nscd -> ....
>
> This is in the SAMBA_3_0 specifically but in theory could happen
> SAMBA_3_0_25 (or 26) for an unknown group.
>
> The attached patch passes down enough state for the
> name_to_sid() call to be able to determine the originating
> winbindd cmd that came into the parent.  So we can avoid
> making more NSS calls if the original call came in trough NSS
> so we don't deadlock ?  But you should still service
> lookupname() calls which are needed for example when
> doing the token access checks for a "valid groups" from
> smb.conf.
>
> I've got this in testing now.  The problem has shown up with the
> DsProvider on OS X and with nscd on SOlaris and Linux.


Modified:
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/nsswitch/winbindd.h
   branches/SAMBA_3_0/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_group.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_nss.h
   branches/SAMBA_3_0/source/nsswitch/winbindd_passdb.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_reconnect.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_sid.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_user.c
   branches/SAMBA_3_0/source/nsswitch/winbindd_util.c
   branches/SAMBA_3_0/source/passdb/lookup_sid.c
   branches/SAMBA_3_0_26/source/include/smb.h
   branches/SAMBA_3_0_26/source/nsswitch/winbindd.h
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_async.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_cache.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_group.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_nss.h
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_passdb.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_reconnect.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_rpc.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_sid.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_user.c
   branches/SAMBA_3_0_26/source/nsswitch/winbindd_util.c
   branches/SAMBA_3_0_26/source/passdb/lookup_sid.c


Changeset:
Sorry, the patch is too large (639 lines) to include; please use WebSVN to see it!
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23244


More information about the samba-cvs mailing list