[PATCH] correct winbindd alias type

Jerome Borsboom j.borsboom at erasmusmc.nl
Wed May 26 13:13:22 GMT 2004


In winbind_passdb.c the functions sid_to_name and name_to_sid do 
not set the type of alias correctly for builtin sid types. The 
patch below corrects this.

Greetz,
Jerome Borsboom

--- samba-3.0.4/source/nsswitch/winbindd_passdb.c	2004-04-20 22:42:55.000000000 +0200
+++ samba-3.0.4.new/source/nsswitch/winbindd_passdb.c	2004-05-26 15:07:27.305245066 +0200
@@ -240,7 +240,10 @@
 	if (!pdb_find_alias(name, sid))
 		return NT_STATUS_NONE_MAPPED;
 
-	*type = SID_NAME_ALIAS;
+	if (sid_check_is_in_builtin(sid))
+		*type = SID_NAME_WKN_GRP;
+	else
+		*type = SID_NAME_ALIAS;
 	return NT_STATUS_OK;
 }
 
@@ -263,8 +266,11 @@
 
 	*domain_name = talloc_strdup(mem_ctx, domain->name);
 	*name = talloc_strdup(mem_ctx, info.acct_name);
-	*type = SID_NAME_ALIAS;
-
+	if (sid_check_is_in_builtin(sid))
+		*type = SID_NAME_WKN_GRP;
+	else
+		*type = SID_NAME_ALIAS;
+	
 	return NT_STATUS_OK;
 }
 

-- 
Ir. Jerome Borsboom
Erasmus MC
Room Ee2302
P.O. Box 1738
3000 DR Rotterdam
The Netherlands
Tel: +31 10 4087474
Fax: + 31 10 4089445




More information about the samba-technical mailing list