puppetlabs/puppet — pull request #189 by joshcooper (2011-10-31 16:42:40+00:00)
Title: Ticket/2.7.x/10269 search traverse bit not set

Previously, puppet would not set the user, group, or other
execute/search bits for newly created directories. This was a
regression introduced in 2.7.6 in commit
22bfd9ce83ff52d909a43c370ba71112ed4961a4.

This was caused because the dirmask'ing was occurring when munging the
mode property, but that was occurring prior to the ensure property
being synced, which is when the directory is actually created. And
since the directory did not exist the executable bits were never added.

Similar failures would occur if the path referred to a non-executable
file or link that we wanted to change to a directory.

This commit reverts the changes to the dirmask and munge methods, and
moves the call to dirmask back to the retrieve method. This way we can
be sure that the directory has been created by the time we call
dirmask.

Ideally, we could know at munge time whether we are going to create a
directory as opposed to a file or link. But the logic for that depends
on many other properties, e.g. source, target, etc. The easiest thing
is to just revert the change.

Also while investigating this issue, I found another regression having
to do with following symlinks (#10315), and another long standing
issue where puppet makes non-executable files executable when
ovewriting an executable directory (#10365). I added tests for these
and marked them as pending.