summaryrefslogtreecommitdiff
path: root/lib/copy-acl.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* 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.
* 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>
* acl: include quote.hMike Frysinger2013-05-071-0/+1
| | | | | | | | | | | | | These files use quote(), so include quote.h for it otherwise we fail to build with errors like: copy-acl.c: In function 'copy_acl': copy-acl.c:51:7: error: implicit declaration of function 'quote' [-Werror=implicit-function-declaration] * lib/copy-acl.c: Include quote.h. * lib/set-acl.c: Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* acl: include errno.h to get errnoPaul Eggert2013-04-301-0/+2
| | | | | | Reported by Daiki Ueno in <http://lists.gnu.org/archive/html/bug-gnulib/2013-04/msg00073.html>. * lib/copy-acl.c, lib/set-acl.c: Include errno.h.
* qacl: new module, broken out from the acl modulePaul Eggert2013-04-271-561/+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-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-75/+35
| | | | | | * 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: Fix endless loop on Solaris with vxfs.Bruno Haible2012-02-191-4/+16
| | | | | | | | | | * 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: Export qcopy_acl.Bruno Haible2012-01-121-1/+1
| | | | | * lib/acl.h (qcopy_acl): New declaration. * lib/copy-acl.c (qcopy_acl): Make non-static.
* acl: Align return values of copy_acl and qcopy_acl.Bruno Haible2012-01-121-4/+6
| | | | | * lib/copy-acl.c (copy_acl): Return the same value as qcopy_acl, maybe < -1.
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* acl: Fix a test failure on IRIX 6.5 with NFS.Bruno Haible2011-09-061-7/+3
| | | | | | | * 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.
* acl: Clean up Solaris code.Bruno Haible2011-09-061-47/+8
| | | | | | | * 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: Improve support of NFSv4 ACLs on Solaris 10 (newer version).Bruno Haible2011-09-051-1/+1
| | | | | | | | | * 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.
* acl: Add support for HP-UX >= 11.11 JFS ACLs.Bruno Haible2011-06-131-24/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-2/+2
| | | | | | | | | * 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: port to Solaris 8 when copying from tmpfs to ufsPaul Eggert2010-12-181-1/+1
| | | | | | | | * lib/copy-acl.c (qcopy_acl): Also allow EINVAL as an ignorable error number. Problem observed on Solaris 8 with latest coreutils, with "mv A B", where A is on a tmpfs file system and B is on a ufs file system. This caused coreutils' mv/part-symlink test to fail.
* acl: Add support for ACLs on NonStop Kernel.Bruno Haible2010-10-031-0/+62
| | | | | | | | | | | | | | | | | | | | * 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.
* copy-acl: ignore ENOTSUP on HP-UXPádraig Brady2010-08-101-2/+2
| | | | | | | | | | | Fixes Coreutils bug 6053. * lib/acl-internal.h (ACL_NOT_WELL_SUPPORTED): Move definition up, so that it is available for HP-UX. * lib/copy-acl.c (qcopy_acl): Use it. Reported by Patrick M. Callahan. Signed-off-by: Eric Blake <eblake@redhat.com>
* copy-acl: enhance Solaris ACL error handlingBen Walton2010-03-021-2/+3
| | | | | | | | | | | | | | | | | 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>
* 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
* update nearly all FSF copyright year lists to include 2009Jim Meyering2009-12-291-1/+1
| | | | | | | | | | | | | | | | | | The files named by the following are exempted: grep -v '^#' config/srclist.txt|grep -v '^$' \ | while read src dst; do test -f "$dst" && { echo "$dst"; continue; } test -d "$dst" || continue echo "$dst"/$(basename "$src") done > exempt git ls-files tests/unictype >> exempt In the remaining files, convert to all-interval notation if - there is already at least one year interval like 2000-2003 - the file is maintained by me - the file is in lib/uni*/, where that style already prevails Otherwise, use update-copyright's default.
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-160/+160
|
* Fix test failure on Cygwin.Bruno Haible2008-10-111-3/+13
|
* Include gettext.h only in those files that need it.Bruno Haible2008-06-111-0/+3
|
* Add me as co-author.Bruno Haible2008-06-081-6/+6
|
* Add support for AIX ACLs.Bruno Haible2008-06-081-0/+32
|
* Add support for HP-UX ACLs.Bruno Haible2008-06-081-0/+78
|
* Add support for Cygwin ACLs.Bruno Haible2008-06-081-3/+3
|
* Add support for Solaris 7..10 ACLs.Bruno Haible2008-06-081-2/+185
|
* New function acl_extended_nontrivial (MacOS X only).Bruno Haible2008-06-081-1/+1
|
* Add support for MacOS X ACLs.Bruno Haible2008-06-081-1/+67
|
* Trivial code simplifications.Bruno Haible2008-06-081-15/+4
|
* Trivial stylistic improvements.Bruno Haible2008-06-071-4/+4
|
* Avoid gcc warning on cygwin.Eric Blake2008-06-061-1/+2
| | | | | | | * lib/copy-acl.c (qcopy_acl) [!HAVE_ACL_GET_FILE && !ACL_NO_TRIVIAL]: Avoid unused variable. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix small mistake from 2008-06-01.Bruno Haible2008-06-051-1/+1
|
* New function for testing triviality of ACL with POSIX-draft like API.Bruno Haible2008-06-041-7/+3
|