changeset 5304:afcb29d8faff HEAD

Don't expand %variables in extra fields, let dovecot master do that.
author Timo Sirainen <tss@iki.fi>
date Wed, 14 Mar 2007 15:59:05 +0200
parents 70fea9bab837
children 43d3955ce03f
files src/auth/userdb-passwd-file.c
diffstat 1 files changed, 2 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/userdb-passwd-file.c	Wed Mar 14 15:49:21 2007 +0200
+++ b/src/auth/userdb-passwd-file.c	Wed Mar 14 15:59:05 2007 +0200
@@ -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();