[dovecot-cvs] dovecot/src/master mail-process.c, 1.96.2.21, 1.96.2.22
tss at dovecot.org
tss at dovecot.org
Fri Mar 23 02:07:23 EET 2007
Update of /var/lib/cvs/dovecot/src/master
In directory talvi:/tmp/cvs-serv21485
Modified Files:
Tag: branch_1_0
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.96.2.21
retrieving revision 1.96.2.22
diff -u -d -r1.96.2.21 -r1.96.2.22
--- mail-process.c 22 Mar 2007 23:32:58 -0000 1.96.2.21
+++ mail-process.c 23 Mar 2007 00:07:21 -0000 1.96.2.22
@@ -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"
@@ -380,14 +381,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) {
@@ -405,9 +405,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)
@@ -667,7 +665,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