[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: failed test for coreutils-5.2.1 rm fail-eperm on parc-sun-solaris2.9
From: |
Paul Eggert |
Subject: |
Re: failed test for coreutils-5.2.1 rm fail-eperm on parc-sun-solaris2.9 |
Date: |
Sun, 19 Sep 2004 00:20:21 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
Bert Fischer <address@hidden> writes:
> After some iterations I had to run `touch /tmp/.aaa; chmod og+w
> /tmp/.aaa' as root and then run the test as a non-priveleged user to
> reproduce the result.
Thanks for checking into this. With your help I managed to understand
the bug; I now know what you mean by a "non-POSIX system call".
Apparently Solaris follows the SVR4 tradition and lets you remove any
writable file in a sticky directory, whereas Linux, BSD, etc. follow
the BSD tradition, which does not let you remove a file in a sticky
directory merely because the file is writable. POSIX 1003.1-2004
specifies the BSD behavior but Solaris doesn't claim conformance to
this recent edition of POSIX.
Perhaps the bug will be fixed in Solaris 10? I think it's supposed to
claim conformance to POSIX 1003.1-2001, and I think that's the same as
POSIX-2004 here.
Anyway, I installed the following coreutils patch. Can you please try
it on your host? I was still unable to reproduce the problem on my
Solaris host, perhaps due to my own userid pattern. Thanks.
2004-09-19 Paul Eggert <address@hidden>
* tests/rm/fail-eperm: Don't try to remove writable files in a
sticky /tmp directory, as SVR4-like systems (e.g., Solaris 9) let
you remove such files. Problem reported by Bert Fischer in:
http://lists.gnu.org/archive/html/bug-coreutils/2004-09/msg00074.html
Index: tests/rm/fail-eperm
===================================================================
RCS file: /home/eggert/coreutils/cu/tests/rm/fail-eperm,v
retrieving revision 1.14
retrieving revision 1.15
diff -p -u -r1.14 -r1.15
--- tests/rm/fail-eperm 19 Jul 2003 12:00:38 -0000 1.14
+++ tests/rm/fail-eperm 19 Sep 2004 07:11:16 -0000 1.15
@@ -60,7 +60,9 @@ foreach my $dir (@dir_list)
# Skip files owned by self, symlinks, and directories.
# It's not technically necessary to skip symlinks, but it's simpler.
- -l $target_file || -o _ || -d _
+ # SVR4-like systems (e.g., Solaris 9) let you unlink files that
+ # you can write, so skip writable files too.
+ -l $target_file || -o _ || -d _ || -w _
and next;
$found_file = 1;