diff options
author | Günther Deschner <gd@samba.org> | 2013-08-12 17:23:12 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2013-08-20 10:58:55 +0200 |
commit | 3487e4905771225e493f12acd0e2964ad0a75c74 (patch) | |
tree | 4363e4447dcce257c4148eaeb08ff532783f0241 | |
parent | 7accc37e58b7720370cd60740a20962020462edd (diff) | |
download | samba-3487e4905771225e493f12acd0e2964ad0a75c74.tar.gz |
s3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().
Fallback to lsa named-pipe connection when tcp connection has failed twice (it
could be a trusted domain connection where we cannot setup a secure channel).
Guenther
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9615
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9899
Signed-off-by: Günther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Tested-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 13 20:55:33 CEST 2013 on sn-devel-104
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c index 275005c5e1..185aa4fd61 100644 --- a/source3/winbindd/winbindd_cm.c +++ b/source3/winbindd/winbindd_cm.c @@ -2651,11 +2651,16 @@ NTSTATUS cm_connect_lsat(struct winbindd_domain *domain, invalidate_cm_connection(&domain->conn); status = cm_connect_lsa_tcp(domain, mem_ctx, cli); } - if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_IS_OK(status)) { return status; } - return NT_STATUS_OK; + /* + * we tried twice to connect via ncan_ip_tcp and schannel and + * failed - maybe it is a trusted domain we can't connect to ? + * do not try tcp next time - gd + */ + domain->can_do_ncacn_ip_tcp = false; } status = cm_connect_lsa(domain, mem_ctx, cli, lsa_policy); |