[dovecot-cvs] dovecot/src/auth db-passwd-file.c,1.25.2.1,1.25.2.2

cras at dovecot.org cras at dovecot.org
Sun Jun 18 00:02:37 EEST 2006


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

Modified Files:
      Tag: branch_1_0
	db-passwd-file.c 
Log Message:
extra_args field was ignored if the passwd-file wasn't also used as a
userdb.



Index: db-passwd-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-passwd-file.c,v
retrieving revision 1.25.2.1
retrieving revision 1.25.2.2
diff -u -d -r1.25.2.1 -r1.25.2.2
--- db-passwd-file.c	31 May 2006 11:03:50 -0000	1.25.2.1
+++ db-passwd-file.c	17 Jun 2006 21:02:35 -0000	1.25.2.2
@@ -101,7 +101,8 @@
 
 	/* home */
 	if (*args != NULL) {
-		pu->home = p_strdup_empty(pw->pool, *args);
+		if (pw->db->userdb)
+			pu->home = p_strdup_empty(pw->pool, *args);
 		args++;
 	}
 
@@ -113,7 +114,7 @@
 		/* old format, this field is empty and next field may
 		   contain MAIL */
 		args++;
-		if (*args != NULL && **args != '\0') {
+		if (*args != NULL && **args != '\0' && pw->db->userdb) {
 			extra_fields =
                                 t_strconcat("userdb_mail=",
                                             t_strarray_join(args, ":"), NULL);
@@ -185,8 +186,7 @@
 		args = t_strsplit(line, ":");
 		if (args[1] != NULL) {
 			/* at least username+password */
-			passwd_file_add(pw, args[0], args[1],
-					pw->db->userdb ? args+2 : &no_args);
+			passwd_file_add(pw, args[0], args[1], args+2);
 		} else {
 			/* only username */
 			passwd_file_add(pw, args[0], NULL, &no_args);



More information about the dovecot-cvs mailing list