svn commit: samba r8390 - in branches/SAMBA_4_0/source/auth: .

lha at samba.org lha at samba.org
Tue Jul 12 20:56:28 GMT 2005


Author: lha
Date: 2005-07-12 20:56:27 +0000 (Tue, 12 Jul 2005)
New Revision: 8390

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=8390

Log:
(smb_pam_start): move variable to scope within #ifdef to avoid warning
for those PAM implementations w/o PAM_RHOST and/or PAM_TTY

Modified:
   branches/SAMBA_4_0/source/auth/auth_unix.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_unix.c
===================================================================
--- branches/SAMBA_4_0/source/auth/auth_unix.c	2005-07-12 18:24:07 UTC (rev 8389)
+++ branches/SAMBA_4_0/source/auth/auth_unix.c	2005-07-12 20:56:27 UTC (rev 8390)
@@ -166,7 +166,6 @@
 
 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 @@
 	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 @@
 	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);



More information about the samba-cvs mailing list