diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_rhosts.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source3/auth/auth_rhosts.c b/source3/auth/auth_rhosts.c index 8915acaecd..5451f7d930 100644 --- a/source3/auth/auth_rhosts.c +++ b/source3/auth/auth_rhosts.c @@ -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; } |