bug-gnulib
[Top][All Lists]
Advanced

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

acl: improve support for Tru64


From: Bruno Haible
Subject: acl: improve support for Tru64
Date: Sun, 8 Jun 2008 05:11:30 +0200
User-agent: KMail/1.5.4

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  <address@hidden>

        Improve support for Tru64 ACLs.
        * lib/file-has-acl.c (file_has_acl): Don't test the ACL_TYPE_DEFAULT
        ACL on OSF/1.

*** lib/file-has-acl.c.orig     2008-06-08 05:07:11.000000000 +0200
--- lib/file-has-acl.c  2008-06-08 05:06:55.000000000 +0200
***************
*** 159,164 ****
--- 159,174 ----
              saved_errno = errno;
              acl_free (acl);
              errno = saved_errno;
+ #   if HAVE_ACL_FREE_TEXT /* Tru64 */
+             /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always
+                returns NULL with errno not set.  There is no point in
+                making this call.  */
+ #   else /* FreeBSD, IRIX */
+             /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACCESS)
+                and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory
+                either both succeed or both fail; it depends on the
+                filesystem.  Therefore there is no point in making the second
+                call if the first one already failed.  */
              if (ret == 0 && S_ISDIR (sb->st_mode))
                {
                  acl = acl_get_file (name, ACL_TYPE_DEFAULT);
***************
*** 170,175 ****
--- 180,186 ----
                  else
                    ret = -1;
                }
+ #   endif
            }
          else
            ret = -1;





reply via email to

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