fix permissions on /etc/sudoers.d file to be 0440 not 0644

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.

Note: ubuntu's sudo doesn't seem to complain about 644, but 440 is probably
better.
This commit is contained in:
Garrett Holmstrom 2012-09-24 14:03:19 -04:00 committed by Scott Moser
commit faba64a314

View File

@ -339,7 +339,7 @@ class Distro(object):
content += "\n" content += "\n"
if not os.path.exists(sudo_file): if not os.path.exists(sudo_file):
util.write_file(sudo_file, content, 0644) util.write_file(sudo_file, content, 0440)
else: else:
try: try: