]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-systemd-tmpfiles: skip when /tmp has unexpected ownership
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 25 Oct 2023 16:39:04 +0000 (17:39 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 26 Oct 2023 13:46:15 +0000 (14:46 +0100)
commit8473ece90e53040931c880bcbff623f1a5c037cd
tree2dd4c01f66bdc8430b26a6989ef69140051ea95d
parent6aa77f9284070229f73063e15cb4b4aa59cb6020
test-systemd-tmpfiles: skip when /tmp has unexpected ownership

The systemd-tmpfiles binary will report a fatal error if /tmp is not owned
either by root, or by the current user:

  Detected unsafe path transition /tmp (owned by nobody) →
    /tmp/test-systemd-tmpfiles.a8qc6n18 (owned by berrange)
    during canonicalization of
    tmp/test-systemd-tmpfiles.a8qc6n18/test-content.7chd7rdi

When doing development inside a 'toolbox' container (which is required
on a Fedora SilverBlue distro), /tmp is owned by 'nobody', because it
has been passed through from the host and host UID 0 gets mapped to
UID 65536 by usernamespaces. This triggers the unsafe path transition
error message.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
test/test-systemd-tmpfiles.py