From: Stefan Metzmacher Date: Sat, 14 Sep 2024 13:54:25 +0000 (+0200) Subject: s3:utils/net_rpc: make use of dcerpc_binding_handle_transport_session_key() X-Git-Tag: samba-4.21.7~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5f1f651d0e5a6fa508dc467bf4ccb9f0fc97099b;p=thirdparty%2Fsamba.git s3:utils/net_rpc: make use of dcerpc_binding_handle_transport_session_key() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme (cherry picked from commit a14ac349deca11cda4159266cb3119fb3024999c) --- diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c index b04be2efea7..4e4de84b6e3 100644 --- a/source3/utils/net_rpc.c +++ b/source3/utils/net_rpc.c @@ -6118,7 +6118,8 @@ static NTSTATUS rpc_trustdom_add_internals(struct net_context *c, init_lsa_String(&lsa_acct_name, acct_name); - status = cli_get_session_key(frame, pipe_hnd, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, frame, &session_key); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("Error getting session_key of SAM pipe. Error was %s\n", nt_errstr(status))); @@ -6803,7 +6804,8 @@ static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd, data = data_blob(info->password.password->data, info->password.password->length); - nt_status = cli_get_session_key(mem_ctx, pipe_hnd, &session_key); + nt_status = dcerpc_binding_handle_transport_session_key( + b, mem_ctx, &session_key); if (!NT_STATUS_IS_OK(nt_status)) { DEBUG(0, ("Could not retrieve session key: %s\n", nt_errstr(nt_status))); goto done; diff --git a/source3/utils/net_rpc_trust.c b/source3/utils/net_rpc_trust.c index a3354ad68d4..4e57d7ce044 100644 --- a/source3/utils/net_rpc_trust.c +++ b/source3/utils/net_rpc_trust.c @@ -260,7 +260,8 @@ static NTSTATUS connect_and_get_info(TALLOC_CTX *mem_ctx, return status; } - status = cli_get_session_key(mem_ctx, *pipe_hnd, session_key); + status = dcerpc_binding_handle_transport_session_key( + (*pipe_hnd)->binding_handle, mem_ctx, session_key); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,("Error getting session_key of LSA pipe. Error was %s\n", nt_errstr(status)));