mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
s3-netlogon: kill an fstring in rpc_server.
Guenther
This commit is contained in:
parent
0e389dc56c
commit
f5269ff182
@ -797,22 +797,19 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (process_creds) {
|
if (process_creds) {
|
||||||
fstring remote_machine;
|
|
||||||
|
|
||||||
/* Get the remote machine name for the creds store. */
|
/* Get the remote machine name for the creds store. */
|
||||||
/* Note this is the remote machine this request is coming from (member server),
|
/* Note this is the remote machine this request is coming from (member server),
|
||||||
not neccessarily the workstation name the user is logging onto.
|
not neccessarily the workstation name the user is logging onto.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
fstrcpy(remote_machine, r->in.computer_name);
|
|
||||||
|
|
||||||
if (!p->dc) {
|
if (!p->dc) {
|
||||||
/* Restore the saved state of the netlogon creds. */
|
/* Restore the saved state of the netlogon creds. */
|
||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
become_root();
|
become_root();
|
||||||
ret = secrets_restore_schannel_session_info(
|
ret = secrets_restore_schannel_session_info(
|
||||||
p, remote_machine, &p->dc);
|
p, r->in.computer_name, &p->dc);
|
||||||
unbecome_root();
|
unbecome_root();
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
return NT_STATUS_INVALID_HANDLE;
|
return NT_STATUS_INVALID_HANDLE;
|
||||||
@ -827,13 +824,13 @@ NTSTATUS _netr_LogonSamLogon(pipes_struct *p,
|
|||||||
if (!netlogon_creds_server_step(p->dc, r->in.credential, r->out.return_authenticator)) {
|
if (!netlogon_creds_server_step(p->dc, r->in.credential, r->out.return_authenticator)) {
|
||||||
DEBUG(2,("_netr_LogonSamLogon: creds_server_step failed. Rejecting auth "
|
DEBUG(2,("_netr_LogonSamLogon: creds_server_step failed. Rejecting auth "
|
||||||
"request from client %s machine account %s\n",
|
"request from client %s machine account %s\n",
|
||||||
remote_machine, p->dc->mach_acct ));
|
r->in.computer_name, p->dc->mach_acct ));
|
||||||
return NT_STATUS_INVALID_PARAMETER;
|
return NT_STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We must store the creds state after an update. */
|
/* We must store the creds state after an update. */
|
||||||
become_root();
|
become_root();
|
||||||
secrets_store_schannel_session_info(p, remote_machine, p->dc);
|
secrets_store_schannel_session_info(p, r->in.computer_name, p->dc);
|
||||||
unbecome_root();
|
unbecome_root();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user