From: Timo Sirainen Date: Sat, 12 Jul 2003 15:45:19 +0000 (+0300) Subject: We can't always chdir() to user's home directory if it's NFS-mounted. X-Git-Tag: 1.1.alpha1~4490 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ae6c693179846ee81b2aa903c8e30ec9793b909;p=thirdparty%2Fdovecot%2Fcore.git We can't always chdir() to user's home directory if it's NFS-mounted. Ignore that error. --HG-- branch : HEAD --- diff --git a/src/master/mail-process.c b/src/master/mail-process.c index 2359020c28..7fb4f097e2 100644 --- a/src/master/mail-process.c +++ b/src/master/mail-process.c @@ -168,7 +168,9 @@ int create_mail_process(struct login_group *group, int socket, if (*home_dir != '\0') { full_home_dir = *chroot_dir == '\0' ? home_dir : t_strconcat(chroot_dir, "/", home_dir, NULL); - if (chdir(full_home_dir) < 0) + /* NOTE: if home directory is NFS-mounted, we might not + have access to it as root. Ignore such errors. */ + if (chdir(full_home_dir) < 0 && errno != EACCES) i_fatal("chdir(%s) failed: %m", full_home_dir); }