From: Timo Sirainen Date: Fri, 9 Jan 2009 19:03:44 +0000 (-0500) Subject: deliver: If log path begins with ~/, expand it to $HOME directory. X-Git-Tag: 1.2.beta1~134 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5e75b7048a21ce024570026c5c91f77fb4a7e26e;p=thirdparty%2Fdovecot%2Fcore.git deliver: If log path begins with ~/, expand it to $HOME directory. This doesn't really work if using -d parameter, since the expansion is done before the userdb lookup. --HG-- branch : HEAD --- diff --git a/src/deliver/deliver.c b/src/deliver/deliver.c index d96417945b..7f2fddda93 100644 --- a/src/deliver/deliver.c +++ b/src/deliver/deliver.c @@ -688,7 +688,7 @@ static void open_logfile(const char *username) const char *prefix, *log_path, *stamp; prefix = t_strdup_printf("deliver(%s): ", username); - log_path = getenv("LOG_PATH"); + log_path = home_expand(getenv("LOG_PATH")); if (log_path == NULL || *log_path == '\0') { const char *env = getenv("SYSLOG_FACILITY"); int facility; @@ -702,7 +702,7 @@ static void open_logfile(const char *username) i_set_failure_file(log_path, prefix); } - log_path = getenv("INFO_LOG_PATH"); + log_path = home_expand(getenv("INFO_LOG_PATH")); if (log_path != NULL && *log_path != '\0') i_set_info_file(log_path);