opnsense-src/bin
Jilles Tjoelker d366e1de7f MFC r207944: sh: Fix pathname expansion with quoted slashes like *\/.
These are git commits 36f0fa8fcbc8c7b2b194addd29100fb40e73e4e9 and
d6d06ff5c2ea0fa44becc5ef4340e5f2f15073e4 in dash.

Because this is the first code I'm importing from dash to expand.c, add the
Herbert Xu copyright notice which is in dash's expand.c.

When pathname expanding *\/, the CTLESC representing the quoted state was
erroneously taken as part of the * pathname component. This CTLESC was then
seen by the pattern matching code as escaping the '\0' terminating the
string.

The code is slightly different because dash converts the CTLESC characters
to backslashes and removes all the other CTL* characters to allow
substituting glob(3).

The effect of the bug was also slightly different from dash (where nothing
matched at all). Because a CTLESC can escape a '\0' in some way, whether
files were included despite the bug depended on memory that should not be
read. In particular, on many machines /*\/ expanded to a strict subset of
what /*/ expanded to.

Example:
  echo /*"/null"

This should print /dev/null, not /*/null.

PR:		bin/146378
Obtained from:	dash
2010-05-16 22:52:51 +00:00
..
cat cat(1) compiles fine at WARNS level 6. 2009-03-16 12:16:17 +00:00
chflags Staticify internal routines. 2009-06-23 23:30:56 +00:00
chio When running a "chio return" operation using a physical source unit 2008-10-30 19:51:02 +00:00
chmod MFC r196753: 2010-01-30 14:47:23 +00:00
cp Merge r202461 from head: 2010-02-16 22:19:55 +00:00
csh MFC r198189: Check error of dlfunc(3). 2009-10-20 11:52:39 +00:00
date Don't reset DST computed by strptime() (when e.g. setting the 2008-02-07 16:04:24 +00:00
dd Bump .Dd for r187609 2009-01-30 16:23:57 +00:00
df Staticify internal routines. 2009-06-23 23:30:56 +00:00
domainname Use a standard section name. 2006-12-18 15:45:01 +00:00
echo Mark functions as __dead2 in order to help the LLVM static checker 2008-08-04 01:25:48 +00:00
ed Move WARNS as ed(1) also is only WARNS = 2 clean in the !DES case. 2007-12-09 00:14:27 +00:00
expr Fix markup. 2007-03-04 19:52:07 +00:00
getfacl MFC r196827: 2010-01-30 14:51:24 +00:00
hostname Staticify internal routines. 2009-06-23 23:30:56 +00:00
kenv o Fix a typo. Bump .Dd for the previous delta. 2009-01-13 18:25:56 +00:00
kill MFC r204308: 2010-03-04 07:08:01 +00:00
ln MFC r207189: symlink(7): Add lpathconf(2) and *at system calls. 2010-05-02 13:36:23 +00:00
ls MFC r203665: 2010-02-28 14:04:20 +00:00
mkdir More markup fixes. 2006-12-27 11:28:00 +00:00
mv MFC r196841: 2010-01-30 14:56:13 +00:00
pax Plug a memory leak. 2010-01-04 01:08:27 +00:00
pkill MFC r203688: 2010-02-18 10:46:25 +00:00
ps MFC r206548: 2010-05-11 11:22:18 +00:00
pwait MFC r199458: Add pwait utility, which waits for any process to terminate. 2009-12-23 22:59:03 +00:00
pwd Sync program's usage() with manpage's SYNOPSIS. 2005-02-09 17:37:39 +00:00
rcp Remove superfluous va_end which was left there in rev 1.38. 2008-10-28 17:15:46 +00:00
realpath Enhance realpath(1) in a number of ways: 2008-03-09 12:46:39 +00:00
rm rm, find -delete: fix removing symlinks with uchg/uappnd set. 2009-05-30 10:42:19 +00:00
rmail Remove kludges intended to support src trees with partial obj trees. 2005-06-10 06:12:53 +00:00
rmdir Fix markup. 2006-12-27 12:14:56 +00:00
setfacl MFC r201018: 2010-01-30 15:53:32 +00:00
sh MFC r207944: sh: Fix pathname expansion with quoted slashes like *\/. 2010-05-16 22:52:51 +00:00
sleep Fix a comment. 2005-08-07 09:11:38 +00:00
stty Make stty(1) use tab0 and tab3 to handle tab completion. 2008-08-23 13:28:55 +00:00
sync /*- or .\"- or #- to begin license clauses. 2005-01-10 08:39:26 +00:00
test Fix various cases with 3 or 4 parameters in test(1) to be POSIX compliant. 2009-05-26 22:33:10 +00:00
uuidgen uuidgen has been repo-copied from usr.bin/ to bin/ to match its "new" 2008-03-13 17:38:06 +00:00
Makefile MFC r199458: Add pwait utility, which waits for any process to terminate. 2009-12-23 22:59:03 +00:00
Makefile.inc Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00