tmpfiles: add conditionalized execute bit (X) support
authorMike Yuan <me@yhndnzj.com>
Fri, 16 Dec 2022 16:44:06 +0000 (00:44 +0800)
committerMike Yuan <me@yhndnzj.com>
Thu, 27 Apr 2023 07:15:09 +0000 (15:15 +0800)
commit26d98cdd78cb5283f5771bd5866997acc494b067
tree6b59215bfcd3ae90e8c54915916eff3c08b80b8d
parent49c778e6bf70ebf230989ab84e9ce7f1b26beef2
tmpfiles: add conditionalized execute bit (X) support

According to setfacl(1), "the character X stands for
the execute permission if the file is a directory
or already has execute permission for some user."

After this commit, parse_acl() would return 3 acl
objects. The newly-added acl_exec object contains
entries that are subject to conditionalized execute
bit mangling. In tmpfiles, we would iterate the acl_exec
object, check the permission of the target files,
and remove the execute bit if necessary.

Here's an example entry:
A /tmp/test - - - - u:test:rwX

Closes #25114
man/tmpfiles.d.xml
src/shared/acl-util.c
src/shared/acl-util.h
src/tmpfiles/tmpfiles.c