summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-02-22 20:01:00 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-02-22 20:01:00 +0000
commitfa26737f40607baa084f2fcc481894473add69d4 (patch)
tree4c2a7ac15fd01a003d3af1358482f6fae1062b4d /source3
parent7e110f782a55d4dca1fb3fedd95bf059c9ec0638 (diff)
downloadsamba-fa26737f40607baa084f2fcc481894473add69d4.tar.gz
samba-fa26737f40607baa084f2fcc481894473add69d4.tar.bz2
samba-fa26737f40607baa084f2fcc481894473add69d4.zip
See if I can make this look slightly like C. It compiled locally, honest...
Andrew Bartlett (This used to be commit cfc4cc776899da92a5c9a17f0ea36c7cb65d7a80)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_rhosts.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/auth/auth_rhosts.c b/source3/auth/auth_rhosts.c
index d8e1b01942..8915acaecd 100644
--- a/source3/auth/auth_rhosts.c
+++ b/source3/auth/auth_rhosts.c
@@ -199,6 +199,8 @@ static NTSTATUS check_rhosts_security(const struct auth_context *auth_context,
{
NTSTATUS nt_status = NT_STATUS_LOGON_FAILURE;
SAM_ACCOUNT *account = NULL;
+ pstring rhostsfile;
+ const char *home;
if (!NT_STATUS_IS_OK(nt_status =
auth_get_sam_account(user_info->internal_username.str,
@@ -206,9 +208,8 @@ static NTSTATUS check_rhosts_security(const struct auth_context *auth_context,
return nt_status;
}
- pstring rhostsfile;
-
- char *home = pdb_get_unix_homedir(account);
+ home = pdb_get_unix_homedir(account);
+
if (home) {
slprintf(rhostsfile, sizeof(rhostsfile)-1, "%s/.rhosts", home);
become_root();