|
c78091be
|
2012-02-20T01:12:06
|
|
acl: Don't use GETACLCNT and similar ops, since they are unreliable.
- There were several instances of this pattern:
for (;;) {
n = acl (f, GETACLCNT, 0, NULL);
[ allocate an array A of size N ]
if (acl (f, GETACL, n, a) == n)
break;
}
This loop might never terminate if some other process is constantly
manipulating the file's ACL. The loop should be rewritten to
terminate.
- The acl (... GETACLNT ...) call is merely an optimization; its value
is merely a hint as to how big to make the array. A better
optimization is to avoid the acl (... GETACLNT ...) call entirely,
and just guess a reasonably-big size, growing the size and trying
again if it's not large enough. This guarantees termination, and
saves a system call.
* lib/acl-internal.h: Include <limits.h>.
(MIN, SIZE_MAX): New macros.
* lib/file-has-acl.c (file_has_acl) [Solaris]: Read the entries into
a stack-allocated buffer, and use malloc if it does not fit. Don't
use GETACLCNT.
* lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
|
|
1e5535ce
|
2012-02-19T22:17:05
|
|
acl: Fix endless loop on Solaris with vxfs.
* lib/file-has-acl.c (file_has_acl) [Solaris]: Treat a failing
acl()/facl() call for ACE_GETACL like a failing call for ACE_GETACLCNT.
* lib/set-mode-acl.c (qset_acl) [Solaris]: Likewise.
* lib/copy-acl.c (qcopy_acl)[Solaris]: Likewise.
* tests/test-sameacls.c (main)[Solaris]: Likewise.
Reported by Bill Jones in
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10639>, via Paul Eggert.
|
|
3cd156c0
|
2012-01-11T01:52:23
|
|
acl: Rename a local variable.
* lib/set-mode-acl.c (set_acl): Use same variable name as in copy_acl.
|
|
1602f0af
|
2012-01-01T10:04:58
|
|
maint: update all copyright year number ranges
Run "make update-copyright".
|
|
389df9e5
|
2011-09-11T11:56:35
|
|
acl: Fix compilation on Solaris 10 (older version).
* lib/file-has-acl.c (acl_ace_nontrivial): Use NEW_ACE_EVERYONE instead
of ACE_EVERYONE.
* lib/set-mode-acl.c (qset_acl): Likewise.
Reported by Christian Jullien <eligis@orange.fr>.
|
|
06d3319b
|
2011-09-06T10:38:52
|
|
acl: Fix a test failure on IRIX 6.5 with NFS.
* lib/acl-internal.h (MODE_INSIDE_ACL): Define to 0 on IRIX.
* lib/set-mode-acl.c (qset_acl): Test !HAVE_ACL_TYPE_EXTENDED instead
of MODE_INSIDE_ACL. If !MODE_INSIDE_ACL, do a chmod_or_fchmod always.
* lib/copy-acl.c (qcopy_acl): Likewise.
|
|
1b73d498
|
2011-09-06T00:26:07
|
|
acl: Clean up Solaris code.
* lib/acl-internal.h: Remove no-op #if.
* lib/file-has-acl.c: Likewise.
* lib/set-mode-acl.c (qset_acl): Remove unused Solaris code.
* lib/copy-acl.c (qcopy_acl): Likewise.
|
|
5b89c4d7
|
2011-09-05T02:38:24
|
|
acl: Remove unused code in last commit.
|
|
af6ca8ea
|
2011-09-05T00:44:13
|
|
acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).
* lib/acl-internal.h (ACE_*, NEW_ACE_*): Define also on newer Solaris
10.
(OLD_ALLOW, OLD_DENY): New macros.
(NEW_ACE_ACCESS_ALLOWED_ACE_TYPE): Renamed from
ACE_ACCESS_ALLOWED_ACE_TYPE.
(NEW_ACE_ACCESS_DENIED_ACE_TYPE): Renamed from
ACE_ACCESS_DENIED_ACE_TYPE.
(OLD_ACE_OWNER, OLD_ACE_GROUP, OLD_ACE_OTHER): New macros.
(NEW_ACE_EXECUTE): Fix value.
(NEW_ACE_APPEND_DATA, NEW_ACE_READ_NAMED_ATTRS,
NEW_ACE_WRITE_NAMED_ATTRS, NEW_ACE_DELETE_CHILD,
NEW_ACE_READ_ATTRIBUTES, NEW_ACE_WRITE_ATTRIBUTES, NEW_ACE_DELETE,
NEW_ACE_READ_ACL, NEW_ACE_WRITE_ACL, NEW_ACE_WRITE_OWNER,
NEW_ACE_SYNCHRONIZE): New macros.
* lib/set-mode-acl.c (qset_acl): On newer Solaris 10, use acl or facl
instead of acl_fromtext, acl_set, facl_set.
Fixes a coreutils/tests/cp/perm failure.
|
|
227b08bb
|
2011-06-13T02:11:03
|
|
acl: Add support for HP-UX >= 11.11 JFS ACLs.
* doc/acl-resources.txt: Add info about the ACL APIs on HP-UX.
* m4/acl.m4 (gl_FUNC_ACL): Also test for HP-UX 11.11 API.
* lib/acl-internal.h [HP-UX 11.11]: Include <aclv.h>.
(acl, aclsort): New declarations.
(aclv_nontrivial): New declaration.
* lib/file-has-acl.c (aclv_nontrivial) [HP-UX 11.11]: New function.
(file_has_acl): Read also the second kind of HP-UX ACLs.
* lib/set-mode-acl.c (qset_acl) [HP-UX 11.11]: Try to set the second
kind of HP-UX ACLs if the first kind fails.
* lib/copy-acl.c (qcopy_acl) [HP-UX 11.11]: Read and set also the
second kind of HP-UX ACLs.
* tests/test-sameacls.c [HP-UX 11.11]: Include <aclv.h>.
(main) [HP-UX 11.11]: Test also whether the second kind of HP-UX ACLs
agree.
* tests/test-file-has-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
hpuxjfs.
Handle hpuxjfs.
* tests/test-set-mode-acl.sh (acl_flavor) [HP-UX 11.11]: Set to
hpuxjfs.
Handle hpuxjfs.
* tests/test-copy-acl.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
(func_test_same_acls): Use both lsacl and getacl.
Handle hpuxjfs.
* tests/test-copy-file.sh (acl_flavor) [HP-UX 11.11]: Set to hpuxjfs.
(func_test_same_acls): Use both lsacl and getacl.
Handle hpuxjfs.
|
|
9cbf59b7
|
2011-06-13T01:17:20
|
|
acl: Complete the 2010-08-10 fix.
* lib/file-has-acl.c (file_has_acl) [HP-UX]: Also test against ENOTSUP.
* lib/set-mode-acl.c (qset_acl) [HP-UX]: Likewise.
* lib/copy-acl.c (qcopy_acl) [HP-UX]: Test for the errno values
explicitly.
* tests/test-sameacls.c (main) [HP-UX]: Also test against ENOTSUP.
Reported in <http://debbugs.gnu.org/db/60/6053.html>.
|
|
d60f3b0c
|
2011-01-01T20:17:23
|
|
maint: update almost all copyright ranges to include 2011
Run the new "make update-copyright" rule.
|
|
7c2e3688
|
2010-10-03T18:03:48
|
|
acl: Add support for ACLs on NonStop Kernel.
* m4/acl.m4 (gl_FUNC_ACL): For Solaris, test for facl(), not for acl().
Check whether the function aclsort() exists.
* lib/acl-internal.h: For Solaris, test HAVE_FACL, not HAVE_ACL.
(acl_nontrivial) [HAVE_ACLSORT]: New declaration.
* lib/file-has-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
(acl_nontrivial [HAVE_ACLSORT]: New function.
(file_has_acl): Implement for NonStop Kernel.
* lib/set-mode-acl.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
(qset_acl): Implement for NonStop Kernel.
* lib/copy-acl.c (qcopy_acl): Implement for NonStop Kernel.
* tests/test-sameacls.c: For Solaris, test HAVE_FACL, not HAVE_ACL.
(main): Implement for NonStop Kernel.
* tests/test-file-has-acl.sh (acl_flavor): Set to 'nsk' on NonStop
Kernel. Handle this flavor.
* tests/test-set-mode-acl.sh: Likewise.
* tests/test-copy-acl.sh: Likewise.
* tests/test-copy-file.sh: Likewise.
|
|
ca156dd8
|
2010-02-12T08:32:00
|
|
copy-acl: enhance Solaris ACL error handling
Gracefully handle EOPNOTSUPP in qcopy_acl and qset_acl. These
functions, as used in coreutils, were causing the test suite to fail
on Solaris 8 i386 with ZFS-backed NFSv3 mounts. The failures included
errors such as:
FAIL: cp/backup-dir
cp: preserving permissions for `y/x': Operation not supported on
transport endpoint
* lib/copy-acl.c (qcopy_acl): Also ignore EOPNOTSUPP.
* lib/set-mode-acl.c (qset_acl): Likewise.
Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
b2e2010c
|
2010-01-01T10:31:12
|
|
update nearly all FSF copyright year lists to include 2010
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
|
|
441aa304
|
2009-12-10T20:28:30
|
|
Use spaces for indentation, not tabs.
|
|
961ac078
|
2009-09-27T14:11:54
|
|
Disable untested support for new flavours of ACLs on AIX.
|
|
49f59583
|
2009-09-27T14:05:56
|
|
Add support for new flavours of ACLs on AIX. (Untested.)
|
|
66f908f4
|
2009-08-31T00:53:46
|
|
Fix an unnecessary error on Solaris 10 on NFSv3 file systems.
|
|
9bdb22e0
|
2009-05-04T02:24:16
|
|
Bug fix in acl module.
|
|
24a8cd3b
|
2008-06-11T02:33:46
|
|
Include gettext.h only in those files that need it.
|
|
765ede78
|
2008-06-10T02:40:28
|
|
Work around the Solaris 10 ACE ACLs ABI change.
|
|
45b218a2
|
2008-06-08T23:55:37
|
|
Add me as co-author.
|
|
3f5a6401
|
2008-06-08T20:33:08
|
|
Add support for AIX ACLs.
|
|
7e766e7f
|
2008-06-08T19:08:22
|
|
Add support for HP-UX ACLs.
|
|
c3dcd03b
|
2008-06-08T16:52:23
|
|
Add support for Cygwin ACLs.
|
|
1a8b4204
|
2008-06-08T16:33:02
|
|
Fix bug with setuid modes in Solaris 10+ code.
|
|
5aeafebd
|
2008-06-08T16:04:08
|
|
Add support for Solaris 7..10 ACLs.
|
|
bba6ffd6
|
2008-06-08T13:29:35
|
|
Trivial code simplifications.
|
|
c9c845c2
|
2008-06-08T05:06:19
|
|
Add support for MacOS X ACLs.
|
|
d0ac688d
|
2008-06-08T04:51:21
|
|
Fix memory leak introduced on 2008-05-22.
|
|
e2a11610
|
2008-06-08T04:39:51
|
|
Avoid needing to know the textual representation of an ACL when possible.
|
|
ebbcc86e
|
2008-06-08T04:34:52
|
|
Trivial code simplifications.
|
|
07beaf87
|
2008-06-07T20:11:23
|
|
Trivial stylistic improvements.
|
|
fb3917ca
|
2008-06-04T00:00:28
|
|
Simplify #ifs. Put Solaris code after POSIX-like code.
|
|
8d8497f2
|
2008-06-03T00:07:15
|
|
Document qset_acl return value precisely.
|
|
33cb12c8
|
2008-05-25T13:44:20
|
|
Rename acl.c to set-mode-acl.c.
|