summaryrefslogtreecommitdiffstats
path: root/source3/winbindd/winbindd_samr.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-04-28 21:07:59 +1200
committerAndrew Bartlett <abartlet@samba.org>2014-06-04 03:22:26 +0200
commit5a71f46f46fc3d4cbc2fe6c06e0d1661ccead488 (patch)
tree1172b2b7d4a9a299c5e3e1d667344bc839031e98 /source3/winbindd/winbindd_samr.c
parent902f14c084a53e5e0b36ed9b214251c8b78b19f3 (diff)
downloadsamba-5a71f46f46fc3d4cbc2fe6c06e0d1661ccead488.tar.gz
samba-5a71f46f46fc3d4cbc2fe6c06e0d1661ccead488.tar.xz
samba-5a71f46f46fc3d4cbc2fe6c06e0d1661ccead488.zip
winbindd: Use rpc_pipe_open_interface() so that winbindd uses the correct rpc servers
This means that in the AD DC, we use the AD DC servers, while in the classic DC or file server we continue to use the built-in SAMR and LSA servers. Andrew Bartlett Change-Id: I63b1443f5665016f7fcbed35907ec29d4424ab18 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/winbindd/winbindd_samr.c')
-rw-r--r--source3/winbindd/winbindd_samr.c43
1 files changed, 31 insertions, 12 deletions
diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c
index 78843d62a4..8a71700808 100644
--- a/source3/winbindd/winbindd_samr.c
+++ b/source3/winbindd/winbindd_samr.c
@@ -54,12 +54,22 @@ static NTSTATUS open_internal_samr_pipe(TALLOC_CTX *mem_ctx,
}
/* create a samr connection */
- status = rpc_pipe_open_internal(mem_ctx,
- &ndr_table_samr.syntax_id,
- session_info,
- NULL,
- winbind_messaging_context(),
- &cli);
+ if (lp_parm_bool(-1, "winbindd", "use external pipes", false)) {
+ status = rpc_pipe_open_interface(mem_ctx,
+ &ndr_table_samr,
+ session_info,
+ NULL,
+ winbind_messaging_context(),
+ &cli);
+ } else {
+ status = rpc_pipe_open_internal(mem_ctx,
+ &ndr_table_samr.syntax_id,
+ session_info,
+ NULL,
+ winbind_messaging_context(),
+ &cli);
+ }
+
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("open_samr_pipe: Could not connect to samr_pipe: %s\n",
nt_errstr(status)));
@@ -129,12 +139,21 @@ static NTSTATUS open_internal_lsa_pipe(TALLOC_CTX *mem_ctx,
}
/* create a lsa connection */
- status = rpc_pipe_open_internal(mem_ctx,
- &ndr_table_lsarpc.syntax_id,
- session_info,
- NULL,
- winbind_messaging_context(),
- &cli);
+ if (lp_parm_bool(-1, "winbindd", "use external pipes", false)) {
+ status = rpc_pipe_open_interface(mem_ctx,
+ &ndr_table_lsarpc,
+ session_info,
+ NULL,
+ winbind_messaging_context(),
+ &cli);
+ } else {
+ status = rpc_pipe_open_internal(mem_ctx,
+ &ndr_table_lsarpc.syntax_id,
+ session_info,
+ NULL,
+ winbind_messaging_context(),
+ &cli);
+ }
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("open_lsa_pipe: Could not connect to lsa_pipe: %s\n",
nt_errstr(status)));