coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] kill: fix signal number to name lookup on AIX


From: Michael Felt
Subject: Re: [PATCH] kill: fix signal number to name lookup on AIX
Date: Thu, 27 Jul 2017 19:10:52 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Thunderbird/50.0

On 27/07/2017 10:22, Michael Felt wrote:
Hint: I expect the issue here is that the ln is done on a NFS server rather than "local" filesystem.

Also, not run (here) as root, so those tests were skipped here.

========================================================
   GNU coreutils 8.27.4-3c9d7: ./tests/test-suite.log
========================================================

# TOTAL: 592
# PASS:  414
# SKIP:  177
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

from ./tests/test-suite.log

FAIL: tests/ln/sf-1
===================

Ok, it looks like the test above above succeeds when on jfs2.

Running as root - a test previously skipped now fails. And it is a real bug, it seems, as the AIX cp command (/usr/bin/cp) works as expected.

Look at the commands used to create the c4 and c8 files (the directory was given mode 777 to permit the writing regardless of userid.


michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]touch c
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]chmod a=r,ug+sx c
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]su
root's Password:
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]cp -p c c1
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]chroot --skip-chdir --user=nobody src/cp -p c c2
chroot: option --skip-chdir only permitted if NEWROOT is old '/'
Try 'chroot --help' for more information.
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]chroot --skip-chdir --user=nobody / src/cp -p c c2
cp: cannot create regular file 'c2': Permission denied
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c??
ls: cannot access 'c??': No such file or directory
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]chmod 777 .
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]chroot --skip-chdir --user=nobody / src/cp -p c c2
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c2
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]su nobody -c src/cp -p c c3
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c2
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c3
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]su nobody -c /usr/bin/cp -p c c4
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c2
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c3
-r-xr-xr-- 1 nobody  felt 0 Jul 27 16:53 c4
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]

Here I exit from SU mode.

As the file c is owned by michael - not surprising that c5 has permission bits. But c2 is owned by nobody, and I would not expect those special bits to copy as michael

michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]id
uid=199(michael) gid=1954(felt) groups=1954(felt),1(staff),33(httpd),208(xdata)
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]cp -p c c5
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]src/cp -p c c6
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c2
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c3
-r-xr-xr-- 1 nobody  felt 0 Jul 27 16:53 c4
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c5
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c6
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]src/cp -p c2 c6
cp: cannot create regular file 'c6': Permission denied
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]src/cp -p c2 c7
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c2
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c3
-r-xr-xr-- 1 nobody  felt 0 Jul 27 16:53 c4
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c5
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c6
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c7
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]/usr/bin/cp -p c2 c8
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]ls -l c c?
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c1
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c2
-r-sr-sr-- 1 nobody  felt 0 Jul 27 16:53 c3
-r-xr-xr-- 1 nobody  felt 0 Jul 27 16:53 c4
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c5
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c6
-r-sr-sr-- 1 michael felt 0 Jul 27 16:53 c7
-r-xr-xr-- 1 michael felt 0 Jul 27 16:53 c8
michael@x071:[/home/michael/coreutils-8.27.4-3c9d7]

So, it seems that src/cp is still copying the file mode, regardless.




reply via email to

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