]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't allow relative home directory paths.
authorTimo Sirainen <tss@iki.fi>
Wed, 21 Oct 2009 00:23:10 +0000 (20:23 -0400)
committerTimo Sirainen <tss@iki.fi>
Wed, 21 Oct 2009 00:23:10 +0000 (20:23 -0400)
--HG--
branch : HEAD

src/lib-storage/mail-storage-service.c

index d198a74471949800e8ad6de585e3d1ee0f8d2228..eec1bd0fb8de6683fe36256551f06d1ed552bbf5 100644 (file)
@@ -562,6 +562,12 @@ init_user_real(struct master_service *service,
                }
        }
 
+       if (*home != '/') {
+               i_fatal("user %s: Relative home directory paths not supported: "
+                       "%s", input.username, home);
+
+       }
+
        len = strlen(user_set->mail_chroot);
        if (len > 2 && strcmp(user_set->mail_chroot + len - 2, "/.") == 0 &&
            strncmp(home, user_set->mail_chroot, len - 2) == 0) {