[dovecot-cvs] dovecot/src/auth passdb-pam.c,1.37.2.2,1.37.2.3

cras at dovecot.org cras at dovecot.org
Mon Jun 12 00:55:42 EEST 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv3824

Modified Files:
      Tag: branch_1_0
	passdb-pam.c 
Log Message:
Set PAM_TTY.



Index: passdb-pam.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-pam.c,v
retrieving revision 1.37.2.2
retrieving revision 1.37.2.3
diff -u -d -r1.37.2.2 -r1.37.2.3
--- passdb-pam.c	11 Jun 2006 18:14:34 -0000	1.37.2.2
+++ passdb-pam.c	11 Jun 2006 21:55:40 -0000	1.37.2.3
@@ -256,8 +256,13 @@
 				      pam_strerror(pamh, status));
 	} else {
 		const char *host = net_ip2addr(&request->remote_ip);
+
+		/* Set some PAM items. They shouldn't fail, and we don't really
+		   care if they do. */
 		if (host != NULL)
-			pam_set_item(pamh, PAM_RHOST, host);
+			(void)pam_set_item(pamh, PAM_RHOST, host);
+		/* TTY is needed by eg. pam_access module */
+		(void)pam_set_item(pamh, PAM_TTY, "dovecot");
 
 		status = pam_auth(request, pamh, &str);
 		if ((status2 = pam_end(pamh, status)) == PAM_SUCCESS) {



More information about the dovecot-cvs mailing list