Commit 7caf5dbc authored by Kolbjørn Barmen's avatar Kolbjørn Barmen

Fix insecure file permissions

parent 8330e313
......@@ -68,7 +68,8 @@ def login():
username = input('Username: ')
password = getpass.getpass()
result = invoke('user.login', user=username, password=password)
with open(os.path.join(os.path.expanduser('~'), '.zabbixauth'), 'w') as fh:
authfile = os.path.join(os.path.expanduser('~'), '.zabbixauth')
with os.fdopen(, os.O_WRONLY | os.O_CREAT, 0o600), 'w') as fh:
fh.write(result + "\n")
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