← Back to team overview

cloud-init-dev team mailing list archive

[Merge] lp:~gholms/cloud-init/sudoers-perms into lp:cloud-init

 

Garrett Holmstrom has proposed merging lp:~gholms/cloud-init/sudoers-perms into lp:cloud-init.

Requested reviews:
  cloud init development team (cloud-init-dev)

For more details, see:
https://code.launchpad.net/~gholms/cloud-init/sudoers-perms/+merge/125873

sudo complains about the permissions on the sudoers config file that cloud-init writes:

[ec2-user@ip-10-166-110-107 ~]$ sudo -s
sudo: /etc/sudoers.d/90-cloud-init-users is mode 0644, should be 0440

This patch makes the file's permissions match sudo's recommendation.
-- 
https://code.launchpad.net/~gholms/cloud-init/sudoers-perms/+merge/125873
Your team cloud init development team is requested to review the proposed merge of lp:~gholms/cloud-init/sudoers-perms into lp:cloud-init.
=== modified file 'cloudinit/distros/__init__.py'
--- cloudinit/distros/__init__.py	2012-09-18 17:27:41 +0000
+++ cloudinit/distros/__init__.py	2012-09-23 02:38:18 +0000
@@ -339,7 +339,7 @@
             content += "\n"
 
         if not os.path.exists(sudo_file):
-            util.write_file(sudo_file, content, 0644)
+            util.write_file(sudo_file, content, 0440)
 
         else:
             try: