summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@sernet.de>2009-09-24 21:35:38 +0200
committerStefan Metzmacher <metze@samba.org>2009-09-25 08:18:45 +0200
commitbfd3a6f13aa935950142a24bf331feb98f987bde (patch)
tree7a4d63dcc644730accc71042bae13fafa7c5735e /source3/winbindd
parent36e889f2cf5497717bdffede0c2f82e7fee79275 (diff)
downloadsamba-bfd3a6f13aa935950142a24bf331feb98f987bde.tar.gz
samba-bfd3a6f13aa935950142a24bf331feb98f987bde.tar.bz2
samba-bfd3a6f13aa935950142a24bf331feb98f987bde.zip
s3:winbindd_cm: don't invalidate the whole connection when just samr gave ACCCESS_DENIED
metze
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cm.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 05df19fd0c..9a788397a9 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -2165,7 +2165,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;
}