From f94af20dd768db422f095b57c200a47e9632ddc0 Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Tue, 23 Jul 2013 09:43:40 -0600 Subject: Use the proper permissions on /etc/shadow (LP: #1188820). Gbp-Pq: shadow_permissions.patch. --- waagent | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'waagent') 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.") -- cgit v1.2.3