Mercurial > dovecot > core-2.2
changeset 10942:819fbb179cbc HEAD
doveadm who: Use wildcards for user matching.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 18 Mar 2010 04:12:24 +0200 |
parents | f7d14405de09 |
children | 41ce0172dcc8 |
files | src/doveadm/doveadm-who.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/doveadm/doveadm-who.c Thu Mar 18 04:11:55 2010 +0200 +++ b/src/doveadm/doveadm-who.c Thu Mar 18 04:12:24 2010 +0200 @@ -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 @@ 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 @@ 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) {