DragonFly bugs List (threaded) for 2009-07
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
[issue1341] [PATCH]: printenv(1): don't allow '=' in name
Stathis Kamperis <ekamperi@gmail.com> added the comment:
I am going to push this tomorrow or the day after, unless someone objects.
Just for the record, I have filed a PR in NetBSD bug database as well and they
fixed it differently:
. ..
if (argc != 1)
usage();
if (strchr(*argv, '=') != NULL)
errx(1, "Invalid environment variable %s", *argv);
len = strlen(*argv);
for (ep = environ; *ep; ep++)
. ..
POSIX says that env vars shouldn't contain an '=' sign and functions as
setenv(3) fail with EINVAL if the supplied name contains an equal sign.
Cheers,
Stathis
_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1341>
_____________________________________________________
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]