Commit 72aefc89 authored by Tomáš Peterka's avatar Tomáš Peterka Committed by Rafael Monnerat

[format] Make resource file read-only for the slapuser

parent dcde50e2
...@@ -929,8 +929,7 @@ class Partition(object): ...@@ -929,8 +929,7 @@ class Partition(object):
with open(file_path, "wb") as fo: with open(file_path, "wb") as fo:
json.dump(data, fo, sort_keys=True, indent=4) json.dump(data, fo, sort_keys=True, indent=4)
owner_pw = pwd.getpwnam(self.user.name) owner_pw = pwd.getpwnam(self.user.name)
os.chmod(file_path, 0o640) os.chmod(file_path, 0o644)
os.chown(file_path, owner_pw.pw_uid, owner_pw.pw_gid)
class User(object): class User(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment