summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_pipe.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2011-10-12 22:55:34 +1100
committerAndrew Bartlett <abartlet@samba.org>2011-10-13 14:06:07 +0200
commit5603dab6478fbb40206a8664a308b5db5b1863e8 (patch)
tree865595e3efb120830d8d7c52e5da786bbf554d99 /source3/rpc_server/srv_pipe.c
parent43d84aa619be5851acea82bef77164f0dc3e9f7e (diff)
downloadsamba-5603dab6478fbb40206a8664a308b5db5b1863e8.tar.gz
samba-5603dab6478fbb40206a8664a308b5db5b1863e8.tar.bz2
samba-5603dab6478fbb40206a8664a308b5db5b1863e8.zip
libcli/auth: Provide a struct loadparm_context to schannel calls
This will allow us to pass this down to the tdb_wrap layer. Andrew Bartlett
Diffstat (limited to 'source3/rpc_server/srv_pipe.c')
-rw-r--r--source3/rpc_server/srv_pipe.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 7a616c0ee6..449bf7555b 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -43,6 +43,7 @@
#include "ntdomain.h"
#include "rpc_server/srv_pipe.h"
#include "rpc_server/rpc_contexts.h"
+#include "lib/param/param.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_RPC_SRV
@@ -477,6 +478,7 @@ static bool pipe_schannel_auth_bind(struct pipes_struct *p,
struct netlogon_creds_CredentialState *creds;
enum ndr_err_code ndr_err;
struct schannel_state *schannel_auth;
+ struct loadparm_context *lp_ctx;
ndr_err = ndr_pull_struct_blob(
&auth_info->credentials, mem_ctx, &neg,
@@ -495,6 +497,12 @@ static bool pipe_schannel_auth_bind(struct pipes_struct *p,
return false;
}
+ lp_ctx = loadparm_init_s3(p, loadparm_s3_context());
+ if (!lp_ctx) {
+ DEBUG(0,("pipe_schannel_auth_bind: loadparm_init_s3() failed!\n"));
+ return false;
+ }
+
/*
* The neg.oem_netbios_computer.a key here must match the remote computer name
* given in the DOM_CLNT_SRV.uni_comp_name used on all netlogon pipe
@@ -502,10 +510,11 @@ static bool pipe_schannel_auth_bind(struct pipes_struct *p,
*/
become_root();
- status = schannel_get_creds_state(p, lp_private_dir(),
+ status = schannel_get_creds_state(p, lp_ctx,
neg.oem_netbios_computer.a, &creds);
unbecome_root();
-
+
+ talloc_unlink(p, lp_ctx);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, ("pipe_schannel_auth_bind: Attempt to bind using schannel without successful serverauth2\n"));
return False;