]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:utils/net_rpc: make use of dcerpc_binding_handle_transport_session_key()
authorStefan Metzmacher <metze@samba.org>
Sat, 14 Sep 2024 13:54:25 +0000 (15:54 +0200)
committerJule Anger <janger@samba.org>
Thu, 12 Jun 2025 11:27:14 +0000 (11:27 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit a14ac349deca11cda4159266cb3119fb3024999c)

source3/utils/net_rpc.c
source3/utils/net_rpc_trust.c

index b04be2efea709f39e2a0bd8ca03da96d8e4b8caa..4e4de84b6e390b469ffd67d7e6fc4ba9aba93a39 100644 (file)
@@ -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;
index a3354ad68d4561096e00706531dcf0f739eb620c..4e57d7ce044e294a66eefc8b69a2a96d15ac6f2f 100644 (file)
@@ -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)));