quassel: Explicitly set permissions on the domain configuration file

Closes: #2564

Tests:

- Changing the domain name in quassel app page set the expected file
permissions. Changing the value in the code results in file getting created with
changed permissions.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2026-02-18 16:38:25 -08:00 committed by James Valleroy
parent ac83de6635
commit 03b4a78fd0
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -11,3 +11,5 @@ def set_domain(domain_name: str):
"""Write a file containing domain name."""
domain_file = pathlib.Path('/var/lib/quassel/domain-freedombox')
domain_file.write_text(domain_name, encoding='utf-8')
# Ensure that that file is readable by non-privileged process.
domain_file.chmod(0o644)