svn commit: samba r2566 - in branches/SAMBA_3_0/source/nsswitch: .

vlendec at samba.org vlendec at samba.org
Thu Sep 23 15:21:02 GMT 2004


Author: vlendec
Date: 2004-09-23 15:21:02 +0000 (Thu, 23 Sep 2004)
New Revision: 2566

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_3_0/source/nsswitch&rev=2566&nolog=1

Log:
Fix creation of aliases via usrmgr. Winbind was too strict checking the type
of sids.

Volker

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_sid.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_sid.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_sid.c	2004-09-23 12:21:10 UTC (rev 2565)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_sid.c	2004-09-23 15:21:02 UTC (rev 2566)
@@ -316,8 +316,16 @@
 		fstring dom_name, name;
 		enum SID_NAME_USE type;
 
-		if (!winbindd_lookup_name_by_sid(&sid, dom_name, name, &type))
-			return WINBINDD_ERROR;
+		if (sid_check_is_in_our_domain(&sid)) {
+			/* This is for half-created aliases... */
+			type = SID_NAME_ALIAS;
+		} else {
+			/* Foreign domains need to be looked up by the DC if
+			 * it's the right type */
+			if (!winbindd_lookup_name_by_sid(&sid, dom_name, name,
+							 &type))
+				return WINBINDD_ERROR;
+		}
 
 		if ((type != SID_NAME_DOM_GRP) && (type != SID_NAME_ALIAS) &&
 		    (type != SID_NAME_WKN_GRP))



More information about the samba-cvs mailing list