summaryrefslogtreecommitdiff
path: root/source4/rpc_server/samr
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2004-06-07 21:34:32 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:56:37 -0500
commitb717b40235b2433b26b20ced36142c250f9c411e (patch)
treea473705f0b0a7a509d0d675998b763fc6e244a65 /source4/rpc_server/samr
parentfb1cc0fc0d0dec3384886b42e9377b531defe352 (diff)
downloadsamba-b717b40235b2433b26b20ced36142c250f9c411e.tar.gz
samba-b717b40235b2433b26b20ced36142c250f9c411e.tar.bz2
samba-b717b40235b2433b26b20ced36142c250f9c411e.zip
r1078: the dxesrv_crypto_* implementations should now explicit set
the dce_conn->auth_state.session_info ( the ntlmssp one works fine, but the schannel one isn't implemented yet) this is also set by the ntvfs_ipc backend on the endpoint connect. metze (This used to be commit ad3dd1789e9f124493519cb4731d9f5a563fd051)
Diffstat (limited to 'source4/rpc_server/samr')
-rw-r--r--source4/rpc_server/samr/samr_password.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source4/rpc_server/samr/samr_password.c b/source4/rpc_server/samr/samr_password.c
index d5f995feb8..988c52e4ee 100644
--- a/source4/rpc_server/samr/samr_password.c
+++ b/source4/rpc_server/samr/samr_password.c
@@ -693,7 +693,13 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
{
char new_pass[512];
uint32_t new_pass_len;
- DATA_BLOB session_key = dce_call->conn->session_key;
+ DATA_BLOB session_key;
+
+ session_key = data_blob(NULL,0);
+
+ if (dce_call->conn->auth_state.session_info) {
+ session_key = dce_call->conn->auth_state.session_info->session_key;
+ }
if (session_key.length == 0) {
DEBUG(3,("Bad session key in samr_set_password\n"));
@@ -734,9 +740,15 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
char new_pass[512];
uint32_t new_pass_len;
DATA_BLOB co_session_key;
- DATA_BLOB session_key = dce_call->conn->session_key;
+ DATA_BLOB session_key;
struct MD5Context ctx;
+ session_key = data_blob(NULL,0);
+
+ if (dce_call->conn->auth_state.session_info) {
+ session_key = dce_call->conn->auth_state.session_info->session_key;
+ }
+
co_session_key = data_blob_talloc(mem_ctx, NULL, 16);
if (!co_session_key.data) {
return NT_STATUS_NO_MEMORY;