bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: coreutils-6.9.90 test results for x86_64-linux-gnu


From: Bob Proulx
Subject: Re: coreutils-6.9.90 test results for x86_64-linux-gnu
Date: Mon, 3 Dec 2007 00:34:32 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]