summaryrefslogtreecommitdiff
path: root/lib/get-permissions.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* Update some URLsPaul Eggert2019-09-221-1/+1
| | | | | | This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
* 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/+5
| | | | | | | | | | | | | * 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.
* Continue to use spaces for indentation, not tabs.Bruno Haible2018-06-251-44/+44
|
* 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'.
* get-permissions, strftime: fix grammar in commentsPaul Eggert2016-01-251-1/+1
| | | | | * lib/get-permissions.c, lib/strftime.c: Merge into the comments some grammar fixes Alan Mackenzie made to GNU Emacs.
* 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.
* acl-permissions: Document FreeBSD ACL_TYPE_NFS4 aclsAndreas Gruenbacher2015-07-051-0/+6
| | | | | | * lib/set-permissions.c (set_acls): Document where support for FreeBSD ACL_TYPE_NFS4 acls should go. * lib/get-permissions.c (get_permissions): Likewise.
* acl-permissions: add a cast to port to older AIXPaul Eggert2015-06-051-1/+1
|
* acl-permissions: port to older AIX, C89 HP-UXPaul Eggert2015-06-051-44/+49
| | | | | | | * lib/get-permissions.c (get_permissions): If USE_ACL && HAVE_GETACL /* HP-UX */, don't assume C99. If USE_ACL && HAVE_STATACL /* older AIX */, add missing decl that broke a build, reported by Michael Felt.
* qacl: Reimplement qset_acl and qcopy_acl (Bug#20666)Andreas Gruenbacher2015-05-271-0/+280
Implement get_permissions and set_permissions primitives for getting all the permissions of a file, storing them, and later setting them. (In the minimal case, the permissions consist only of a file mode.) Reimplement qset_acl and qcopy_acl based on these new primitives: this avoids code duplication and makes error handling more consistent. The Solaris and Cygwin code still uses duplicate code paths for setting a file mode while making sure that no acls exist and setting an explicit acl; this is no worse than before, but could be cleaned up. The AIX code still doesn't read ACLs, it only makes sure that acls don't get in the way when setting a file mode. * lib/acl-internal.h (struct permission_context): New data structure. (get_permissions, set_permissions, free_permission_context): Declare. * lib/acl-internal.c (free_permission_context): New helper function. * lib/get-permissions.c (get_permissions): New helper function split off from qcopy_acl. * lib/set-permissions.c: (set_acls_from_mode): On Solaris, Cygwin, and AIX, set a file's permissions based only on a file mode. (acl_from_mode, context_acl_from_mode, context_aclv_from_mode): All other platforms construct a temporary acl from the file mode and set that acl in the same way as setting an acl read from the source file. This should help avoid code duplication and inconsistent / buggy behavior. (set_acls): New helper function Split off from qcopy_acl. (chmod_or_fchmod): Moved here from qset-acl.c. (set_permissions): New helper function. * lib/qcopy-acl.c (qcopy_acl): Rewrite using get_permissions and set_permissions. * lib/qset-acl.c (qset_acl): Rewrite using set_permissions. * modules/qacl: Add get-permissions.c and set-permissions.c.