From: Timo Sirainen Date: Wed, 21 Oct 2009 00:23:10 +0000 (-0400) Subject: Don't allow relative home directory paths. X-Git-Tag: 2.0.alpha2~42 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d2a93f2dd0392193b790bf94b8c22b0c2feae3a;p=thirdparty%2Fdovecot%2Fcore.git Don't allow relative home directory paths. --HG-- branch : HEAD --- diff --git a/src/lib-storage/mail-storage-service.c b/src/lib-storage/mail-storage-service.c index d198a74471..eec1bd0fb8 100644 --- a/src/lib-storage/mail-storage-service.c +++ b/src/lib-storage/mail-storage-service.c @@ -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) {