* lib/qset-acl.c (qset_acl): Improve comments.
* lib/set-acl.c (set_acl): Likewise.
+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.
#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
#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)