1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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 <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
(cherry picked from commit 4533afc9e1)
This commit is contained in:
Stefan Metzmacher 2024-10-02 19:01:39 +02:00 committed by Jule Anger
parent 6d117ea4c8
commit 0b85452df0

View File

@ -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;