]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
We can't always chdir() to user's home directory if it's NFS-mounted.
authorTimo Sirainen <tss@iki.fi>
Sat, 12 Jul 2003 15:45:19 +0000 (18:45 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 12 Jul 2003 15:45:19 +0000 (18:45 +0300)
Ignore that error.

--HG--
branch : HEAD

src/master/mail-process.c

index 2359020c289d55db5635bd03c49fff2ea92bf01f..7fb4f097e2f880c9d934817aa3cf449b044f1db0 100644 (file)
@@ -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);
        }