From d9bf23f971dd8f426424f05076e76be587d42087 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 14 Sep 2024 14:32:22 +0200 Subject: [PATCH] s4:librpc/rpc: remove unused dcerpc_fetch_session_key() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source4/librpc/rpc/dcerpc.h | 2 -- source4/librpc/rpc/dcerpc_util.c | 19 ------------------- 2 files changed, 21 deletions(-) diff --git a/source4/librpc/rpc/dcerpc.h b/source4/librpc/rpc/dcerpc.h index 857c67ddc8e..dab66501b92 100644 --- a/source4/librpc/rpc/dcerpc.h +++ b/source4/librpc/rpc/dcerpc.h @@ -180,8 +180,6 @@ NTSTATUS dcerpc_pipe_open_smb2(struct dcerpc_pipe *p, const char *pipe_name); NTSTATUS dcerpc_bind_auth_none(struct dcerpc_pipe *p, const struct ndr_interface_table *table); -NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p, - DATA_BLOB *session_key); struct composite_context; NTSTATUS dcerpc_secondary_connection_recv(struct composite_context *c, struct dcerpc_pipe **p2); diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index e1178cffad2..f40b872ab40 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -724,25 +724,6 @@ NTSTATUS dcecli_generic_session_key(struct dcecli_connection *c, return dcerpc_generic_session_key(session_key); } -/* - fetch the user session key - may be default (above) or the SMB session key - - The key is always truncated to 16 bytes -*/ -_PUBLIC_ NTSTATUS dcerpc_fetch_session_key(struct dcerpc_pipe *p, - DATA_BLOB *session_key) -{ - NTSTATUS status; - status = p->conn->security_state.session_key(p->conn, session_key); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - session_key->length = MIN(session_key->length, 16); - - return NT_STATUS_OK; -} - /* create a secondary context from a primary connection