svn commit: samba r22717 - in branches: SAMBA_3_0/source/nsswitch	SAMBA_3_0_26/source/nsswitch Author: jerry Date: 2007-05-06 21:17:02 +0000 (Sun, 06 May 2007) New Revision: 22717 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22717 Log: Add Everyone and AuthenticatedUsers to the user's token for use by the require-membership-of pam_winbind option. Modified:    branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c    branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c	2007-05-06 21:15:45 UTC (rev 22716) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c	2007-05-06 21:17:02 UTC (rev 22717) @@ -128,7 +128,11 @@  	DOM_SID *require_membership_of_sid;  	size_t num_require_membership_of_sid;  	DOM_SID *all_sids; -	size_t num_all_sids = (2 + info3->num_groups2 + info3->num_other_sids); +	/* UserSID, GroupSID, Grooup2SIDs, OtherSIDs, WellKnownSIDs */ +	size_t num_all_sids = (2 +  +			       info3->num_groups2 +  +			       info3->num_other_sids +  +			       2 );  	size_t i, j = 0, k;  	size_t group_sid_length;  	const char *search_location; @@ -213,6 +217,11 @@  	}  	j++;	   +	/* Well-Known SIDs */ + +	sid_copy( &all_sids[j++], &global_sid_World ); +	sid_copy( &all_sids[j++], &global_sid_Authenticated_Users ); +	  	for (i = 0; i < info3->num_groups2; i++) {  	  		sid_copy(&all_sids[j], &(info3->dom_sid.sid)); Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c =================================================================== --- branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c	2007-05-06 21:15:45 UTC (rev 22716) +++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_pam.c	2007-05-06 21:17:02 UTC (rev 22717) @@ -128,7 +128,11 @@  	DOM_SID *require_membership_of_sid;  	size_t num_require_membership_of_sid;  	DOM_SID *all_sids; -	size_t num_all_sids = (2 + info3->num_groups2 + info3->num_other_sids); +	/* UserSID, GroupSID, Grooup2SIDs, OtherSIDs, WellKnownSIDs */ +	size_t num_all_sids = (2 +  +			       info3->num_groups2 +  +			       info3->num_other_sids +  +			       2 );  	size_t i, j = 0, k;  	size_t group_sid_length;  	const char *search_location; @@ -213,6 +217,11 @@  	}  	j++;	   +	/* Well-Known SIDs */ + +	sid_copy( &all_sids[j++], &global_sid_World ); +	sid_copy( &all_sids[j++], &global_sid_Authenticated_Users ); +	  	for (i = 0; i < info3->num_groups2; i++) {  	  		sid_copy(&all_sids[j], &(info3->dom_sid.sid));