diff options
author | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2018-11-01 00:18:45 +0000 |
---|---|---|
committer | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2018-11-01 00:18:45 +0000 |
commit | d9c4b687773fa49c79bfbeddfe9b559a3b48cc06 (patch) | |
tree | d865892bf5acdee6e738f603e26ce85842cab0f4 /sbin | |
parent | 44350b70db3560f32688395cbd6b4af5561520b7 (diff) |
- odd condition/test in PF lexer
(and other lexers too)
This commit rectifies earlier change:
in the lex... even inside quotes, a \ followed by space or tab should
expand to space or tab, and a \ followed by newline should be ignored
(as a line continuation). compatible with the needs of hoststated
(which has the most strict quoted string requirements), and ifstated
(where one commonly does line continuations in strings).
OK deraadt@, OK millert@
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/parse.y | 5 | ||||
-rw-r--r-- | sbin/ipsecctl/parse.y | 5 | ||||
-rw-r--r-- | sbin/pfctl/parse.y | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index 112049cdc6a..be5e9657585 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.75 2018/07/11 07:39:22 krw Exp $ */ +/* $OpenBSD: parse.y,v 1.76 2018/11/01 00:18:44 sashan Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -1385,7 +1385,8 @@ top: } else if (c == '\\') { if ((next = lgetc(quotec)) == EOF) return (0); - if (next == quotec || c == ' ' || c == '\t') + if (next == quotec || next == ' ' || + next == '\t') c = next; else if (next == '\n') { file->lineno++; diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index 4b8f84704cc..b3a8a04f11d 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.173 2018/07/11 07:39:22 krw Exp $ */ +/* $OpenBSD: parse.y,v 1.174 2018/11/01 00:18:44 sashan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1182,7 +1182,8 @@ top: } else if (c == '\\') { if ((next = lgetc(quotec)) == EOF) return (0); - if (next == quotec || c == ' ' || c == '\t') + if (next == quotec || next == ' ' || + next == '\t') c = next; else if (next == '\n') { file->lineno++; diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 0791c9c01d7..f9024d27153 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.684 2018/09/16 02:44:06 millert Exp $ */ +/* $OpenBSD: parse.y,v 1.685 2018/11/01 00:18:44 sashan Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -5279,7 +5279,8 @@ top: } else if (c == '\\') { if ((next = lgetc(quotec)) == EOF) return (0); - if (next == quotec || c == ' ' || c == '\t') + if (next == quotec || next == ' ' || + next == '\t') c = next; else if (next == '\n') { file->lineno++; |