s4:rpc_server: merge dcesrv_fetch_session_key() into 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:34 +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/dcerpc_server.c
source4/rpc_server/dcerpc_server.h

index 8e1f65935a03cb534b0aca717e1769ee7e67050f..828a936c0b8e36465f67e0100ae256cf6ea0b719 100644 (file)
@@ -505,14 +505,16 @@ _PUBLIC_ NTSTATUS dcesrv_auth_session_key(struct dcesrv_call_state *call,
 }
 
 /*
-  fetch the user session key - may be default (above) or the SMB session key
-
-  The key is always truncated to 16 bytes 
+ * Fetch the transport session key if available.
+ * Typically this is the SMB session key
+ * or a fixed key for local transports.
+ *
+ * The key is always truncated to 16 bytes.
 */
-_PUBLIC_ NTSTATUS dcesrv_fetch_session_key(struct dcesrv_connection *p,
-                                 DATA_BLOB *session_key)
+_PUBLIC_ NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call,
+                                              DATA_BLOB *session_key)
 {
-       struct dcesrv_auth *auth = &p->auth_state;
+       struct dcesrv_auth *auth = &call->conn->auth_state;
        NTSTATUS status;
 
        if (auth->session_key_fn == NULL) {
@@ -529,19 +531,6 @@ _PUBLIC_ NTSTATUS dcesrv_fetch_session_key(struct dcesrv_connection *p,
        return NT_STATUS_OK;
 }
 
-/*
- * Fetch the transport session key if available.
- * Typically this is the SMB session key
- * or a fixed key for local transports.
- *
- * The key is always truncated to 16 bytes.
-*/
-_PUBLIC_ NTSTATUS dcesrv_transport_session_key(struct dcesrv_call_state *call,
-                                              DATA_BLOB *session_key)
-{
-       return dcesrv_fetch_session_key(call->conn, session_key);
-}
-
 /*
   connect to a dcerpc endpoint
 */
index 1d80a2fa26f7e72c1dbb168252c34c558c4329a3..bba8b42534c1bbcc4e920f209391bb003a8ae64a 100644 (file)
@@ -438,8 +438,6 @@ struct dcesrv_handle *dcesrv_handle_fetch(
 const struct tsocket_address *dcesrv_connection_get_local_address(struct dcesrv_connection *conn);
 const struct tsocket_address *dcesrv_connection_get_remote_address(struct dcesrv_connection *conn);
 
-NTSTATUS dcesrv_fetch_session_key(struct dcesrv_connection *p, DATA_BLOB *session_key);
-
 /*
  * Fetch the authentication session key if available.
  *