mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
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:
parent
ac83de6635
commit
03b4a78fd0
@ -11,3 +11,5 @@ def set_domain(domain_name: str):
|
|||||||
"""Write a file containing domain name."""
|
"""Write a file containing domain name."""
|
||||||
domain_file = pathlib.Path('/var/lib/quassel/domain-freedombox')
|
domain_file = pathlib.Path('/var/lib/quassel/domain-freedombox')
|
||||||
domain_file.write_text(domain_name, encoding='utf-8')
|
domain_file.write_text(domain_name, encoding='utf-8')
|
||||||
|
# Ensure that that file is readable by non-privileged process.
|
||||||
|
domain_file.chmod(0o644)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user