[dovecot-cvs] dovecot/src/auth passdb-pam.c,1.29,1.30

cras at dovecot.org cras at dovecot.org
Sun Dec 25 13:05:30 EET 2005


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

Modified Files:
	passdb-pam.c 
Log Message:
PAM: Changed -session to session=yes to be more consistent with other
parameters. Check that invalid parameters aren't given. Added a few
examples to configuration file.



Index: passdb-pam.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-pam.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- passdb-pam.c	16 Oct 2005 14:06:59 -0000	1.29
+++ passdb-pam.c	25 Dec 2005 11:05:28 -0000	1.30
@@ -424,8 +424,10 @@
 
 	t_push();
 	t_args = t_strsplit(args, " ");
-        for(i = 0; t_args[i] != NULL; i++) {
-		if (strcmp(t_args[i], "-session") == 0)
+	for(i = 0; t_args[i] != NULL; i++) {
+		/* -session for backwards compatibility */
+		if (strcmp(t_args[i], "-session") == 0 ||
+		    strcmp(t_args[i], "session=yes") == 0)
 			module->pam_session = TRUE;
 		else if (strncmp(t_args[i], "cache_key=", 10) == 0) {
 			module->module.cache_key =
@@ -433,12 +435,14 @@
 					 t_args[i] + 10);
 		} else if (strcmp(t_args[i], "*") == 0) {
 			module->service_name = NULL;
-		} else {
+		} else if (t_args[i+1] == NULL) {
 			if (*t_args[i] != '\0') {
 				module->service_name =
 					p_strdup(auth_passdb->auth->pool,
 						 t_args[i]);
 			}
+		} else {
+			i_fatal("Unexpected PAM parameter: %s", t_args[i]);
 		}
 	}
 	t_pop();



More information about the dovecot-cvs mailing list