tmpfiles: add the a and A entries, POSIX ACLs

The tpm2-tss package sets a default ACL on its keystore:

    d  /var/lib/tpm2-tss/system/keystore 2775 tss tss - -
    a+ /var/lib/tpm2-tss/system/keystore -    -   -   - default:group:tss:rwx

tmpfiles skipped the a+ line as unsupported, so what was created in
the keystore did not get the group access it relies on.

Add a and A, the latter recursive, with and without +.  With + the
entries are added to the ACL of the path, without it they replace it.
The ACL is written to the system.posix_acl_access and _default
extended attributes in the format the kernel uses, which saves a
dependency on libacl.  As with setfacl, the mask is made to cover the
named entries unless the entry sets one.

An ACL can have at most 32 entries.  A path with more is left as it
is, with a warning.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2026-11-20 18:02:33 +01:00
1 parent 3bc7c83731
commit f8571aba1f
4 files changed
+406

No files matched your search

+2
View File
@@ -81,6 +81,7 @@ EXTRA_DIST += start-stop-sysv.sh
EXTRA_DIST += start-stop-serv.sh
EXTRA_DIST += signal-service.sh
EXTRA_DIST += testserv.sh
EXTRA_DIST += tmpfiles-acl.sh
EXTRA_DIST += tmpfiles-arg.sh
EXTRA_DIST += tmpfiles-perm.sh
EXTRA_DIST += unexpected-restart.sh
@@ -160,6 +161,7 @@ TESTS += start-stop-serv.sh
TESTS += signal-service.sh
if TESTSERV
TESTS += testserv.sh
TESTS += tmpfiles-acl.sh
TESTS += tmpfiles-arg.sh
TESTS += tmpfiles-perm.sh
endif