bug-gnulib
[Top][All Lists]
Advanced

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

Re: add limited support for Solaris 10 ZFS-style ACLs to gnulib


From: Eric Blake
Subject: Re: add limited support for Solaris 10 ZFS-style ACLs to gnulib
Date: Sun, 25 Mar 2007 17:25:41 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.4.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 3/25/2007 8:24 AM:
> Paul Eggert wrote:
>> Index: lib/acl-internal.h
>> ===================================================================
>> RCS file: lib/acl-internal.h
>> diff -N lib/acl-internal.h
>> --- /dev/null        1 Jan 1970 00:00:00 -0000
>> +++ lib/acl-internal.h       19 Mar 2007 21:58:54 -0000
>> @@ -0,0 +1,90 @@
> ...
>> +#include <config.h>
> 
> This .h file does not need to include <config.h>, since the three users of
> this file (acl.c, acl_entries.c, file-has-acl.c) already include it.

In general, ALL gnulib .h files should assume that <config.h> was
previously included.

How about this patch, which also fixes one other ACL issue?  A long time
ago [1], it was pointed out that cygwin fails acl() with EBUSY when a file
is locked (stat() likewise fails, due to Windows annoying insistence that
you cannot query a file's metadata when it is locked).  I have been
including a variant of this patch in all cygwin versions of coreutils for
the past year and a half.

[1] http://lists.gnu.org/archive/html/bug-coreutils/2005-06/msg00191.html

Oh, and my comment later in that thread ("Any script that tries to parse
ls output is inherently non-portable to begin with.") still holds - I am
awaiting a review for this automake patch to fix mdate-sh, since it bit me
when trying to generate the M4 1.4.9 manual under cygwin [2].  gnulib
still syncs its version of build-aux/mdate-sh from automake.

[2] http://lists.gnu.org/archive/html/automake-patches/2007-03/msg00001.html

2007-03-25  Eric Blake  <address@hidden>

        * lib/acl-internal.h: Remove redundant include.
        (ACL_NOT_WELL_SUPPORTED): Also filter on EBUSY, returned by
        Cygwin when a file is locked.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGBwT184KuGfSFAYARAoJ7AJ9wdUq/2eL8lvTrxv7eK2uk69H//QCgxHMk
pRNrU35DW0Zh+xKvyiBnEdU=
=sUF6
-----END PGP SIGNATURE-----
diff --git a/ChangeLog b/ChangeLog
index 4306d1e..9eb7553 100644
diff --git a/lib/acl-internal.h b/lib/acl-internal.h
index e224a78..f92e7af 100644
--- a/lib/acl-internal.h
+++ b/lib/acl-internal.h
@@ -18,8 +18,6 @@
 
    Written by Paul Eggert and Andreas Gruenbacher.  */
 
-#include <config.h>
-
 #include "acl.h"
 
 #include <stdbool.h>
@@ -77,7 +75,8 @@
 #endif
 
 #define ACL_NOT_WELL_SUPPORTED(Errno) \
-  ((Errno) == ENOTSUP || (Errno) == ENOSYS || (Errno) == EINVAL)
+  ((Errno) == ENOTSUP || (Errno) == ENOSYS || (Errno) == EINVAL \
+   || (Errno) == EBUSY)
 
 /* Define a replacement for acl_entries if needed.  */
 #if USE_ACL && HAVE_ACL_GET_FILE && HAVE_ACL_FREE && !HAVE_ACL_ENTRIES

reply via email to

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