summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@sernet.de>2009-09-24 21:35:38 +0200
committerKarolin Seeger <kseeger@samba.org>2009-10-08 14:50:04 +0200
commit3e2c96390a8840f4c6fcface8e3dfb161c53be21 (patch)
treebc85d8984496865b1eb730f86719164dc80844df
parent680d49b79e3f9a3831d08b9c981ea0c8518abaf6 (diff)
downloadsamba-3e2c96390a8840f4c6fcface8e3dfb161c53be21.tar.gz
s3:winbindd_cm: don't invalidate the whole connection when just samr gave ACCCESS_DENIED
metze (cherry picked from commit c6d485583aba69b38b2972224e27edb60c3bf09a)
-rw-r--r--source/winbindd/winbindd_cm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index bf8490edda3..bd502a5ece0 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -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;
}