diff options
-rw-r--r-- | sbin/iked/parse.y | 10 | ||||
-rw-r--r-- | sbin/ipsecctl/parse.y | 10 | ||||
-rw-r--r-- | sbin/pfctl/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/bgpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/dvmrpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/eigrpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/hostapd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/httpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ifstated/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/iscsictl/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ldapd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ldpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ospf6d/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ospfd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/relayd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ripd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/smtpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/snmpd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/vmd/parse.y | 10 | ||||
-rw-r--r-- | usr.sbin/ypldap/parse.y | 10 |
20 files changed, 180 insertions, 20 deletions
diff --git a/sbin/iked/parse.y b/sbin/iked/parse.y index 958e51ae235..db438642f0d 100644 --- a/sbin/iked/parse.y +++ b/sbin/iked/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.54 2015/12/09 21:41:49 naddy Exp $ */ +/* $OpenBSD: parse.y,v 1.55 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2010-2013 Reyk Floeter <reyk@openbsd.org> @@ -1005,7 +1005,15 @@ string : string STRING varset : STRING '=' string { + char *s = $1; log_debug("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) err(1, "cannot store variable"); free($1); diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index fe9cee04211..4bfc1deb51b 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.164 2015/12/09 21:41:50 naddy Exp $ */ +/* $OpenBSD: parse.y,v 1.165 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -881,8 +881,16 @@ string : string STRING varset : STRING '=' string { + char *s = $1; if (ipsec->opts & IPSECCTL_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) err(1, "cannot store variable"); free($1); diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 776eb12abda..e03b0037d0c 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.651 2016/06/21 13:40:43 benno Exp $ */ +/* $OpenBSD: parse.y,v 1.652 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2001 Markus Friedl. All rights reserved. @@ -712,8 +712,16 @@ numberstring : NUMBER { ; varset : STRING '=' varstring { + char *s = $1; if (pf->opts & PF_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) err(1, "cannot store variable %s", $1); free($1); diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index e7fd5e1aaa6..44edc3102fc 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.287 2016/06/03 17:36:37 benno Exp $ */ +/* $OpenBSD: parse.y,v 1.288 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -337,8 +337,16 @@ yesno : STRING { ; varset : STRING '=' string { + char *s = $1; if (cmd_opts & BGPD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/dvmrpd/parse.y b/usr.sbin/dvmrpd/parse.y index 66b7b73d157..e78843fec8f 100644 --- a/usr.sbin/dvmrpd/parse.y +++ b/usr.sbin/dvmrpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.29 2014/11/20 05:51:20 jsg Exp $ */ +/* $OpenBSD: parse.y,v 1.30 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2004, 2005, 2006 Esben Norby <norby@openbsd.org> @@ -163,8 +163,16 @@ yesno : STRING { ; varset : STRING '=' string { + char *s = $1; if (conf->opts & DVMRPD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/eigrpd/parse.y b/usr.sbin/eigrpd/parse.y index 02e010f9a91..f020df185d1 100644 --- a/usr.sbin/eigrpd/parse.y +++ b/usr.sbin/eigrpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.15 2016/06/05 03:36:41 renato Exp $ */ +/* $OpenBSD: parse.y,v 1.16 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2015 Renato Westphal <renato@openbsd.org> @@ -197,8 +197,16 @@ eigrp_af : IPV4 { $$ = AF_INET; } ; varset : STRING '=' string { + char *s = $1; if (global.cmd_opts & EIGRPD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/hostapd/parse.y b/usr.sbin/hostapd/parse.y index c6a8beb4588..662f2bcf29d 100644 --- a/usr.sbin/hostapd/parse.y +++ b/usr.sbin/hostapd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.50 2015/08/20 22:39:29 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.51 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2004, 2005, 2006 Reyk Floeter <reyk@openbsd.org> @@ -971,6 +971,14 @@ string : string STRING varset : STRING '=' string { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) hostapd_fatal("cannot store variable"); free($1); diff --git a/usr.sbin/httpd/parse.y b/usr.sbin/httpd/parse.y index 080f3192511..2995f8908fd 100644 --- a/usr.sbin/httpd/parse.y +++ b/usr.sbin/httpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.77 2015/11/22 13:27:13 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.78 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2007 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -171,6 +171,14 @@ include : INCLUDE STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y index 5679164727f..c716546c96f 100644 --- a/usr.sbin/ifstated/parse.y +++ b/usr.sbin/ifstated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.37 2016/01/29 02:22:57 mmcc Exp $ */ +/* $OpenBSD: parse.y,v 1.38 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org> @@ -142,8 +142,16 @@ string : string STRING { ; varset : STRING '=' string { + char *s = $1; if (conf->opts & IFSD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) { free($1); free($3); diff --git a/usr.sbin/iscsictl/parse.y b/usr.sbin/iscsictl/parse.y index b39b2e14906..efb0fbecf8e 100644 --- a/usr.sbin/iscsictl/parse.y +++ b/usr.sbin/iscsictl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.7 2014/11/20 05:51:20 jsg Exp $ */ +/* $OpenBSD: parse.y,v 1.8 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2010 David Gwynne <dlg@openbsd.org> @@ -155,6 +155,14 @@ string : string STRING { ; varset : STRING '=' string { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) err(1, "cannot store variable"); free($1); diff --git a/usr.sbin/ldapd/parse.y b/usr.sbin/ldapd/parse.y index aec1d12ab28..77ba1cd71da 100644 --- a/usr.sbin/ldapd/parse.y +++ b/usr.sbin/ldapd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.17 2016/05/01 00:32:37 jmatthew Exp $ */ +/* $OpenBSD: parse.y,v 1.18 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2009, 2010 Martin Hedenfalk <martinh@openbsd.org> @@ -359,6 +359,14 @@ include : INCLUDE STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/ldpd/parse.y b/usr.sbin/ldpd/parse.y index d332b9ea7f1..4ba0249eaa0 100644 --- a/usr.sbin/ldpd/parse.y +++ b/usr.sbin/ldpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.55 2016/06/18 01:33:02 renato Exp $ */ +/* $OpenBSD: parse.y,v 1.56 2016/06/21 21:35:24 benno Exp $ */ /* * Copyright (c) 2013, 2015, 2016 Renato Westphal <renato@openbsd.org> @@ -208,8 +208,16 @@ pw_type : ETHERNET { $$ = PW_TYPE_ETHERNET; } ; varset : STRING '=' string { + char *s = $1; if (global.cmd_opts & LDPD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/ospf6d/parse.y b/usr.sbin/ospf6d/parse.y index 70e7d3eeb30..f6303d19f64 100644 --- a/usr.sbin/ospf6d/parse.y +++ b/usr.sbin/ospf6d/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.27 2014/11/20 05:51:20 jsg Exp $ */ +/* $OpenBSD: parse.y,v 1.28 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -179,8 +179,16 @@ no : /* empty */ { $$ = 0; } | NO { $$ = 1; } varset : STRING '=' string { + char *s = $1; if (conf->opts & OSPFD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/ospfd/parse.y b/usr.sbin/ospfd/parse.y index 9b886ad1851..f617e5c124f 100644 --- a/usr.sbin/ospfd/parse.y +++ b/usr.sbin/ospfd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.80 2015/12/05 12:20:13 claudio Exp $ */ +/* $OpenBSD: parse.y,v 1.81 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -195,8 +195,16 @@ msec : MSEC NUMBER { ; varset : STRING '=' string { + char *s = $1; if (conf->opts & OSPFD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index a6bf3908f3c..7e9afb8d6ad 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.206 2015/11/22 13:27:13 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.207 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org> @@ -349,6 +349,14 @@ port : PORT STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y index ddaca1377d6..4851038429f 100644 --- a/usr.sbin/ripd/parse.y +++ b/usr.sbin/ripd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.34 2014/11/20 05:51:20 jsg Exp $ */ +/* $OpenBSD: parse.y,v 1.35 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -147,8 +147,16 @@ no : /* empty */ { $$ = 0; } | NO { $$ = 1; } varset : STRING '=' string { + char *s = $1; if (conf->opts & RIPD_OPT_VERBOSE) printf("%s = \"%s\"\n", $1, $3); + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index ab0271920ec..d4c0fcbc1b7 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.184 2016/04/21 14:27:41 jsing Exp $ */ +/* $OpenBSD: parse.y,v 1.185 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -213,6 +213,14 @@ include : INCLUDE STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y index 5e288eee9a0..8ad6fcc46b5 100644 --- a/usr.sbin/snmpd/parse.y +++ b/usr.sbin/snmpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.38 2015/11/22 13:27:13 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.39 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -165,6 +165,14 @@ include : INCLUDE STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); diff --git a/usr.sbin/vmd/parse.y b/usr.sbin/vmd/parse.y index 23cea73bb32..f7fece01b15 100644 --- a/usr.sbin/vmd/parse.y +++ b/usr.sbin/vmd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.6 2016/03/13 13:11:47 stefan Exp $ */ +/* $OpenBSD: parse.y,v 1.7 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2007-2015 Reyk Floeter <reyk@openbsd.org> @@ -129,6 +129,14 @@ include : INCLUDE string { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatalx("cannot store variable"); free($1); diff --git a/usr.sbin/ypldap/parse.y b/usr.sbin/ypldap/parse.y index 39be6965362..2dbeb973e13 100644 --- a/usr.sbin/ypldap/parse.y +++ b/usr.sbin/ypldap/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.18 2015/01/16 06:40:22 deraadt Exp $ */ +/* $OpenBSD: parse.y,v 1.19 2016/06/21 21:35:25 benno Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -142,6 +142,14 @@ include : INCLUDE STRING { ; varset : STRING '=' STRING { + char *s = $1; + while (*s++) { + if (isspace((unsigned char)*s)) { + yyerror("macro name cannot contain " + "whitespace"); + YYERROR; + } + } if (symset($1, $3, 0) == -1) fatal("cannot store variable"); free($1); |