summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2016-08-23 03:22:50 +0000
committerDamien Miller <djm@cvs.openbsd.org>2016-08-23 03:22:50 +0000
commit0eec2fff803723ce89b4ed0989418607f983ff19 (patch)
treecdd65b20ddf52e899f253bc2407e4a26197718ec /usr.bin
parented562db15c9910f8309f4bbeadec39bdfb53079e (diff)
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@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/match.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/match.c b/usr.bin/ssh/match.c
index cf4b2f4e03e..1f0b018c788 100644
--- a/usr.bin/ssh/match.c
+++ b/usr.bin/ssh/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
@@ -156,7 +156,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;
}
/*