From 2cb726e92c819d60509419a33cd8da265e1c99e7 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 14 Sep 2024 15:51:20 +0200 Subject: [PATCH] s3:lib/netapi: make use of dcerpc_binding_handle_transport_session_key() Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source3/lib/netapi/joindomain.c | 12 ++++++++---- source3/lib/netapi/user.c | 6 ++++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/source3/lib/netapi/joindomain.c b/source3/lib/netapi/joindomain.c index 2b9d26fbaca..eca836b8381 100644 --- a/source3/lib/netapi/joindomain.c +++ b/source3/lib/netapi/joindomain.c @@ -145,7 +145,8 @@ WERROR NetJoinDomain_r(struct libnetapi_ctx *ctx, if (r->in.password) { - status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, talloc_tos(), &session_key); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; @@ -300,7 +301,8 @@ WERROR NetUnjoinDomain_r(struct libnetapi_ctx *ctx, if (r->in.password) { - status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, talloc_tos(), &session_key); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; @@ -518,7 +520,8 @@ WERROR NetGetJoinableOUs_r(struct libnetapi_ctx *ctx, if (r->in.password) { - status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, talloc_tos(), &session_key); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; @@ -574,7 +577,8 @@ WERROR NetRenameMachineInDomain_r(struct libnetapi_ctx *ctx, if (r->in.password) { - status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, talloc_tos(), &session_key); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; diff --git a/source3/lib/netapi/user.c b/source3/lib/netapi/user.c index a7f4c9d7c01..d3d87be8c51 100644 --- a/source3/lib/netapi/user.c +++ b/source3/lib/netapi/user.c @@ -477,7 +477,8 @@ WERROR NetUserAdd_r(struct libnetapi_ctx *ctx, goto done; } - status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, talloc_tos(), &session_key); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; @@ -1953,7 +1954,8 @@ WERROR NetUserSetInfo_r(struct libnetapi_ctx *ctx, goto done; } - status = cli_get_session_key(talloc_tos(), pipe_cli, &session_key); + status = dcerpc_binding_handle_transport_session_key( + b, talloc_tos(), &session_key); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done;