1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

Make sure we can change the group of inaccessible files.

This commit is contained in:
Paul Eggert
2006-01-03 06:20:25 +00:00
parent 7126eb3216
commit f6f906808d
2 changed files with 18 additions and 0 deletions

View File

@@ -74,8 +74,15 @@ test "$VERBOSE" = yes && set +x
chgrp -R $g2 symlink
chown --from=:$g1 -c :$g2 f
# Make sure we can change the group of inaccessible files.
chmod a-r f
chown --from=:$g2 -c :$g1 f
chmod 0 f
chown --from=:$g1 -c :$g2 f
# chown() must not be optimized away even when
# the file's owner and group already have the desired value.
rm -f f g
touch f g
chgrp $g1 f g
chgrp $g2 g
@@ -115,6 +122,8 @@ changed ownership of `f' to :G2
changed group of `symlink' to G1
changed ownership of `f' to :G2
changed ownership of `f' to :G2
changed ownership of `f' to :G1
changed ownership of `f' to :G2
f
g
EOF