[dovecot-cvs] dovecot/src/master mail-process.c,1.120,1.121
tss at dovecot.org
tss at dovecot.org
Fri Mar 23 02:07:26 EET 2007
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv21483
Modified Files:
mail-process.c
Log Message:
Fixed NFS check again with chroots
Index: mail-process.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- mail-process.c 22 Mar 2007 23:33:01 -0000 1.120
+++ mail-process.c 23 Mar 2007 00:07:24 -0000 1.121
@@ -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));
More information about the dovecot-cvs
mailing list