summaryrefslogtreecommitdiff
path: root/lib/file-has-acl.c
Commit message (Collapse)AuthorAgeFilesLines
* free-posix: use more often in other modulesPaul Eggert2021-03-251-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets us simplify cleanup code that calls ‘free’. * lib/amemxfrm.c (amemxfrm): * lib/areadlink-with-size.c (areadlink_with_size): * lib/areadlinkat-with-size.c (areadlinkat_with_size): * lib/astrxfrm.c (astrxfrm): * lib/dprintf.c (dprintf): * lib/execute.c (execute): * lib/execvpe.c (execvpe): * lib/fchdir.c (get_name): * lib/file-has-acl.c (file_has_acl): * lib/fprintf.c (fprintf): * lib/getcwd-lgpl.c (rpl_getcwd): * lib/getgroups.c (rpl_getgroups): * lib/link.c (link, rpl_link): * lib/linkat.c (link_immediate, link_follow, linkat_follow): * lib/localename.c (newlocale, duplocale): * lib/mgetgroups.c (mgetgroups): * lib/mountlist.c (read_file_system_list): * lib/pipe-filter-gi.c (pipe_filter_gi_close): * lib/putenv.c (_unsetenv, putenv): * lib/read-file.c (read_file): * lib/rename.c (rpl_rename): * lib/savedir.c (streamsavedir, savedir): * lib/spawni.c (do_open, __spawni): * lib/spawn-pipe.c (create_pipe): * lib/striconv.c (mem_cd_iconv, str_cd_iconv, str_iconv): * lib/striconveh.c (mem_cd_iconveh_internal, str_cd_iconveh) (mem_iconveh, str_iconveh): * lib/supersede.c (open_supersede, close_supersede): * lib/vasnprintf.c (VASNPRINTF): * lib/vdprintf.c (vdprintf): * lib/vfprintf.c (vfprintf): * lib/wcscoll-impl.h (wcscoll): * lib/wcsxfrm-impl.h (wcsxfrm): * lib/xgetdomainname.c (xgetdomainname): * lib/xgethostname.c (xgethostname): Simplify by assuming that ‘free’ preserves errno. * lib/localename.c: Do not include errno.h. * modules/amemxfrm, modules/areadlink-with-size: * modules/areadlinkat-with-size, modules/astrxfrm: * modules/c-vasnprintf, modules/dprintf, modules/execute: * modules/execvpe, modules/fchdir, modules/file-has-acl: * modules/fprintf-posix, modules/getcwd-lgpl, modules/getgroups: * modules/link, modules/linkat, modules/localename: * modules/mgetgroups, modules/mountlist, modules/pipe-filter-gi: * modules/posix_spawn-internal, modules/putenv, modules/read-file: * modules/rename, modules/savedir, modules/spawn-pipe: * modules/striconv, modules/striconveh, modules/supersede: * modules/vasnprintf, modules/vdprintf, modules/vfprintf-posix: * modules/wcscoll, modules/wcsxfrm, modules/xgetdomainname: * modules/xgethostname: Depend on free-posix.
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* stat failing with EOVERFLOW implies existencePaul Eggert2020-12-241-1/+1
| | | | | | | | | | | | | | | | | * lib/euidaccess.c (euidaccess): * lib/file-has-acl.c (file_has_acl): * lib/link.c (link, rpl_link): * lib/mkdir.c (rpl_mkdir): * lib/mkfifo.c (rpl_mkfifo): * lib/mknod.c (rpl_mknod): * lib/ptsname_r.c (__ptsname_r): * lib/symlink.c (rpl_symlink): * lib/symlinkat.c (rpl_symlinkat): * lib/unlink.c (rpl_unlink): * lib/unlinkat.c (rpl_unlinkat): * lib/utime.c (utime): If stat fails with EOVERFLOW the file exists, so treat it that way in file-existence tests that do not need struct stat values.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* file-has-acl: Fix test failure on Cygwin 2.9.Bruno Haible2018-09-181-5/+12
| | | | | | | | | | | | | * m4/acl.m4 (gl_FUNC_ACL): Update comments regarding Cygwin. * lib/acl-internal.h: Likewise. (HAVE_ACL_EXTENDED_FILE): Undefine on Cygwin. * lib/acl-internal.c: Update comments regarding Cygwin. * lib/acl_entries.c: Likewise. * lib/file-has-acl.c: Likewise. (file_has_acl): For Cygwin, use a different way to determine whether the "default" ACL of a directory is nontrivial. * lib/get-permissions.c: Update comments regarding Cygwin. * lib/set-permissions.c: Likewise.
* maint: Run 'make update-copyright'Paul Eggert2018-01-011-1/+1
|
* all: prefer https: URLsPaul Eggert2017-09-131-1/+1
|
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * build-aux/gendocs.sh (version): * doc/gendocs_template: * doc/gendocs_template_min: * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright dates by hand in templates and the like. * all files: Run 'make update-copyright'.
* maint: add coding cookies to non-ASCII sourcesPaul Eggert2015-09-241-1/+1
| | | | | | | | | | | | Otherwise, Emacs might do the wrong thing if run in an he_IL.ISO-8859-8 locale, which an Emacs developer does on occasion. Problem reported by Eli Zaretskii in: http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00966.html Don't bother with test files, as they aren't copied to the Emacs source directory. If this problem affects test files in some other GNU project, we can add coding cookies to the non-ASCII test files later.
* file-has-acl, acl-permissions: fix HP-UX typosPaul Eggert2015-07-041-1/+1
| | | | | | | | | Problem reported by John David Anglin in: http://bugs.gnu.org/20979 * lib/file-has-acl.c (file_has_acl): * lib/set-permissions.c (context_acl_from_mode) (context_aclv_from_mode, set_acls): Fix some obvious typos when HAVE_GETCL /* HP-UX */. They were introduced by the recent ACL changes.
* acl-permissions: more porting to AIXPaul Eggert2015-06-051-1/+1
| | | | | | | | | | * lib/file-has-acl.c (file_has_acl) [HAVE_STATACL]: * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: * lib/set-permissions.c (set_acls) [HAVE_ACLX_GET && ACL_AIX_WIP]: Add cast for AIX, whose system calls are declared to accept char * even though the arguments are really char const *. * lib/mountlist.c (read_file_system_list) [MOUNTED_VMOUNT]: Rework types to pacify xlc.
* file-has-acl: fix build on Mac OS X 10Pádraig Brady2015-06-021-13/+2
| | | | | | | | | | | | This reverts commit f1b37e3a which doesn't work on Mac OS X >= 10.4 which has an incompatible 6 parameter getxattr() call. * doc/glibc-functions/getxattr.texi: Mention the divergent getxattr() call on Mac OS X >= 10.4. * doc/glibc-functions/fgetxattr.texi: Likewise. * lib/file-has-acl.c: Revert to more complete combined check. * m4/acl.m4 (gl_FILE_HAS_ACL): Likewise. Reported by Jack Howarth.
* file-has-acl: Split feature tests again (Bug#20667)Andreas Gruenbacher2015-05-271-2/+13
| | | | | | | | * lib/file-has-acl.c: Instead of testing for XATTR_NAME_POSIX_ACL_ACCESS and XATTR_NAME_POSIX_ACL_DEFAULT, define them when needed. * m4/acl.m4 (gl_FILE_HAS_ACL): With that, Paul's GETXATTR_WITH_POSIX_ACLS change shouldn't be needed anymore.
* file-has-acl: port to CentOS 6Paul Eggert2015-04-261-5/+2
| | | | | | | | | | | | Problem reported by Tom G. Christensen in: http://lists.gnu.org/archive/html/bug-gnulib/2015-04/msg00074.html * lib/file-has-acl.c: Use GETXATTR_WITH_POSIX_ACLS instead of a combination of HAVE_SYS_XATTR_H, HAVE_LINUX_XATTR_H, and HAVE_GETXATTR. * m4/acl.m4 (gl_FILE_HAS_ACL): Test fot the entire combination of linux/xattr.h, sys/xattr.h, getxattr, XATTR_NAME_POSIX_ACL_ACCESS, and XATTR_NAME_POSIX_ACL_DEFAULT, since that's what what file-has-acl.c actually needs.
* file-has-acl: always return false when ACLs aren't supportedPádraig Brady2015-04-261-22/+22
| | | | | | | | * lib/file-has-acl.c (file_has_acl): Consistent with other paths, change the GNU/Linux getxattr path, to transform "not supported" errors to a false return rather than an error. This is handled within file_has_acl() due to the platform specific tests to determine if ACLs are not supported.
* acl: On Linux, check for acls without libaclAndreas Gruenbacher2015-04-151-1/+34
| | | | | | | | | | | | | On Linux, use the getxattr syscall instead of the acl_extended_file libacl library function to check for the presence of acls, avoiding a library dependency. * lib/file-has-acl.c: Include xattr headers if we have them. (file_has_acl): On Linux, use getxattr(). * m4/acl.m4 (gl_FUNC_ACL): Define LIB_HAS_ACL as the libraries to link with for file_has_acl(). Check for xattr headers and getxattr(). * modules/acl: Add a dep on the stdbool module which was already needed. Add the new reduced dependency LIB_HAS_ACL reference.
* acl, qacl: split off shared functions into separate object fileAndreas Gruenbacher2015-04-151-446/+0
| | | | | | | | | | | Some of the helper functions in file-has-acl.c are used from qcopy-acl.c while file_has_acl() isn't needed there. Split the shared functions off into acl-internal.c. * lib/file-has-acl.c: Remove helper functions here. * lib/acl-internal.c: Add helper functions here. * modules/qacl: Use acl-internal.c instead of file-has-acl.c here. * modules/acl: Add file-has-acl.c now that qacl doesn't use it anymore.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* qacl: port to Windows betterPaul Eggert2013-12-171-5/+6
| | | | | | | | See Eli Zaretskii in <http://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00593.html>. * lib/file-has-acl.c (acl_access_nontrivial): Return -1 and set errno if !HAVE_ACL_FIRST_ENTRY && !HAVE_ACL_TO_SHORT_TEXT && !HAVE_ACL_FREE_TEXT.
* qacl: new module, broken out from the acl modulePaul Eggert2013-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is for GNU Emacs, which wants the acl functions but does not want 'error' invoked when they fail. * lib/acl-internal.h: Do not include error.h, quote.h. (ENOSYS, ENOTSUP): Remove; no longer needed. (ACL_NOT_WELL_SUPPORTED): Remove; replaced by acl_errno_valid. * lib/acl.h: Include <stdbool.h>. (acl_errno_valid): New function. * lib/copy-acl.c, lib/set-acl.c: Include errno,h, not acl-internal.h. * lib/copy-acl.c (qcopy_acl): Move to lib/qcopy-acl.c. * lib/set-acl.c: Rename from lib/set-mode-acl.c. (chmod_or_fchmod, qset_acl): Move to lib/qset-acl.c. (ACL_INTERNAL_INLINE): Remove; no longer needed. * lib/file-has-acl.c (file_has_acl): * lib/qcopy-acl.c (qcopy_acl): * lib/qset-acl.c (qset_acl): Use acl_errno_valid instead of ACL_NOT_WELL_SUPPORTED. * modules/acl (Files): Move lib/acl.h, lib/acl-internal.h, lib/acl_entries.c, lib/set-mode-acl.c (renamed to lib/set-acl.c), lib/file-has-acl.c, m4/acl.m4 to qacl module. Add lib/set-acl.c. (Depends-on): Move extern-inline, fstat, sys_stat to qacl module. Add qacl. (configure.ac): Move gl_FUNC_ACL to qacl module. (lib_SOURCES): Remove file-has-acl.c (moved to qacl module). Rename set-mode-acl.c to set-acl.c. * lib/acl-errno-valid.c: New file. * lib/qcopy-acl.c: New file, moved from the old lib/copy-acl.c; the copy_acl function remains in copy-acl.c. * lib/qcopy-acl.c, lib/qset-acl.c: Do not include gettext.h. (_): Remove; not needed. * lib/qset-acl.c: New file, moved from the old lib/set-mode-acl.c; the set_acl function remains in set-acl.c (renamed from set-mode-acl.c). * modules/qacl: New file, moved from the old modules/acl. (Files, lib_SOURCES): Add acl-errno-valid.c, qcopy-acl.c, qset-acl.c. Remove set-mode-acl.c, copy-acl.c. (Depends-on): Remove error, gettext-h, quote. Add stdbool.
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* Write "Mac OS X" instead of "MacOS X".Bruno Haible2012-06-221-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * README: Write "Mac OS X" instead of "MacOS X". * build-aux/bootstrap: Likewise. * build-aux/install-reloc: Likewise. * lib/acl-internal.h: Likewise. * lib/acl_entries.c: Likewise. * lib/argp-ba.c: Likewise. * lib/argp-pv.c: Likewise. * lib/config.charset: Likewise. * lib/copy-acl.c: Likewise. * lib/csharpexec.c: Likewise. * lib/euidaccess.c: Likewise. * lib/fbufmode.c: Likewise. * lib/fflush.c: Likewise. * lib/file-has-acl.c: Likewise. * lib/filemode.h: Likewise. * lib/fpurge.c: Likewise. * lib/freadable.c: Likewise. * lib/freadahead.c: Likewise. * lib/freading.c: Likewise. * lib/freadptr.c: Likewise. * lib/freadseek.c: Likewise. * lib/fseeko.c: Likewise. * lib/fseterr.c: Likewise. * lib/fsusage.c: Likewise. * lib/fwritable.c: Likewise. * lib/fwriting.c: Likewise. * lib/get-rusage-as.c: Likewise. * lib/get-rusage-data.c: Likewise. * lib/getdomainname.c: Likewise. * lib/idpriv-drop.c: Likewise. * lib/idpriv-droptemp.c: Likewise. * lib/localcharset.c: Likewise. * lib/locale.in.h: Likewise. * lib/localename.c: Likewise. * lib/mbsrtowcs-state.c: Likewise. * lib/nproc.c: Likewise. * lib/passfd.c: Likewise. * lib/posix_openpt.c: Likewise. * lib/printf-parse.c: Likewise. * lib/progreloc.c: Likewise. * lib/safe-read.h: Likewise. * lib/safe-write.h: Likewise. * lib/sched.in.h: Likewise. * lib/set-mode-acl.c: Likewise. * lib/signal.in.h: Likewise. * lib/stdint.in.h: Likewise. * lib/stdio-impl.h: Likewise. * lib/stdlib.in.h: Likewise. * lib/strtod.c: Likewise. * lib/sys_select.in.h: Likewise. * lib/tcgetsid.c: Likewise. * lib/unistd.in.h: Likewise. * lib/unlockpt.c: Likewise. * lib/vasnprintf.c: Likewise. * lib/vma-iter.c: Likewise. * lib/wcsrtombs-state.c: Likewise. * m4/acl.m4: Likewise. * m4/acosl.m4: Likewise. * m4/asinl.m4: Likewise. * m4/atanl.m4: Likewise. * m4/c-stack.m4: Likewise. * m4/cosl.m4: Likewise. * m4/expl.m4: Likewise. * m4/extensions.m4: Likewise. * m4/fdatasync.m4: Likewise. * m4/fmal.m4: Likewise. * m4/frexp.m4: Likewise. * m4/frexpf.m4: Likewise. * m4/frexpl.m4: Likewise. * m4/fsusage.m4: Likewise. * m4/getdomainname.m4: Likewise. * m4/getloadavg.m4: Likewise. * m4/getopt.m4: Likewise. * m4/gettext.m4: Likewise. * m4/gnulib-common.m4: Likewise. * m4/intdiv0.m4: Likewise. * m4/intlmacosx.m4: Likewise. * m4/largefile.m4: Likewise. * m4/ldexpl.m4: Likewise. * m4/link-follow.m4: Likewise. * m4/locale-ar.m4: Likewise. * m4/locale-fr.m4: Likewise. * m4/locale-ja.m4: Likewise. * m4/locale-tr.m4: Likewise. * m4/locale-zh.m4: Likewise. * m4/locale_h.m4: Likewise. * m4/lock.m4: Likewise. * m4/logl.m4: Likewise. * m4/mathfunc.m4: Likewise. * m4/minus-zero.m4: Likewise. * m4/mktime.m4: Likewise. * m4/mmap-anon.m4: Likewise. * m4/multiarch.m4: Likewise. * m4/nanosleep.m4: Likewise. * m4/nocrash.m4: Likewise. * m4/poll.m4: Likewise. * m4/printf-frexpl.m4: Likewise. * m4/printf.m4: Likewise. * m4/signbit.m4: Likewise. * m4/sinl.m4: Likewise. * m4/sqrtl.m4: Likewise. * m4/strerror_r.m4: Likewise. * m4/tanl.m4: Likewise. * m4/threadlib.m4: Likewise. * m4/ttyname_r.m4: Likewise. * m4/unlink.m4: Likewise. * m4/visibility.m4: Likewise. * m4/wcwidth.m4: Likewise. * tests/minus-zero.h: Likewise. * tests/test-alloca-opt.c: Likewise. * tests/test-copy-acl.sh: Likewise. * tests/test-copy-file.sh: Likewise. * tests/test-fdatasync.c: Likewise. * tests/test-file-has-acl.sh: Likewise. * tests/test-flock.c: Likewise. * tests/test-fsync.c: Likewise. * tests/test-localename.c: Likewise. * tests/test-malloca.c: Likewise. * tests/test-nonblocking-pipe.h: Likewise. * tests/test-nonblocking-socket.h: Likewise. * tests/test-openpty.c: Likewise. * tests/test-posix_openpt.c: Likewise. * tests/test-ptsname.c: Likewise. * tests/test-ptsname_r.c: Likewise. * tests/test-sameacls.c: Likewise. * tests/test-select.h: Likewise. * tests/test-set-mode-acl.sh: Likewise. * tests/test-snprintf-posix.h: Likewise. * tests/test-sprintf-posix.h: Likewise. * tests/test-strtod.c: Likewise. * tests/test-time.c: Likewise. * tests/test-vasnprintf-posix.c: Likewise. * tests/test-vasprintf-posix.c: Likewise. * doc/acl-resources.txt: Likewise. * doc/**/*.texi: Likewise. Reported by Max Horn <max@quendi.de>.
* acl: Don't use ACL_CNT and similar ops, since they are unreliable.Paul Eggert2012-02-201-89/+80
| | | | | | * lib/file-has-acl.c (file_has_acl) [HP-UX, NonStop Kernel]: Read the entries into a stack-allocated buffer directly. * lib/copy-acl.c (qcopy_acl) [HP-UX, NonStop Kernel]: Likewise.
* acl: Don't use GETACLCNT and similar ops, since they are unreliable.Paul Eggert2012-02-201-71/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* acl: Fix endless loop on Solaris with vxfs.Bruno Haible2012-02-191-1/+12
| | | | | | | | | | * 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.
* acl: Fix copy-acl test failure on Solaris 11 2011-11.Bruno Haible2012-02-191-25/+57
| | | | | | * lib/file-has-acl.c (NEW_ACE_WRITEA_DATA): New macro. (acl_ace_nontrivial): Relax the restrictions on access_masks[] so that this function returns 0 in some more cases.
* file-has-acl: suppress a warning from gcc -Wsuggest-attribute=constJim Meyering2012-02-021-0/+6
| | | | | | | * lib/file-has-acl.c (file_has_acl): This function (for some #ifdefs) would evoke a new gcc warning. Given all of the #ifdefs, it is better not even to try to add the attribute. Instead, add a pragma to suppress the suggestion/warning.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* file-has-acl: revert both recent changes, 80af92af and 95f7c57fJim Meyering2011-10-051-29/+1
| | | | | | | | | | * lib/file-has-acl.c: While the 2011-10-03 change does fix the ls -lL regression introduced in coreutils-8.12, it does so at the cost of an additional stat call in the common case. Besides, now that the kernel change that prompted commit 95f7c57f has been reverted (see https://bugzilla.redhat.com/show_bug.cgi?id=720325#c24) we have no use for commit 95f7c57f, "file-has-acl: use acl_extended_file_nofollow if available".
* file-has-acl: revert unintended change in behavior of ls -LKamil Dudka2011-10-041-10/+30
| | | | | | | | | * lib/file-has-acl.c (acl_extended_file_wrap): New function, derived from... (file_has_acl): ...code here. Call it. This problem was introduced with 2011-07-22 commit 95f7c57f, "file-has-acl: use acl_extended_file_nofollow if available". See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28538
* acl: Fix specification.Bruno Haible2011-10-031-1/+2
| | | | * lib/file-has-acl.c (file_has_acl): Fix specification.
* acl: Fix compilation on Solaris 10 (older version).Bruno Haible2011-09-111-1/+1
| | | | | | | * 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>.
* acl: Update for AIX >= 5.3 with NFS.Bruno Haible2011-09-061-0/+2
| | | | | * lib/file-has-acl.c (file_has_acl): Interpret aclx_get failure with ENOSYS as no ACL.
* acl: Avoid errors on NonStop Kernel.Joachim Schmitz2011-09-061-1/+6
| | | | | * lib/file-has-acl.c (file_has_acl) [NonStop Kernel]: Ignore ENOSYS and ENOTSUP errors.
* acl: Clean up Solaris code.Bruno Haible2011-09-061-5/+1
| | | | | | | * 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.
* acl: Fix a bug with NFSv4 ACLs on Solaris 10 (newer version).Bruno Haible2011-09-061-3/+9
| | | | | * lib/file-has-acl.c (file_has_acl): ACLs with 4..6 ACEs can be trivial.
* acl: Improve support of NFSv4 ACLs on Solaris 10 (newer version).Bruno Haible2011-09-051-20/+111
| | | | | | | | | * lib/acl-internal.h (acl_nontrivial): Declare also on newer Solaris 10. * lib/file-has-acl.c (acl_nontrivial): Define also on newer Solaris 10. (acl_ace_nontrivial): Likewise. Recognize the trivial ACLs with 6 ACEs. * lib/copy-acl.c (qcopy_acl): On newer Solaris 10, use acl or facl instead of acl_get, facl_get, acl_set, facl_set.
* file-has-acl: use acl_extended_file_nofollow if availableKamil Dudka2011-07-221-1/+9
| | | | | | | | * lib/acl-internal.h (HAVE_ACL_EXTENDED_FILE): New macro. (acl_extended_file): New macro. * lib/file-has-acl.c (file_has_acl): Use acl_extended_file_nofollow. * m4/acl.m4 (gl_FUNC_ACL): Check for acl_extended_file_nofollow. This addresses http://bugzilla.redhat.com/692823.
* acl: Add support for HP-UX >= 11.11 JFS ACLs.Bruno Haible2011-06-131-4/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* acl: Complete the 2010-08-10 fix.Bruno Haible2011-06-131-1/+9
| | | | | | | | | * 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>.
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* acl: Add support for ACLs on NonStop Kernel.Bruno Haible2010-10-031-2/+59
| | | | | | | | | | | | | | | | | | | | * 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.
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-1/+1
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-267/+267
|
* maint: prefer 'file system' over 'filesystem'Eric Blake2009-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/posix-functions/fstatat.texi (fstatat): Likewise. * doc/posix-functions/lstat.texi (lstat): Likewise. * lib/file-has-acl.c (file_has_acl): Likewise. * lib/fwriteerror.c [TEST]: Likewise. * tests/test-areadlink.h (test_areadlink): Likewise. * tests/test-areadlinkat-with-size.c (main): Likewise. * tests/test-areadlinkat.c (main): Likewise. * tests/test-canonicalize-lgpl.c (main): Likewise. * tests/test-canonicalize.c (main): Likewise. * tests/test-fstatat.c (main): Likewise. * tests/test-linkat.c (main): Likewise. * tests/test-lstat.h (test_lstat_func): Likewise. * tests/test-mkdir.h (test_mkdir): Likewise. * tests/test-readlink.h (test_readlink): Likewise. * tests/test-remove.c (main): Likewise. * tests/test-rename.h (test_rename): Likewise. * tests/test-renameat.c (main): Likewise. * tests/test-rmdir.h (test_rmdir_func): Likewise. * tests/test-symlink.h (test_symlink): Likewise. * tests/test-symlinkat.c (main): Likewise. * tests/test-unlink.h (test_unlink_func): Likewise. * tests/test-unlinkat.c (main): Likewise. Signed-off-by: Eric Blake <ebb9@byu.net>
* Disable untested support for new flavours of ACLs on AIX.Bruno Haible2009-09-271-2/+2
|
* Add support for new flavours of ACLs on AIX. (Untested.)Bruno Haible2009-09-271-7/+93
|