[dovecot-cvs] dovecot/src/auth userdb-passwd-file.c, 1.22.2.2, 1.22.2.3

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


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

Modified Files:
      Tag: branch_1_0
	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.22.2.2
retrieving revision 1.22.2.3
diff -u -d -r1.22.2.2 -r1.22.2.3
--- userdb-passwd-file.c	16 Jan 2007 13:23:26 -0000	1.22.2.2
+++ userdb-passwd-file.c	14 Mar 2007 13:59:02 -0000	1.22.2.3
@@ -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