[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Improve comments for [q]set-acl.c
From: |
Ondrej Valousek |
Subject: |
[PATCH] Improve comments for [q]set-acl.c |
Date: |
Tue, 17 Jan 2023 14:28:34 +0100 |
Hi Bruno, sorry, this patch should be fine now.
It improve comments for both functions
---
lib/qset-acl.c | 14 +++++++-------
lib/set-acl.c | 18 +++++++++---------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/lib/qset-acl.c b/lib/qset-acl.c
index c3442d060f..aecab8ead3 100644
--- a/lib/qset-acl.c
+++ b/lib/qset-acl.c
@@ -26,13 +26,13 @@
#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
diff --git a/lib/set-acl.c b/lib/set-acl.c
index 9111911864..0d20850444 100644
--- a/lib/set-acl.c
+++ b/lib/set-acl.c
@@ -28,15 +28,15 @@
#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)
--
2.39.0
- [PATCH] Improve comments for [q]set-acl.c,
Ondrej Valousek <=