]> Savannah Git Hosting - gnulib.git/commitdiff
qset-acl, acl: Improve comments.
authorOndrej Valousek <ondrej.valousek.xm@renesas.com>
Tue, 17 Jan 2023 17:31:18 +0000 (18:31 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 17 Jan 2023 18:30:02 +0000 (19:30 +0100)
* lib/qset-acl.c (qset_acl): Improve comments.
* lib/set-acl.c (set_acl): Likewise.

ChangeLog
lib/qset-acl.c
lib/set-acl.c

index ad96022ef7caac501810ea2d354ba31edc778ebe..193d4ff3a9682c736716381c2355f8aa86ffeec5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-01-17  Ondrej Valousek  <ondrej.valousek.xm@renesas.com>
+
+       qset-acl, acl: Improve comments.
+       * lib/qset-acl.c (qset_acl): Improve comments.
+       * lib/set-acl.c (set_acl): Likewise.
+
 2023-01-17  Bruno Haible  <bruno@clisp.org>
 
        fflush: Fix a buffer overrun on 32-bit Android.
index c3442d060fa745f8391dfd67538aeb9a30c4ed38..23c39ce439ae1ec2238b9a4117500d66d2577160 100644 (file)
 
 #include "acl-internal.h"
 
-
-/* Set the access control lists of a file. If DESC is a valid file
-   descriptor, use file descriptor operations where available, else use
-   filename based operations on NAME.  If access control lists are not
-   available, fchmod the target file to MODE.  Also sets the
-   non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
-   to those from MODE if any are set.
+/* Set the access control lists of a file to match *exactly* MODE (this might
+   remove inherited ACLs). Note chmod() tends to honor inherited/default
+   ACLs. If DESC is a valid file descriptor, use file descriptor operations
+   where available, else use filename based operations on NAME.  If access
+   control lists are not available, fchmod the target file to MODE.  Also
+   sets the non-permission bits of the destination file
+   (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
    Return 0 if successful.  Return -1 and set errno upon failure.  */
 
 int
index 9111911864821e298f90c74f7f4b3ed76b2e4d69..fac5665df2f3d829f5be899999201f910e693313 100644 (file)
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-
-/* Set the access control lists of a file. If DESC is a valid file
-   descriptor, use file descriptor operations where available, else use
-   filename based operations on NAME.  If access control lists are not
-   available, fchmod the target file to MODE.  Also sets the
-   non-permission bits of the destination file (S_ISUID, S_ISGID, S_ISVTX)
-   to those from MODE if any are set.
-   Return 0 if successful.  On failure, output a diagnostic, set errno and
-   return -1.  */
+/* Set the access control lists of a file to match *exactly* MODE (this might
+   remove inherited ACLs). Note chmod() tends to honor inherited/default
+   ACLs. If DESC is a valid file descriptor, use file descriptor operations
+   where available, else use filename based operations on NAME.  If access
+   control lists are not available, fchmod the target file to MODE.  Also
+   sets the non-permission bits of the destination file
+   (S_ISUID, S_ISGID, S_ISVTX) to those from MODE if any are set.
+    Return 0 if successful.  On failure, output a diagnostic, set errno and
+    return -1.  */
 
 int
 set_acl (char const *name, int desc, mode_t mode)