r14076: When the backends trusted_domains call comes back with no trusts the
authorGünther Deschner <gd@samba.org>
Thu, 9 Mar 2006 16:08:15 +0000 (16:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:11:10 +0000 (11:11 -0500)
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
(This used to be commit 200d4566619c58951e22d9543420407b3baf878f)

source3/nsswitch/winbindd_cache.c

index 8e694ed85061c2358d9305d54f6382f877a46338..c99888be3e5033ba82c30539eb86ed8f17b09542 100644 (file)
@@ -1672,7 +1672,15 @@ do_query:
  
        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);