bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-5.92 - tests/cp/fail-perm fails when run as root


From: Theodoros V. Kalamatianos
Subject: Re: coreutils-5.92 - tests/cp/fail-perm fails when run as root
Date: Sun, 30 Oct 2005 15:20:05 +0200 (EET)

On Sun, 30 Oct 2005, Paul Eggert wrote:

"Theodoros V. Kalamatianos" <address@hidden> writes:

It seems that my distribution (Mandrake 10.1) in the high security
mode restricts access to /proc,

Hmmm, I just realised that my system was originally a Mandrake 10.0, but I have tweaked/modified/updated so many packages that it doesn't resemble it much. But the security system comes from version 10.0, so you might want to modify the ChangeLog entry.

Thanks for tracking that down.  Does the following patch fix things
for you?

Yeap, that fixes touch alright, so the original bug is now resolved.


But now I get a failure in tests/mkdir/p-3. I believe that this specific test should be run as a non-root user in order for the check to be valid. Otherwise the test fails since root can access everything...

Adding the following line int tests/mkdir/p-3 fixes the problem:

PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check

hence the following patch:


diff -uNr coreutils-5.92/tests/mkdir/p-3 coreutils-5.92/tests/mkdir/p-3
--- coreutils-5.92/tests/mkdir/p-3      2005-06-15 11:32:11.000000000 +0300
+++ coreutils-5.92/tests/mkdir/p-3      2005-10-30 13:47:43.000000000 +0200
@@ -8,6 +8,8 @@
   mkdir --version
 fi

+PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
+
 pwd=`pwd`
 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0



And after all of this is finished I end up with the tests/tail-2/big-4gb skipped because the new dd is unable to handle large files. After a strace on my current and the new dd I discovered the following difference:

dd 5.2.1:
.
.
.
open("big", O_RDWR|O_CREAT|O_LARGEFILE, 0666) = 1
.
.
.

but in the following trace the O_LARGEFILE flag is missing:

dd 5.92
.
.
.
open("big", O_RDWR|O_CREAT, 0666)       = 1
.
.
.

I find this quite strange, since both coreutils versions were compiled with exactly the same options...

I am checking the code right now to see what causes this...


Regargds,

Theodoros Kalamatianos




reply via email to

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