[dovecot-cvs] dovecot/src/master imap-process.c,1.21,1.22
cras at procontrol.fi
cras at procontrol.fi
Sat Dec 28 11:49:18 EET 2002
Update of /home/cvs/dovecot/src/master
In directory danu:/tmp/cvs-serv13226/src/master
Modified Files:
imap-process.c
Log Message:
default_mail_env wasn't actually working.
Index: imap-process.c
===================================================================
RCS file: /home/cvs/dovecot/src/master/imap-process.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- imap-process.c 22 Dec 2002 08:18:29 -0000 1.21
+++ imap-process.c 28 Dec 2002 09:49:16 -0000 1.22
@@ -123,7 +123,10 @@
break;
}
- if (var != NULL) {
+ if (var == NULL)
+ str_append_c(str, '%');
+ else {
+ env++;
if (width == 0)
str_append(str, var);
else
@@ -132,6 +135,7 @@
}
}
+
return str_c(str);
}
@@ -218,7 +222,7 @@
/* user given environment - may be malicious. virtual_user comes from
auth process, but don't trust that too much either. Some auth
mechanism might allow leaving extra data there. */
- if (mail == NULL && set_default_mail_env != NULL) {
+ if ((mail == NULL || *mail == '\0') && set_default_mail_env != NULL) {
mail = expand_mail_env(set_default_mail_env,
virtual_user, home);
env_put(t_strconcat("MAIL=", mail, NULL));
More information about the dovecot-cvs
mailing list