[dovecot-cvs] dovecot/src/auth userdb-passwd-file.c,1.24,1.25

tss at dovecot.org tss at dovecot.org
Wed Mar 14 15:59:09 EET 2007


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

Modified Files:
	userdb-passwd-file.c 
Log Message:
Don't expand %variables in extra fields, let dovecot master do that.



Index: userdb-passwd-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/userdb-passwd-file.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- userdb-passwd-file.c	21 Dec 2006 16:01:15 -0000	1.24
+++ userdb-passwd-file.c	14 Mar 2007 13:59:05 -0000	1.25
@@ -27,8 +27,6 @@
 		(struct passwd_file_userdb_module *)_module;
 	struct auth_stream_reply *reply;
 	struct passwd_user *pu;
-        const struct var_expand_table *table;
-	string_t *str;
 	const char *key, *value;
 	char **p;
 
@@ -48,21 +46,14 @@
 
 	if (pu->extra_fields != NULL) {
 		t_push();
-		str = t_str_new(512);
-		table = auth_request_get_var_expand_table(auth_request, NULL);
-
 		for (p = pu->extra_fields; *p != NULL; p++) {
 			if (strncmp(*p, "userdb_", 7) != 0)
 				continue;
 
 			key = *p + 7;
 			value = strchr(key, '=');
-			if (value != NULL) {
-				key = t_strdup_until(key, value);
-				str_truncate(str, 0);
-				var_expand(str, value + 1, table);
-				value = str_c(str);
-			}
+			if (value != NULL)
+				key = t_strdup_until(key, value++);
 			auth_stream_reply_add(reply, key, value);
 		}
 		t_pop();



More information about the dovecot-cvs mailing list