nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #00753
[Merge] ~aieri/nagios-charm:bug/1811997 into nagios-charm:master
Andrea Ieri has proposed merging ~aieri/nagios-charm:bug/1811997 into nagios-charm:master.
Requested reviews:
Nagios Charm developers (nagios-charmers)
Related bugs:
Bug #1811997 in Nagios Charm: "Password(s) stored on file(s) readable by anyone"
https://bugs.launchpad.net/nagios-charm/+bug/1811997
For more details, see:
https://code.launchpad.net/~aieri/nagios-charm/+git/nagios-charm/+merge/378116
--
Your team Nagios Charm developers is requested to review the proposed merge of ~aieri/nagios-charm:bug/1811997 into nagios-charm:master.
diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
index 1016391..87127fb 100755
--- a/hooks/upgrade-charm
+++ b/hooks/upgrade-charm
@@ -351,6 +351,7 @@ def update_password(account, password):
if password:
with open(account_file, 'w') as f:
f.write(password)
+ f.fchmod(f.fileno(), 0o0400)
subprocess.call(['htpasswd', '-b', '/etc/nagios3/htpasswd.users',
account, password])
else:
Follow ups