acl: add support for OSF/1 5.1

2008-05-22 Thread Bruno Haible
Jim, This proposed patch fixes the copy-file testsuite failures on Tru64. Three problems had to be handled: - The ACL related functions are in libpacl.a, not in libacl as on Linux. - The acl_get_fd and acl_set_fd functions conform to an older draft (draft 13) of the abandoned POSIX spec. T

acl: add support for MacOS X 10.5

2008-05-22 Thread Bruno Haible
Hi Jim, Here comes the reworked patch for MacOS X 10.5 support in copy_acl, used by the 'copy-file' module. With it, now the test passes on MacOS X 10.5, and of course still passes on Linux and FreeBSD. The main difficulty here was to realize that in MacOS X, unlike many other flavors of ACLs, an

Re: acl: split off copy-file.c

2008-05-22 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Hi Jim (and Paul, if you are still listening), > > I'm starting to fix the 6 portability problems of the 'acl' module. > > First of all, since there will be more ifdefs > - to distinguish some of the Linux, FreeBSD, MacOS X, IRIX, Tru64, Cygwin > plat

Re: acl: move platform dependent code to acl-internal.h

2008-05-22 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > There is an abstraction violation in lib/acl.h: While the functions declared > in this file have a platform independent API, and coreutils (copy.c, cp.c, > ls.c) > uses only this platform independent API, it also includes part of the platform > dependent i

Re: memcmp-tests module

2008-05-22 Thread Ben Pfaff
Eric Blake <[EMAIL PROTECTED]> writes: > I think that it is a bug to attach the nonnull attribute to > memcmp parameters (for the very reason that a compare of 0 > bytes should not dereference the pointer, so passing NULL is > not necessarily a bug). I am not sure that passing a null pointer to m

acl: move platform dependent code to acl-internal.h

2008-05-22 Thread Bruno Haible
Hi Jim, There is an abstraction violation in lib/acl.h: While the functions declared in this file have a platform independent API, and coreutils (copy.c, cp.c, ls.c) uses only this platform independent API, it also includes part of the platform dependent include files: (on Linux, this is not all

acl: split off copy-file.c

2008-05-22 Thread Bruno Haible
Hi Jim (and Paul, if you are still listening), I'm starting to fix the 6 portability problems of the 'acl' module. First of all, since there will be more ifdefs - to distinguish some of the Linux, FreeBSD, MacOS X, IRIX, Tru64, Cygwin platforms which have a POSIX like API, - to add suppor

ACLs: unit test and status

2008-05-22 Thread Bruno Haible
The copy_file function is supposed to copy ACLs of the file being copied, otherwise it is a security problem. (copy_file is used to create backup files. If the original file has "read" permission denied for user Schäuble, and the backup copy has this ACL lost, so that Schäuble can now read the file

Re: memcmp-tests module

2008-05-22 Thread Eric Blake
Simon Josefsson josefsson.org> writes: > > It's good habit to include the tests from the autoconf macro also in the test > > suite (to verify that the autoconf macro actually did its job). So I added this: > > > > > > 2008-05-20 Bruno Haible clisp.org> > > > > * tests/test-memcmp.c (main