]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
config: Added support for protocol !name {}
authorTimo Sirainen <tss@iki.fi>
Thu, 28 Jan 2010 21:14:52 +0000 (23:14 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 28 Jan 2010 21:14:52 +0000 (23:14 +0200)
--HG--
branch : HEAD

src/config/config-filter.c

index 5b05f710cfba94bbfc0ce3000830efa1a518ddbf..b63dbf5a146c61016abd0acc45e5e95067635dab 100644 (file)
@@ -17,8 +17,14 @@ bool config_filter_match(const struct config_filter *mask,
        if (mask->service != NULL) {
                if (filter->service == NULL)
                        return FALSE;
-               if (strcmp(filter->service, mask->service) != 0)
-                       return FALSE;
+               if (mask->service[0] == '!') {
+                       /* not service */
+                       if (strcmp(filter->service, mask->service + 1) == 0)
+                               return FALSE;
+               } else {
+                       if (strcmp(filter->service, mask->service) != 0)
+                               return FALSE;
+               }
        }
        if (mask->local_host != NULL) {
                if (filter->local_host == NULL)