stages/nm.conn: set 0o600 permission for files
NetworkManager will refuse to load connection files that have the to wide permsisions set. Restrict the files we create to 0o600.
This commit is contained in:
parent
6f7382b885
commit
bfcc92a92e
1 changed files with 2 additions and 0 deletions
|
|
@ -188,6 +188,8 @@ def main(tree, options):
|
|||
config.set(name, option, val)
|
||||
|
||||
with open(os.path.join(cfgdir, filename), "w") as f:
|
||||
# need restrictive permissions
|
||||
os.fchmod(f.fileno(), 0o600)
|
||||
config.write(f, space_around_delimiters=False)
|
||||
|
||||
return 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue