]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Relax permissions on systemd-journal-remote configuration 2730/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 29 May 2024 12:03:08 +0000 (14:03 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 29 May 2024 12:06:22 +0000 (14:06 +0200)
Let's make sure the systemd-journal-remote process we start can always
read the configuration, even if it's running as a less privileged user.

mkosi/qemu.py

index 62a5ff549fbbe26458c931fa9b5861730e997a76..333ead55cd9a004a1a5c298282ffa66f78a96289 100644 (file)
@@ -450,6 +450,8 @@ def start_journal_remote(config: Config, sockfd: int) -> Iterator[None]:
         INVOKING_USER.chown(d)
 
     with tempfile.NamedTemporaryFile(mode="w", prefix="mkosi-journal-remote-config-") as f:
+        os.chmod(f.name, 0o644)
+
         # Make sure we capture all the logs by bumping the limits. We set MaxFileSize=4G because with the compact mode
         # enabled the files cannot grow any larger anyway.
         f.write(