From 07822677ea9d15508887d2a52fcb5d4f5edd312e Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Thu, 26 Sep 2013 08:21:35 -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(-) 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