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

Fix bug where chmod, chown, and chgrp did not process operands

left-to-right in some cases.
* src/chmod.c (wd_errno): New var.
(chmod_file): New function, with most of the contents of the
old prcess_file function.
(process_files): Use it.  This gives file names to fts one
at a time, so that they are processed left-to-right as POSIX
requires.
* src/chown-core.c (wd_errno, chown_files): Likewise.
(chown_file): New function.
* tests/install/basic-1: Redo test so as to not workaround
the chmod bug, thereby testing for it.
This commit is contained in:
Paul Eggert
2006-09-18 22:09:49 +00:00
parent bebf83d0fd
commit 0e3b87195a
4 changed files with 100 additions and 22 deletions

View File

@@ -112,8 +112,7 @@ test -d xx/rel && fail=1
mkdir -p sub1/d || fail=1
(cd sub1/d && chmod a-rx .. && chmod a-r . &&
ginstall -d $abs/xx/zz rel/a rel/b 2> /dev/null) || fail=1
chmod 755 sub1 || fail=1
chmod 755 sub1/d || fail=1
chmod 755 sub1 sub1/d || fail=1
test -d xx/zz || fail=1
test -d sub1/d/rel/a || fail=1
test -d sub1/d/rel/b || fail=1