bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-6.9 build/check-root: test/rm failed on no-give-up


From: anirkko
Subject: Re: coreutils-6.9 build/check-root: test/rm failed on no-give-up
Date: Thu, 3 May 2007 12:13:28 +0200 (MET DST)

> > FAIL: no-give-up
> 
> Thanks for reporting that.
> That test is failing because the setuidgid command
> is supposed to fail to remove "d", but it actually does
> remove the directory.
> 
> Please change that test so it uses these two setuidgid commands
> instead of the one it currently has:
> 
> setuidgid $NON_ROOT_USERNAME env PATH="$PATH" id -a
> setuidgid $NON_ROOT_USERNAME env PATH="$PATH" truss -o /tmp/rm-log rm -rf d 
> && fail=1
> 
> Then, the output from "id -a" might tell if setuidgid is doing its job.
> There's an off-chance that the syscalls in /tmp/rm-log may tell
> us what's happening.
> 

Unpacked the coreutils-6.9 archive, pretty sure now that there
is nothing disturbing in the paths, reconfigured, 'gmake' and
'gmake check' again: again same 2 errors as already reported
(tests/ls/color-dtype-dir as non-root, and tests/rm/no-give-up
as root).

Made your modification, re-run the tests (this time no recompiling
of the src tree occurred): now the output in /tmp/rm-log shows
that rm wrongly exits with _exit(0) because of success in removal
of d.

Hope this helps.
Arto

contents of /tmp/rm-log:
------------------------
execve("/build/coreutils-6.9_static-obj9_g412-b2175020070420-O3-mcpu=supersparc/tests/rm/../../src/rm",
 0xEFFFF678, 0xEFFFF688)  argc = 3
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
open("/var/ld/ld.config", O_RDONLY)             Err#2 ENOENT
open("/usr/lib/libc.so.1", O_RDONLY)            = 4
fstat(4, 0xEFFFECF4)                            = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x6FFB0000
mmap(0x00000000, 712704, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x6FE80000
mmap(0x6FF24000, 30500, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 
4, 606208) = 0x6FF24000
open("/dev/zero", O_RDONLY)                     = 5
mmap(0x6FF2C000, 4408, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 
5, 0) = 0x6FF2C000
munmap(0x6FF16000, 57344)                       = 0
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE, 5, 0) = 
0x6FFA0000
memcntl(0x6FE80000, 101964, MC_ADVISE, 0x0003, 0, 0) = 0
close(4)                                        = 0
open("/usr/lib/libdl.so.1", O_RDONLY)           = 4
fstat(4, 0xEFFFECF4)                            = 0
mmap(0x6FFB0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 4, 0) = 
0x6FFB0000
close(4)                                        = 0
open("/usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1", O_RDONLY) = 4
fstat(4, 0xEFFFEB54)                            = 0
mmap(0x00000000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x6FF90000
mmap(0x00000000, 16384, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) = 0x6FF80000
close(4)                                        = 0
close(5)                                        = 0
munmap(0x6FF90000, 8192)                        = 0
ioctl(0, TCGETA, 0xEFFFF48C)                    = 0
lstat64("/", 0xEFFFF3F8)                        = 0
brk(0x0002BF98)                                 = 0
brk(0x0002DF98)                                 = 0
brk(0x0002DF98)                                 = 0
brk(0x0002FF98)                                 = 0
lstat64("d", 0xEFFFF380)                        = 0
getuid()                                        = 60001 [60001]
open64("d", O_RDONLY|O_NONBLOCK|O_NOCTTY)       = 4
fstat64(4, 0xEFFFF380)                          = 0
open64("/proc/self/fd", O_RDONLY)               = 5
stat64("/proc/self/fd/5/..", 0xEFFFED80)        = 0
stat64("/proc/self", 0xEFFFEE18)                = 0
close(5)                                        = 0
open64("/proc/self/fd/4/.", O_RDONLY|O_NDELAY)  = 5
fcntl(5, F_SETFD, 0x00000001)                   = 0
fstat64(5, 0xEFFFEE48)                          = 0
close(4)                                        = 0
fstat64(5, 0xEFFFF0A8)                          = 0
getdents64(5, 0x0002F048, 1048)                 = 72
unlink("/proc/self/fd/5/f")                     Err#89 ENOSYS
open64(".", O_RDONLY)                           = 4
fchdir(5)                                       = 0
unlink("f")                                     = 0
fchdir(4)                                       = 0
close(4)                                        = 0
getdents64(5, 0x0002F048, 1048)                 = 0
fcntl(5, F_GETFD, 0x0002F08A)                   = 1
close(5)                                        = 0
rmdir("d")                                      = 0
close(1)                                        = 0
close(2)                                        = 0
llseek(0, 0, SEEK_CUR)                          = 3218527
_exit(0)




reply via email to

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