Re: acl: trivial simplification

2008-06-08 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: Still about POSIX-draft like ACLs. Now that the ACL triviality test has been moved into a function 'acl_access_nontrivial', the code that uses it can be simplified: coalesce two 'if' branches together. Then exploit the fact that chmod_or_fchmod has already

Re: acl: simplification

2008-06-08 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: In the MacOS X case, we need to create an empty acl_t object. This simplifies the code for doing that, so that we don't need to know about the (very platform dependent) textual representation. 2008-06-07 Bruno Haible [EMAIL PROTECTED] *

Re: acl: fix memory leak

2008-06-08 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: This fixes a memory leak in the MacOS X specific code that I introduced on 2008-05-22. 2008-06-07 Bruno Haible [EMAIL PROTECTED] Fix memory leak introduced on 2008-05-22. * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Free ACLs after

Re: acl: improve support for Tru64

2008-06-08 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: On OSF/1, trying to retrieve the AC_TYPE_DEFAULT ACL always returns NULL with unset errno (errno = 0 in my case). Since our code is not prepared for this, it's best to just disable this call. 2008-06-07 Bruno Haible [EMAIL PROTECTED] Improve

Re: acl: finish support for MacOS X

2008-06-08 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: On MacOS X the testsuite still fails: ... Please review (although I commit it immediately, because more patches are coming.) ... + if (ret != 0) +{ + int saved_errno = errno; + + if (ACL_NOT_WELL_SUPPORTED (errno) !(acl_entries (acl)

Re: acl: trivial simplification

2008-06-08 Thread Bruno Haible
exploit the fact that chmod_or_fchmod has already the right return value convention. More simplifications of the same kind: 2008-06-08 Bruno Haible [EMAIL PROTECTED] * lib/set-mode-acl.c (qset_acl): Trivial code simplifications. *** lib/set-mode-acl.c.orig 2008-06-08

Re: acl: finish support for MacOS X

2008-06-08 Thread Bruno Haible
Jim Meyering wrote: + if (ret != 0) +{ + int saved_errno = errno; + + if (ACL_NOT_WELL_SUPPORTED (errno) !(acl_entries (acl) 0)) +{ Why use the negation? That's for analogy with the Linux/FreeBSD/... code a couple of lines above. The acl_entries (acl) 0

acl: add Solaris and Cygwin support

2008-06-08 Thread Bruno Haible
So far, the test results on Solaris and Cygwin are: Solaris 10: PASS: test-file-has-acl.sh PASS: test-set-mode-acl.sh files tmpfile0 and tmpfile2 have different number of ACLs: 5 and 4 FAIL: test-copy-acl.sh Cygwin: PASS: test-file-has-acl.sh PASS: test-set-mode-acl.sh files

acl: fix Solaris 10+ code

2008-06-08 Thread Bruno Haible
I said, I don't touch Paul Eggert's code for Solaris 10+/11 systems. But here it is buggy: The POSIX-draft like code contains special handling for setuid/setgid modes (because the ACL contains only the 0777 part of the mode). But it is missing in the Solaris 10+/11 code. I'm committing this.

acl: finish Cygwin support

2008-06-08 Thread Bruno Haible
On Cygwin, two files with the same ACL can have different mode: $ ls -l tmpfile1 -rwxr-x--- 1 haible None 14 Jun 2 22:06 tmpfile1 $ getfacl.exe tmpfile1 # file: tmpfile1 # owner: haible # group: None user::rw- group::r-x mask:rwx other:--- $ echo foo tmpfile2 $ chmod 650 tmpfile2 $ getfacl.exe

acl: add support for HP-UX ACLs

2008-06-08 Thread Bruno Haible
So far, the tests fail on HP-UX 11: file_has_acl(tmpfile0) returned no, expected yes FAIL: test-file-has-acl.sh PASS: test-set-mode-acl.sh files tmpfile0 and tmpfile2 have different number of ACLs: 4 and 3 FAIL: test-copy-acl.sh The HP-UX ACL API is similar to the one of Solaris 7-9.

acl: add support for AIX

2008-06-08 Thread Bruno Haible
The acl tests still fail on AIX 5.1: file_has_acl(tmpfile0) returned no, expected yes FAIL: test-file-has-acl.sh PASS: test-set-mode-acl.sh files tmpfile0 and tmpfile2 have different access modes: 200500600 and 500600 FAIL: test-copy-acl.sh There are two ACL APIs: one in AIX = 5.3, one

acl: request for testing

2008-06-08 Thread Bruno Haible
Hi all, So far, I'm done with the 'acl' module changes. Jim, for coreutils an appropriate NEWS entry is: Improved support for access control lists (ACLs): On MacOS X, Solaris 7..10, HP-UX 11, Tru64, AIX, IRIX 6.5, and Cygwin, ls -l now displays the presence of an ACL on a file through a

MacOS problem with checking whether strcasestr works in linear time

2008-06-08 Thread Ian Beckwith
Hi, I received a report that the gnulib checking whether strcasestr works in linear time configure test on MacOS hangs for 3 to 4 hours before completing. Presumably this means the alarm() call in the test doesn't work. The version of gnuit with the problem is at:

Re: MacOS problem with checking whether strcasestr works in linear time

2008-06-08 Thread Bruno Haible
Ian Beckwith wrote: I received a report that the gnulib checking whether strcasestr works in linear time configure test on MacOS hangs for 3 to 4 hours before completing. Presumably this means the alarm() call in the test doesn't work. Presumably, yes... The version of gnuit with the

Re: MacOS problem with checking whether strcasestr works in linear time

2008-06-08 Thread Ian Beckwith
On Mon, Jun 09, 2008 at 12:42:18AM +0200, Bruno Haible wrote: On which MacOS X version was this? It configures fine and quickly for me on MacOS X 10.3.9 and 10.5.2. Erm, don't know, I'll ask. In case you can map kernel versions to MacOS versions, config.log says: uname -v = Darwin Kernel