diff options
author | deraadt <deraadt@openbsd.org> | 2007-10-16 06:06:47 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2007-10-16 06:06:47 +0000 |
commit | ea014f461f27550dc90961b90c8d5bf8808ef01d (patch) | |
tree | 5724ce9235a2bdca9c7848ea6a28aea0c8582d48 /usr.sbin/ifstated | |
parent | "script" does not belong in the lease declaration section; (diff) | |
download | wireguard-openbsd-ea014f461f27550dc90961b90c8d5bf8808ef01d.tar.xz wireguard-openbsd-ea014f461f27550dc90961b90c8d5bf8808ef01d.zip |
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).
pointed out by mpf, discussed with pyr
Diffstat (limited to 'usr.sbin/ifstated')
-rw-r--r-- | usr.sbin/ifstated/parse.y | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y index af32be14a49..7cce4e88cf0 100644 --- a/usr.sbin/ifstated/parse.y +++ b/usr.sbin/ifstated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.20 2007/10/13 16:35:21 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.21 2007/10/16 06:06:49 deraadt Exp $ */ /* * Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org> @@ -573,8 +573,10 @@ top: } else if (c == '\\') { if ((next = lgetc(quotec)) == EOF) return (0); - if (next == quotec) + if (next == quotec || c == ' ' || c == '\t') c = next; + else if (next == '\n') + continue; else lungetc(next); } else if (c == quotec) { |