s4:rpc_server/samr: make use of dcesrv_transport_session_key()
authorStefan Metzmacher <metze@samba.org>
Thu, 8 Nov 2018 10:52:29 +0000 (11:52 +0100)
committerJeremy Allison <jra@samba.org>
Sat, 12 Jan 2019 02:13:33 +0000 (03:13 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=7113
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11892

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source4/rpc_server/samr/samr_password.c

index 08a499e..a80ae56 100644 (file)
@@ -545,7 +545,7 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
        DATA_BLOB new_password;
        DATA_BLOB session_key = data_blob(NULL, 0);
 
-       nt_status = dcesrv_fetch_session_key(dce_call->conn, &session_key);
+       nt_status = dcesrv_transport_session_key(dce_call, &session_key);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(3,("samr: failed to get session key: %s "
                         "=> NT_STATUS_WRONG_PASSWORD\n",
@@ -587,7 +587,7 @@ NTSTATUS samr_set_password_ex(struct dcesrv_call_state *dce_call,
        DATA_BLOB session_key = data_blob(NULL, 0);
        MD5_CTX ctx;
 
-       nt_status = dcesrv_fetch_session_key(dce_call->conn, &session_key);
+       nt_status = dcesrv_transport_session_key(dce_call, &session_key);
        if (!NT_STATUS_IS_OK(nt_status)) {
                DEBUG(3,("samr: failed to get session key: %s "
                         "=> NT_STATUS_WRONG_PASSWORD\n",
@@ -639,7 +639,7 @@ NTSTATUS samr_set_password_buffers(struct dcesrv_call_state *dce_call,
        DATA_BLOB in, out;
        NTSTATUS nt_status = NT_STATUS_OK;
 
-       nt_status = dcesrv_fetch_session_key(dce_call->conn, &session_key);
+       nt_status = dcesrv_transport_session_key(dce_call, &session_key);
        if (NT_STATUS_EQUAL(nt_status, NT_STATUS_NO_USER_SESSION_KEY)) {
                DEBUG(3,("samr: failed to get session key: %s "
                         "=> use a random session key\n",