Mike Frysinger wrote: > running as root i see these test failures: > cp: preserve-gid
Thanks for doing this testing. [...trimmed log...] > FAIL: preserve-gid.log (exit: 1) > + cp --version > cp (GNU coreutils) 6.9.90 > + nameless_uid=1000 > + nameless_gid1=1000 > + nameless_gid2=1017 > + chown +1000 . > + echo c1 > + chown +0:+1017 c1 > + setuidgid -g 1000,1017 1000 cp -p c1 b Try this: mkdir preserve-gid-testdir cd preserve-gid-testdir chown +1000 . echo c1 > c1 chown +0:+1017 c1 At that point you should have a directory and a file that looks like this, with a different group: ls -ld . c1 drwxrwxr-x 2 1000 bob 4096 2007-12-03 00:26 . -rw-r--r-- 1 root 1017 3 2007-12-03 00:23 c1 Then the test that is failing: env PATH=/path/to/coreutils/src:$PATH setuidgid -g 1000,1017 1000 cp -p c1 b What does that do for you? The log shows this as the problem: > ++ stat -c '%u %g' b > + s='1000 1000' > + test 'x1000 1000' '!=' 'x1000 1017' It should show this: stat -c '%u %g' b 1000 1017 The group is not getting copied. This is where the test is failing. > + echo './../../../tests/cp/preserve-gid: setuidgid -g 1000,1017 1000 cp -p > c1 b: 1000 1017 != 1000 1000' > ./../../../tests/cp/preserve-gid: setuidgid -g 1000,1017 1000 cp -p c1 b: > 1000 1017 != 1000 1000 > + exit 1 Can you strace it at this point? This is what I see on my system. env PATH=/path/to/coreutils/src:$PATH setuidgid -g 1001,1017 1001 strace -e fchown cp -p c1 b fchown(4, 0, 1017) = -1 EPERM (Operation not permitted) fchown(4, 4294967295, 1017) = 0 Thanks again for doing this testing. Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
