From fa26737f40607baa084f2fcc481894473add69d4 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 22 Feb 2003 20:01:00 +0000 Subject: See if I can make this look slightly like C. It compiled locally, honest... Andrew Bartlett (This used to be commit cfc4cc776899da92a5c9a17f0ea36c7cb65d7a80) --- source3/auth/auth_rhosts.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source3') 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(); -- cgit