summaryrefslogtreecommitdiff
path: root/source3
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
commit1d1ad2db2e1f78ed16bd7c62b4d062aa128bb27d (patch)
tree81317e94bc27fb6ad6e6559c6149638638fbdde9 /source3
parentfa26737f40607baa084f2fcc481894473add69d4 (diff)
downloadsamba-1d1ad2db2e1f78ed16bd7c62b4d062aa128bb27d.tar.gz
samba-1d1ad2db2e1f78ed16bd7c62b4d062aa128bb27d.tar.bz2
samba-1d1ad2db2e1f78ed16bd7c62b4d062aa128bb27d.zip
Make sure we set the error code to indicate failure...
Andrew Bartlett (This used to be commit 5a472e2a3cffe175ac4341e19c153a931505a2e8)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_rhosts.c13
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;
}