bug-gnulib
[Top][All Lists]
Advanced

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

Re: ls vs. Solaris 10: all files get "+" alternate access method flag


From: Jim Meyering
Subject: Re: ls vs. Solaris 10: all files get "+" alternate access method flag
Date: Sun, 04 Mar 2007 13:18:05 +0100

Jim Meyering <address@hidden> wrote:

> Yesterday, Nelson Beebe tested coreutils-6.8+.
>
> I replied:
>> "Nelson H. F. Beebe" <address@hidden> wrote:
>> ...
...
>> > The other peculiar thing is that when I do a "make install"
>> > to install the man pages from abajo, I get reports like this:
>> >
>> > cp: setting permissions for `/usr/local/man/cat3cw/ldexp.3cw': Invalid
>> > argument
>> >
>> > This too seems to be new with coreutils-6.8.
>>
>> This is due to the same underlying problem.
>> strace shows that the failing syscall is fsetxattr, with EINVAL.
>> cp thinks there's an ACL and is trying to preserve it.

On a linux system with an NFS partition mounted from Solaris 10 ZFS,
here's what happens in acl.c:
The following succeeds (i.e., acl != NULL)

      acl = acl_from_mode (mode);

yet the subsequent acl_set_fd fails with errno == EINVAL:

    ret = acl_set_fd (desc, acl);

I suspect that the ACL created from this version of acl_from_mode
is no longer compatible with what Solaris's ZFS requires.
So I've made this change:

        Work around difference between Linux ACLs and Solaris 10 ZFS.
        * lib/acl.c (set_acl): Revert to using chmod_or_fchmod also
        for EINVAL.

Index: lib/acl.c
===================================================================
RCS file: /sources/gnulib/gnulib/lib/acl.c,v
retrieving revision 1.9
diff -u -p -r1.9 acl.c
--- lib/acl.c   29 Dec 2006 19:33:46 -0000      1.9
+++ lib/acl.c   4 Mar 2007 12:16:02 -0000
@@ -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, mod
       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;




reply via email to

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