Mercurial > dovecot > core-2.2
changeset 5386:bf4a85a47901 HEAD
Fixed NFS check again with chroots
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 23 Mar 2007 02:07:24 +0200 |
parents | 284f2994ea5f |
children | 783670f8a118 |
files | src/master/mail-process.c |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/master/mail-process.c Fri Mar 23 02:06:42 2007 +0200 +++ b/src/master/mail-process.c Fri Mar 23 02:07:24 2007 +0200 @@ -9,6 +9,7 @@ #include "mountpoint.h" #include "restrict-access.h" #include "restrict-process-size.h" +#include "home-expand.h" #include "var-expand.h" #include "mail-process.h" #include "login-process.h" @@ -378,14 +379,13 @@ i_fatal_status(FATAL_EXEC, "execv(%s) failed: %m", executable); } -static void nfs_warn_if_found(const char *mail, const char *chroot, - const char *home) +static void nfs_warn_if_found(const char *mail, const char *full_home_dir) { struct mountpoint point; const char *path; if (mail == NULL || *mail == '\0') - path = home; + path = full_home_dir; else { path = strstr(mail, ":INDEX="); if (path != NULL) { @@ -403,9 +403,7 @@ path++; } } - path = t_strcut(path, ':'); - if (*chroot != '\0') - path = t_strconcat(chroot, "/", path, NULL); + path = home_expand_tilde(t_strcut(path, ':'), full_home_dir); } if (mountpoint_get(path, pool_datastack_create(), &point) <= 0) @@ -665,7 +663,7 @@ } if (nfs_check) - nfs_warn_if_found(getenv("MAIL"), chroot_dir, full_home_dir); + nfs_warn_if_found(getenv("MAIL"), full_home_dir); env_put("LOGGED_IN=1"); env_put(t_strconcat("HOME=", home_dir, NULL));