]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbindd_cm: don't invalidate the whole connection when just samr gave ACCCESS_DENIED
authorStefan Metzmacher <metze@sernet.de>
Thu, 24 Sep 2009 19:35:38 +0000 (21:35 +0200)
committerKarolin Seeger <kseeger@samba.org>
Thu, 8 Oct 2009 07:34:49 +0000 (09:34 +0200)
metze

source/winbindd/winbindd_cm.c

index bf8490edda3ab4f5b1906dbc5389cf138d9df78a..bd502a5ece0b92e97fe5386c4badf153ef4fed65 100644 (file)
@@ -2148,7 +2148,18 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
 
  done:
 
-       if (!NT_STATUS_IS_OK(result)) {
+       if (NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED)) {
+               /*
+                * if we got access denied, we might just have no access rights
+                * to talk to the remote samr server server (e.g. when we are a
+                * PDC and we are connecting a w2k8 pdc via an interdomain
+                * trust). In that case do not invalidate the whole connection
+                * stack
+                */
+               TALLOC_FREE(conn->samr_pipe);
+               ZERO_STRUCT(conn->sam_domain_handle);
+               return result;
+       } else if (!NT_STATUS_IS_OK(result)) {
                invalidate_cm_connection(conn);
                return result;
        }