mirror of
https://github.com/samba-team/samba.git
synced 2025-02-07 01:58:28 +03:00
Make sure we set the error code to indicate failure...
Andrew Bartlett
This commit is contained in:
parent
cfc4cc7768
commit
5a472e2a3c
@ -169,6 +169,9 @@ static NTSTATUS check_hostsequiv_security(const struct auth_context *auth_contex
|
||||
|
||||
if (check_hosts_equiv(account)) {
|
||||
nt_status = make_server_info_sam(server_info, account);
|
||||
} else {
|
||||
pdb_free_sam(&account);
|
||||
nt_status = NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
|
||||
return nt_status;
|
||||
@ -215,10 +218,16 @@ static NTSTATUS check_rhosts_security(const struct auth_context *auth_context,
|
||||
become_root();
|
||||
if (check_user_equiv(pdb_get_username(account),client_name(),rhostsfile)) {
|
||||
nt_status = make_server_info_sam(server_info, account);
|
||||
} else {
|
||||
pdb_free_sam(&account);
|
||||
nt_status = NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
unbecome_root();
|
||||
}
|
||||
|
||||
} else {
|
||||
pdb_free_sam(&account);
|
||||
nt_status = NT_STATUS_LOGON_FAILURE;
|
||||
}
|
||||
|
||||
return nt_status;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user