summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-08-23 03:22:49 +0000
committerDamien Miller <djm@mindrot.org>2016-08-23 14:29:07 +1000
commit4067ec8a4c64ccf16250c35ff577b4422767da64 (patch)
tree37e7d9420ca322b4efe714e6aa3208dae7e82bf0 /match.c
parent83b581862a1dbb06fc859959f829dde2654aef3c (diff)
upstream commit
fix matching for pattern lists that contain a single negated match, e.g. "Host !example" report and patch from Robin Becker. bz#1918 ok dtucker@ Upstream-ID: 05a0cb323ea4bc20e98db099b42c067bfb9ea1ea
Diffstat (limited to 'match.c')
-rw-r--r--match.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/match.c b/match.c
index 913b6bae..fd784ff1 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: match.c,v 1.30 2015/05/04 06:10:48 djm Exp $ */
+/* $OpenBSD: match.c,v 1.31 2016/08/23 03:22:49 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -158,7 +158,8 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
return -1; /* Negative */
else
got_positive = 1; /* Positive */
- }
+ } else if (negated)
+ got_positive = 1;
}
/*