Work around difference between Linux ACLs and Solaris 10 ZFS.
authorJim Meyering <jim@meyering.net>
Sun, 4 Mar 2007 12:18:01 +0000 (12:18 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 4 Mar 2007 12:18:01 +0000 (12:18 +0000)
* lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
for EINVAL.

ChangeLog
lib/acl.c

index 34b2cd8..e765964 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-04  Jim Meyering  <jim@meyering.net>
+
+       Work around difference between Linux ACLs and Solaris 10 ZFS.
+       * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
+       for EINVAL.
+
 2007-03-03  Bruno Haible  <bruno@clisp.org>
 
        * modules/relocatable-prog (Depends-on): Add back progreloc's
index 0b3cd6f..7f73103 100644 (file)
--- a/lib/acl.c
+++ b/lib/acl.c
@@ -1,6 +1,6 @@
 /* acl.c - access control lists
 
-   Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -366,7 +366,7 @@ set_acl (char const *name, int desc, mode_t mode)
       int saved_errno = errno;
       acl_free (acl);
 
-      if (errno == ENOTSUP || errno == ENOSYS)
+      if (errno == ENOTSUP || errno == ENOSYS || errno == EINVAL)
        {
          if (chmod_or_fchmod (name, desc, mode) != 0)
            saved_errno = errno;