Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/bin/sh
Module Name: src
Committed By: kre
Date: Mon Oct 14 08:13:23 UTC 2024
Modified Files:
src/bin/sh: Makefile
Log Message:
Reject nul characters in shell input.
At the request of Thomas Klausner (wiz@) copy an idea from OpenBSD,
and have the shell simply reject any (sh) input containing a \0 (nul)
character. Previously nul characters were simply ignored (removed
from the input before it was examined in any other way).
Note this affects data read by the shell itself only, and has no
impact on other utilities, including those that are built into
the shell (so 'read' can still use -d '' to process output using
\0 as the record separator).
While I have tested that this works, there are so many places
where a nul might appear, that I cannot possibly test them all
(or even imagine all the possible places), so if this change
causes any problems, let me know (if from a script, send me the
script).
To undo this change, simply comment out (or delete) the line
CPPFLAGS+= -DREJECT_NULS
from the Makefile, and build again. Eventually if this causes
no problems, that option (conditional compilation) will probably
just go away, and this change would be permanent.
While the conditional compilation (on or off) persists, the
NETBSD_SHELL variable value will contain the word REJECT_NULLS
so you can easily verify if you are running a shell with this
included or not.
No pullups planned.
To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/bin/sh/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index