svn commit: samba r13309 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

vlendec at samba.org vlendec at samba.org
Fri Feb 3 19:24:52 GMT 2006


Author: vlendec
Date: 2006-02-03 19:24:52 +0000 (Fri, 03 Feb 2006)
New Revision: 13309

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

Log:
If the sid in the winbind name2sid cache is not valid (NT_STATUS_NONE_MAPPED),
we have S-0-0 as a SID in the cache. This leads to ugly level 0 messages from
string_to_sid. Avoid them.

Volker

Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
   trunk/source/nsswitch/winbindd_cache.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-02-03 18:45:48 UTC (rev 13308)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-02-03 19:24:52 UTC (rev 13309)
@@ -960,8 +960,10 @@
 	if (!centry)
 		goto do_query;
 	*type = (enum SID_NAME_USE)centry_uint32(centry);
-	centry_sid(centry, sid);
 	status = centry->status;
+	if (NT_STATUS_IS_OK(status)) {
+		centry_sid(centry, sid);
+	}
 
 	DEBUG(10,("name_to_sid: [Cached] - cached name for domain %s status %s\n",
 		domain->name, get_friendly_nt_error_msg(status) ));

Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c	2006-02-03 18:45:48 UTC (rev 13308)
+++ trunk/source/nsswitch/winbindd_cache.c	2006-02-03 19:24:52 UTC (rev 13309)
@@ -1176,8 +1176,10 @@
 	if (!centry)
 		goto do_query;
 	*type = (enum SID_NAME_USE)centry_uint32(centry);
-	centry_sid(centry, sid);
 	status = centry->status;
+	if (NT_STATUS_IS_OK(status)) {
+		centry_sid(centry, sid);
+	}
 
 	DEBUG(10,("name_to_sid: [Cached] - cached name for domain %s status %s\n",
 		domain->name, get_friendly_nt_error_msg(status) ));



More information about the samba-cvs mailing list