summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLove Hörnquist Åstrand <lha@samba.org>2005-07-12 20:56:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:20:14 -0500
commit053cec96df59e321a6065ab06db1d1e6c3e5299a (patch)
tree85915a1f413dac9c20ed31ef261b9c57891ed92a
parentf5598308d5011fb0a268ef985ad27686c2c13596 (diff)
downloadsamba-053cec96df59e321a6065ab06db1d1e6c3e5299a.tar.gz
samba-053cec96df59e321a6065ab06db1d1e6c3e5299a.tar.bz2
samba-053cec96df59e321a6065ab06db1d1e6c3e5299a.zip
r8390: (smb_pam_start): move variable to scope within #ifdef to avoid warning
for those PAM implementations w/o PAM_RHOST and/or PAM_TTY (This used to be commit 95cb2d942f7cffc9131519c865656fb615395d04)
-rw-r--r--source4/auth/auth_unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/auth/auth_unix.c b/source4/auth/auth_unix.c
index 7565d12eee..ecdd770362 100644
--- a/source4/auth/auth_unix.c
+++ b/source4/auth/auth_unix.c
@@ -166,7 +166,6 @@ static int smb_pam_conv(int num_msg, const struct pam_message **msg,
static NTSTATUS smb_pam_start(pam_handle_t **pamh, const char *account_name, const char *remote_host, struct pam_conv *pconv)
{
- NTSTATUS nt_status;
int pam_error;
if (account_name == NULL || remote_host == NULL) {
@@ -186,6 +185,8 @@ static NTSTATUS smb_pam_start(pam_handle_t **pamh, const char *account_name, con
DEBUG(4,("smb_pam_start: PAM: setting rhost to: %s\n", remote_host));
pam_error = pam_set_item(*pamh, PAM_RHOST, remote_host);
if (pam_error != PAM_SUCCESS) {
+ NTSTATUS nt_status;
+
DEBUG(4,("smb_pam_start: setting rhost failed with error: %s\n",
pam_strerror(*pamh, pam_error)));
nt_status = pam_to_nt_status(pam_error);
@@ -204,6 +205,8 @@ static NTSTATUS smb_pam_start(pam_handle_t **pamh, const char *account_name, con
DEBUG(4,("smb_pam_start: PAM: setting tty\n"));
pam_error = pam_set_item(*pamh, PAM_TTY, "samba");
if (pam_error != PAM_SUCCESS) {
+ NTSTATUS nt_status;
+
DEBUG(4,("smb_pam_start: setting tty failed with error: %s\n",
pam_strerror(*pamh, pam_error)));
nt_status = pam_to_nt_status(pam_error);