From 1d1ad2db2e1f78ed16bd7c62b4d062aa128bb27d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 22 Feb 2003 20:11:29 +0000 Subject: Make sure we set the error code to indicate failure... Andrew Bartlett (This used to be commit 5a472e2a3cffe175ac4341e19c153a931505a2e8) --- source3/auth/auth_rhosts.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source3/auth/auth_rhosts.c') 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; } -- cgit