freebsd-skq/bin/sh/tests/parameters
Jilles Tjoelker 7cca93e61a sh: Do not import IFS's value from the environment.
Per Austin group issue #884, always set IFS to $' \t\n'. As before, IFS will
be exported iff it was in the environment.

Most shells (e.g. bash, ksh93 and mksh) already did this. This change
improves predictability, in that scripts can simply rely on the default
value.

However, the effect on security is little, since applications should not be
calling the shell with attacker-controlled environment variable names in the
first place and other security-sensitive variables such as PATH should be
and are imported by the shell.

When using a new sh with an old (before 10.2) libc wordexp(), IFS is no
longer passed on. Otherwise, wordexp() continues to pass along IFS from the
environment per its documentation.

Discussed with:	pfg
Relnotes:	yes
2016-10-08 13:40:12 +00:00
..
env1.0
exitstatus1.0
ifs1.0 sh: Do not import IFS's value from the environment. 2016-10-08 13:40:12 +00:00
mail1.0
mail2.0
Makefile sh: Do not import IFS's value from the environment. 2016-10-08 13:40:12 +00:00
Makefile.depend DIRDEPS_BUILD: Connect MK_TESTS. 2016-03-09 22:46:01 +00:00
optind1.0
optind2.0
positional1.0
positional2.0
positional3.0
positional4.0 sh: Consistently treat ${01} like $1. 2014-07-12 10:27:30 +00:00
positional5.0 sh: Correctly handle positional parameters beyond INT_MAX on 64-bit systems. 2014-07-12 21:54:11 +00:00
positional6.0 Treat IFS separators in "$*" as quoted. 2014-10-28 22:14:31 +00:00
positional7.0 Treat IFS separators in "$*" as quoted. 2014-10-28 22:14:31 +00:00
positional8.0 sh: Fix ""$@, which should not use the special case for "$@". 2015-11-18 21:09:03 +00:00
positional9.0 sh: Add limited test for ${#@} and ${#*}. 2015-12-06 14:09:31 +00:00
pwd1.0
pwd2.0