Skip to content

Commit

Permalink
Relax permissions on systemd-journal-remote configuration
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
DaanDeMeyer committed May 29, 2024
1 parent 17010a2 commit 1ea5a14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mkosi/qemu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, 0o755)

Check failure

Code scanning / CodeQL

Overly permissive file permissions High

Overly permissive mask in chmod sets file to world readable.

# 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(
Expand Down

0 comments on commit 1ea5a14

Please sign in to comment.