Merge ~aieri/charm-nagios:bug/1811997 into ~nagios-charmers/charm-nagios:master

Proposed by Andrea Ieri
Status: Merged
Approved by: Xav Paice
Approved revision: f71f6cc142deb266b41e243ce5de694438b0f4c3
Merged at revision: ac353d33f77c7d62d42c0cc5526b07669736ee30
Proposed branch: ~aieri/charm-nagios:bug/1811997
Merge into: ~nagios-charmers/charm-nagios:master
Diff against target: 12 lines (+1/-0)
1 file modified
hooks/upgrade-charm (+1/-0)
Reviewer Review Type Date Requested Status
Xav Paice (community) Approve
Giuseppe Petralia Approve
Canonical IS Reviewers Pending
Review via email: mp+378116@code.launchpad.net

Commit message

Write all password files with mode 0400

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

Needs fixing

review: Needs Fixing
Revision history for this message
Giuseppe Petralia (peppepetra) wrote :

lgtm

review: Approve
Revision history for this message
Xav Paice (xavpaice) wrote :

Trivial change, will merge without Canonical IS Reviewers input (been a couple of weeks waiting now).

review: Approve
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision ac353d33f77c7d62d42c0cc5526b07669736ee30

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
2index 1016391..b5e9447 100755
3--- a/hooks/upgrade-charm
4+++ b/hooks/upgrade-charm
5@@ -351,6 +351,7 @@ def update_password(account, password):
6 if password:
7 with open(account_file, 'w') as f:
8 f.write(password)
9+ os.fchmod(f.fileno(), 0o0400)
10 subprocess.call(['htpasswd', '-b', '/etc/nagios3/htpasswd.users',
11 account, password])
12 else:

Subscribers

People subscribed via source and target branches