]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
deliver: If log path begins with ~/, expand it to $HOME directory.
authorTimo Sirainen <tss@iki.fi>
Fri, 9 Jan 2009 19:03:44 +0000 (14:03 -0500)
committerTimo Sirainen <tss@iki.fi>
Fri, 9 Jan 2009 19:03:44 +0000 (14:03 -0500)
This doesn't really work if using -d parameter, since the expansion is done
before the userdb lookup.

--HG--
branch : HEAD

src/deliver/deliver.c

index d96417945b7f36b6f36c412e8d4c1f45d532bdbd..7f2fddda933d6c88a8e7e9edf5a073926332c80e 100644 (file)
@@ -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);