Author: gd
Date: 2006-01-06 14:55:26 +0000 (Fri, 06 Jan 2006)
New Revision: 12742

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

Log:
Don't write null sid mappings into the winbindd_cache.tdb.

Guenther

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-01-06 14:15:59 UTC 
(rev 12741)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-01-06 14:55:26 UTC 
(rev 12742)
@@ -989,7 +989,9 @@
        status = domain->backend->name_to_sid(domain, mem_ctx, domain_name, 
name, sid, type);
 
        /* and save it */
-       wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type);
+       if (NT_STATUS_IS_OK(status)) {
+               wcache_save_name_to_sid(domain, status, domain_name, name, sid, 
*type);
+       }
 
        /* We can't save the sid to name mapping as we don't know the
           correct case of the name without looking it up */

Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c      2006-01-06 14:15:59 UTC (rev 
12741)
+++ trunk/source/nsswitch/winbindd_cache.c      2006-01-06 14:55:26 UTC (rev 
12742)
@@ -1204,7 +1204,9 @@
        status = domain->backend->name_to_sid(domain, mem_ctx, domain_name, 
name, sid, type);
 
        /* and save it */
-       wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type);
+       if (NT_STATUS_IS_OK(status)) {
+               wcache_save_name_to_sid(domain, status, domain_name, name, sid, 
*type);
+       }
 
        /* We can't save the sid to name mapping as we don't know the
           correct case of the name without looking it up */

Reply via email to