From 0b85452df0f7546dd6935ec4bfbef9655e87919c Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 2 Oct 2024 19:01:39 +0200 Subject: [PATCH] s4:rpc_server/netlogon: make use of creds->ex->client_sid creds->sid will be removed soon... BUG: https://bugzilla.samba.org/show_bug.cgi?id=15425 Signed-off-by: Stefan Metzmacher Reviewed-by: Douglas Bagnall (cherry picked from commit 4533afc9e12c4dbbc7d11c13e775888c113d497c) --- source4/rpc_server/netlogon/dcerpc_netlogon.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index 4d3e2c106cd..439383cafc6 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -942,7 +942,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet(struct dcesrv_call_state *dce_call r->in.credential, r->out.return_authenticator, &creds); NT_STATUS_NOT_OK_RETURN(nt_status); - client_sid = creds->sid; + client_sid = &creds->ex->client_sid; sam_ctx = dcesrv_samdb_connect_as_system(mem_ctx, dce_call); if (sam_ctx == NULL) { @@ -988,7 +988,7 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal r->in.credential, r->out.return_authenticator, &creds); NT_STATUS_NOT_OK_RETURN(nt_status); - client_sid = creds->sid; + client_sid = &creds->ex->client_sid; sam_ctx = dcesrv_samdb_connect_as_system(mem_ctx, dce_call); if (sam_ctx == NULL) { @@ -1339,7 +1339,7 @@ static NTSTATUS dcesrv_netr_LogonSamLogon_base_call(struct dcesrv_netr_LogonSamL user_info->netlogon_trust_account.account_name = creds->account_name; user_info->netlogon_trust_account.sid - = creds->sid; + = &creds->ex->client_sid; break; default: @@ -2682,7 +2682,7 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal talloc_free(frame); } NT_STATUS_NOT_OK_RETURN(status); - client_sid = creds->sid; + client_sid = &creds->ex->client_sid; /* We want to avoid connecting as system. */ sam_ctx = dcesrv_samdb_connect_as_user(mem_ctx, dce_call); @@ -3078,7 +3078,7 @@ static NTSTATUS dcesrv_netr_NetrLogonSendToSam(struct dcesrv_call_state *dce_cal &creds); NT_STATUS_NOT_OK_RETURN(nt_status); - client_sid = creds->sid; + client_sid = &creds->ex->client_sid; switch (creds->secure_channel_type) { case SEC_CHAN_BDC: @@ -4470,7 +4470,7 @@ static NTSTATUS dcesrv_netr_ServerGetTrustInfo(struct dcesrv_call_state *dce_cal if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } - client_sid = creds->sid; + client_sid = &creds->ex->client_sid; /* TODO: check r->in.server_name is our name */ @@ -4655,7 +4655,7 @@ static NTSTATUS dcesrv_netr_DsrUpdateReadOnlyServerDnsRecords(struct dcesrv_call r->out.return_authenticator, &creds); NT_STATUS_NOT_OK_RETURN(nt_status); - client_sid = creds->sid; + client_sid = &creds->ex->client_sid; if (creds->secure_channel_type != SEC_CHAN_RODC) { return NT_STATUS_ACCESS_DENIED; -- 2.47.2