summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Howard <ben.howard@ubuntu.com>2013-07-23 09:43:40 -0600
committerusd-importer <ubuntu-server@lists.ubuntu.com>2013-07-23 16:43:22 +0000
commitf94af20dd768db422f095b57c200a47e9632ddc0 (patch)
treed5bbdce7d747c49de781e624a177aec0e770b2e0
parentcbd86cc7f81ef71032ca7fb3fef80ab2bea2793a (diff)
downloadvyos-walinuxagent-f94af20dd768db422f095b57c200a47e9632ddc0.tar.gz
vyos-walinuxagent-f94af20dd768db422f095b57c200a47e9632ddc0.zip
Use the proper permissions on /etc/shadow (LP: #1188820).
Gbp-Pq: shadow_permissions.patch.
-rw-r--r--waagent2
1 files changed, 1 insertions, 1 deletions
diff --git a/waagent b/waagent
index 57c3ca3..9a681aa 100644
--- a/waagent
+++ b/waagent
@@ -2423,7 +2423,7 @@ def DeleteRootPassword():
ReplaceFileContentsAtomic(filepath, "root:*LOCK*:14600::::::\n" + "\n".join(filter(lambda a: not
a.startswith("root:"),
GetFileContents(filepath).split('\n'))))
- os.chmod(filepath, 0000)
+ os.chmod(filepath, 0640)
if IsRedHat():
Run("chcon system_u:object_r:shadow_t:s0 " + filepath)
Log("Root password deleted.")