summaryrefslogtreecommitdiff
path: root/test/test-systemd-tmpfiles.py
Commit message (Collapse)AuthorAgeFilesLines
* test/test-systemd-tmpfiles.py: do not fail if machine-id is missingLuca Boccassi2022-10-251-1/+1
| | | | When building in a chroot there might not be any machine-id
* tmpfiles: optionally, decode string to write to files with base64Lennart Poettering2022-07-151-0/+10
| | | | | | This is useful to use "f" or "w" to write arbitrary binary files to disk, or files with newlines and similar (for example to provision SSH host keys and similar).
* shared/specifier: fix %u/%U/%g/%G when called as unprivileged userZbigniew Jędrzejewski-Szmek2022-03-291-4/+4
| | | | | | | | | | | | | | | | We would resolve those specifiers to the calling user/group. This is mostly OK when done in the manager, because the manager generally operates as root in system mode, and a non-root in user mode. It would still be wrong if called with --test though. But in systemctl, this would be generally wrong, since we can call 'systemctl --system' as a normal user, either for testing or even for actual operation with '--root=…'. When operating in --global mode, %u/%U/%g/%G should return an error. The information whether we're operating in system mode, user mode, or global mode is passed as the data pointer to specifier_group_name(), specifier_user_name(), specifier_group_id(), specifier_user_id(). We can't use userdata, because it's already used for other things.
* tmpfiles: add '=' action modifier.Allen Webb2021-06-081-2/+59
| | | | | | | | | | | Add the '=' action modifier that instructs tmpfiles.d to check the file type of a path and remove objects that do not match before trying to open or create the path. BUG=chromium:1186405 TEST=./test/test-systemd-tmpfiles.py "$(which systemd-tmpfiles)" Change-Id: If807dc0db427393e9e0047aba640d0d114897c26
* test: move test-systemd-tmpfiles.py from src/test to testYu Watanabe2021-01-191-0/+143
As the other test scripts, e.g. test-sysusers.sh, are located under test rather than src/test.