puppetlabs/puppet — pull request #2192 by domcleal (2013-12-27 12:59:53+00:00)
Title: (PUP-1255) Fix assumed default file mode to 0644

When a file is created with content, the assumed default mode should be 0644,
but this wasn't being explicitly set. The secure file replacement (in
Puppet::Util.replace_file) was instead defaulting to a file mode of 0600.
The assumed default mode is now explicitly set when calling replace_file.

The code path for file creation without content continues to set a umask of
0022 if no mode is specified on the resource, so new files are implicitly
created with a mode of 0644.