diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-23 15:18:29 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2022-12-23 15:24:55 -0800 |
commit | 35bd46f0c816948dc1a0430c8ba8b10a01167320 (patch) | |
tree | fffb301e9137c8446b9a546ff233b7d83a9ee2bd /doc | |
parent | a3efddb96f5f121b8a5bb1310dc82407546fd255 (diff) | |
download | gnulib-35bd46f0c816948dc1a0430c8ba8b10a01167320.tar.gz |
file-has-acl: improve recent NFSv4 support
This fixes a link failure with emacsclient on GNU/Linux. This
program wants file_has_acl but none of the other ACL primitives,
so it doesn’t link acl-internal.o; this way it doesn’t need to
link with -lacl. While I was at it I reviewed the recent changes,
fixed some unlikely overflow bugs, and adjusted to GNU style.
* doc/acl-nfsv4.txt: Remove. Its contents are now in a
comment in lib/file-has-acl.c.
* lib/acl-internal.c, lib/acl-internal.h: Move recent changes
relating to acl_nfs4_nontrivial to lib/file-has-acl.c, so that
there is no trouble linking programs that need only file_has_acl.
* lib/file-has-acl.c (acl_nfs4_nontrivial): Move here from
lib/acl-internal.c, so that we needn't link -lacl in
programs that want only file_has_acl, such as emacsclient.
Do not assume a char buffer is aligned for uint32_t.
Check more carefully for buffer read overrun.
Allow up to 6 ACEs, since other code does; but check
that they’re distinct. Avoid integer overflow.
Use memcmp rather than strncmp to compare memory blocks.
(file_has_acl): Preserve initial errno instead of setting to 0.
Allocate a bit more room for trivial ACL buffer.
Use EINVAL for botchedk NFSv4 ACLs (which shouldn’t happen).
Diffstat (limited to 'doc')
-rw-r--r-- | doc/acl-nfsv4.txt | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/doc/acl-nfsv4.txt b/doc/acl-nfsv4.txt deleted file mode 100644 index 71352f58d0..0000000000 --- a/doc/acl-nfsv4.txt +++ /dev/null @@ -1,17 +0,0 @@ -General introduction: - https://linux.die.net/man/5/nfs4_acl - -The NFSv4 acls are defined in RFC7530 and as such, every NFSv4 server supporting ACLs -will support this kind of ACLs (note the difference from POSIX draft ACLs) - -The ACLs can be obtained via the nfsv4-acl-tools, i.e. - -$ nfs4_getfacl <file> - -# file: <file> -A::OWNER@:rwaDxtTnNcCy -A::GROUP@:rwaDxtTnNcy -A::EVERYONE@:rwaDxtTnNcy - -Gnulib is aiming to only provide a basic support of these, i.e. recognize trivial -and non-trivial ACLs |