dovecot-2.0: doveadm who: Use wildcards for user matching.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Mar 18 04:12:27 EET 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/819fbb179cbc
changeset: 10942:819fbb179cbc
user: Timo Sirainen <tss at iki.fi>
date: Thu Mar 18 04:12:24 2010 +0200
description:
doveadm who: Use wildcards for user matching.
diffstat:
src/doveadm/doveadm-who.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (29 lines):
diff -r f7d14405de09 -r 819fbb179cbc src/doveadm/doveadm-who.c
--- 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) {
More information about the dovecot-cvs
mailing list