[dovecot-cvs] dovecot/src/auth db-passwd-file.c,1.14,1.15

cras at dovecot.org cras at dovecot.org
Sat Sep 24 16:41:29 EEST 2005


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

Modified Files:
	db-passwd-file.c 
Log Message:
When passwd-file has %d, drop domain names from username lookups only if %d
was given without any modifiers.



Index: db-passwd-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-passwd-file.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- db-passwd-file.c	24 Sep 2005 12:51:25 -0000	1.14
+++ db-passwd-file.c	24 Sep 2005 13:41:27 -0000	1.15
@@ -247,18 +247,16 @@
 	for (p = path; *p != '\0'; p++) {
 		if (*p == '%' && p[1] != '\0') {
 			p++;
-			switch (var_get_key(p)) {
-			case 'd':
+			if (*p == 'd') {
+				/* drop domains out only if %d is given
+				   without modifiers */
 				db->domain_var = TRUE;
-				db->vars = TRUE;
-				break;
-			case '%':
+			}
+
+			if (var_get_key(p) == '%')
 				percents = TRUE;
-				break;
-			default:
+			else
 				db->vars = TRUE;
-				break;
-			}
 		}
 	}
 



More information about the dovecot-cvs mailing list