From: Timo Sirainen Date: Thu, 18 Mar 2010 02:12:24 +0000 (+0200) Subject: doveadm who: Use wildcards for user matching. X-Git-Tag: 2.0.beta4~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3ef05dbd1be6cb311e4d196bab87e73fdc660e19;p=thirdparty%2Fdovecot%2Fcore.git doveadm who: Use wildcards for user matching. --HG-- branch : HEAD --- diff --git a/src/doveadm/doveadm-who.c b/src/doveadm/doveadm-who.c index 12ea544e3a..155839b7f9 100644 --- a/src/doveadm/doveadm-who.c +++ b/src/doveadm/doveadm-who.c @@ -4,6 +4,7 @@ #include "array.h" #include "network.h" #include "istream.h" +#include "wildcard-match.h" #include "hash.h" #include "doveadm.h" @@ -166,7 +167,7 @@ static bool who_user_filter_match(const struct who_user *user, const struct who_filter *filter) { if (filter->username != NULL) { - if (strstr(user->username, filter->username) == NULL) + if (!wildcard_match_icase(user->username, filter->username)) return FALSE; } if (filter->net_bits > 0) { @@ -232,7 +233,7 @@ static bool who_line_filter_match(const struct who_line *line, const struct who_filter *filter) { if (filter->username != NULL) { - if (strstr(line->username, filter->username) == NULL) + if (!wildcard_match_icase(line->username, filter->username)) return FALSE; } if (filter->net_bits > 0) {