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

gd at samba.org gd at samba.org
Thu Mar 9 16:08:16 GMT 2006


Author: gd
Date: 2006-03-09 16:08:15 +0000 (Thu, 09 Mar 2006)
New Revision: 14076

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

Log:
When the backends trusted_domains call comes back with no trusts the
NTSTATUS code will be NT_STATUS_NO_MORE_ENTRIES. In that case store
NT_STATUS_OK in the centry so that the entry does not automatically
deleted upon startup or invalidated upon next query.

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-03-09 15:51:55 UTC (rev 14075)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c	2006-03-09 16:08:15 UTC (rev 14076)
@@ -1672,7 +1672,15 @@
  
 	status = domain->backend->trusted_domains(domain, mem_ctx, num_domains,
 						names, alt_names, dom_sids);
- 
+
+	/* no trusts gives NT_STATUS_NO_MORE_ENTRIES resetting to NT_STATUS_OK
+	 * so that the generic centry handling still applies correctly -
+	 * Guenther*/
+
+	if (!NT_STATUS_IS_ERR(status)) {
+		status = NT_STATUS_OK;
+	}
+
 	/* and save it */
 	refresh_sequence_number(domain, False);
  

Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c	2006-03-09 15:51:55 UTC (rev 14075)
+++ trunk/source/nsswitch/winbindd_cache.c	2006-03-09 16:08:15 UTC (rev 14076)
@@ -1672,7 +1672,15 @@
  
 	status = domain->backend->trusted_domains(domain, mem_ctx, num_domains,
 						names, alt_names, dom_sids);
- 
+
+	/* no trusts gives NT_STATUS_NO_MORE_ENTRIES resetting to NT_STATUS_OK
+	 * so that the generic centry handling still applies correctly -
+	 * Guenther*/
+
+	if (!NT_STATUS_IS_ERR(status)) {
+		status = NT_STATUS_OK;
+	}
+
 	/* and save it */
 	refresh_sequence_number(domain, False);
  



More information about the samba-cvs mailing list