Class umask::umask
In: /tmp/puppet/modules/umask/manifests/init.pp
Parent:

Class: umask

File: /etc/puppet/modules/umask/manifests/init.pp

Parameters: none

Guide References:

  2.2.4.1
  2.3.4.4

CCE References:

  CCE-4220-0
  CCE-3844-8
  CCE-3870-3
  CCE-4227-5

Notes: Any statement that uses the umask-replace function will fail to

  add umask 077 to the file, but it will correct any already-present umask
  by changing it to 077.

Resources

Resources

Augeas::Basic-change["Set Daemon umask, #2.2.4.1"]
   file => "/etc/sysconfig/init"
   lens => "shellvars.lns"
   changes => "set UMASK 027"

GuideSection 2.2.4.1 CCE-4220-0

Exec["/etc/login.defs-add-umask"]
   command => "echo 'umask 077' >> /etc/login.defs"
   onlyif => "/usr/bin/test `/bin/grep -i umask /etc/login.defs | /usr/bin/wc -w` -eq 0"

GuideSection 2.3.4.4-2

Exec["/etc/profile-add-umask"]
   command => "echo 'umask 077' >> /etc/profile"
   onlyif => "/usr/bin/test `/bin/grep -i umask /etc/profile | /usr/bin/wc -w` -eq 0"

GuideSection 2.3.4.4 CCE-3870-3

Umask-replace["/etc/login.defs"]
   file => "/etc/login.defs"
Umask-replace["etc_bashrc"]
   file => "/etc/bashrc"
Umask-replace["etc_csh.cshrc"]
   file => "/etc/csh.cshrc"
Umask-replace["etc_csh.login"]
   file => "/etc/csh.login"
Umask-replace["etc_profile"]
   file => "/etc/profile"
Umask-replace["etc_profile.d"]
   file => "/etc/profile.d/*"
Umask-replace["root_bashprofile"]
   file => "/root/.bash_profile"
Umask-replace["root_bashrc"]
   file => "/root/.bashrc"
Umask-replace["root_cshrc"]
   file => "/root/.cshrc"
Umask-replace["root_tcshrc"]
   file => "/root/.tcshrc"

[Validate]