1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 03:12:48 +02:00

Ensure that /dev/full is a character device

(using test -c) as well as being writable, before trying to write to it.
Otherwise, the test could mistakenly append a newline to an existing,
regular, writable, /dev/full file.
Suggested by Ulrich Drepper.
This commit is contained in:
Jim Meyering
2001-03-09 18:03:22 +00:00
parent 3bb36380c3
commit 115c65d3f4

View File

@@ -11,7 +11,7 @@ expected_failure_status_sort=2
case "$all_programs" in
*nohup*)
if test -w /dev/full && echo > /dev/full; then
if test -w /dev/full && test -c /dev/full && echo > /dev/full; then
cat 1>&2 <<\EOF
************************************************
WARNING: On this system, the built-in echo function of /bin/sh
@@ -51,7 +51,7 @@ for i in $all_programs; do
./$i --version >/dev/null || fail=1
# Make sure they fail upon `disk full' error.
if test -w /dev/full; then
if test -w /dev/full && test -c /dev/full; then
./$i --help >/dev/full 2>/dev/null && fail=1
./$i --version >/dev/full 2>/dev/null
status=$?