summaryrefslogtreecommitdiffstats
path: root/source/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-22 20:11:29 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-22 20:11:29 +0000
commit5a472e2a3cffe175ac4341e19c153a931505a2e8 (patch)
tree146d596253ceda94e57447bc8a61762081120e6b /source/auth
parentcfc4cc776899da92a5c9a17f0ea36c7cb65d7a80 (diff)
downloadsamba-5a472e2a3cffe175ac4341e19c153a931505a2e8.tar.gz
samba-5a472e2a3cffe175ac4341e19c153a931505a2e8.tar.xz
samba-5a472e2a3cffe175ac4341e19c153a931505a2e8.zip
Make sure we set the error code to indicate failure...
Andrew Bartlett
Diffstat (limited to 'source/auth')
-rw-r--r--source/auth/auth_rhosts.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/source/auth/auth_rhosts.c b/source/auth/auth_rhosts.c
index 8915acaecd7..5451f7d9309 100644
--- a/source/auth/auth_rhosts.c
+++ b/source/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;
}