From: Timo Sirainen Date: Wed, 29 Oct 2008 18:35:17 +0000 (+0200) Subject: dovecot -n/-a: Fixes to printing which filesystem is being used. X-Git-Tag: 1.2.alpha4~133 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=840d72a2c8761cf0dda8ed0ca095bac67fc8a785;p=thirdparty%2Fdovecot%2Fcore.git dovecot -n/-a: Fixes to printing which filesystem is being used. --HG-- branch : HEAD --- diff --git a/src/master/sysinfo-get.c b/src/master/sysinfo-get.c index 826c9319c2..57b3c770b9 100644 --- a/src/master/sysinfo-get.c +++ b/src/master/sysinfo-get.c @@ -1,7 +1,6 @@ /* Copyright (c) 2008 Dovecot authors, see the included COPYING file */ #include "lib.h" -#include "home-expand.h" #include "mountpoint.h" #include "strescape.h" #include "sysinfo-get.h" @@ -91,8 +90,15 @@ static const char *filesystem_get(const char *mail_location) path = mail_location; else path = t_strcut(path + 1, ':'); - path = home_expand(path); + if (*path == '~') { + /* we don't know where users' home dirs are */ + return ""; + } + path = t_strcut(path, '%'); + if (strlen(path) <= 1) + return ""; + /* all in all it seems we can support only //%u style location */ if (mountpoint_get(path, pool_datastack_create(), &mp) < 0) return ""; return mp.type == NULL ? "" : mp.type;