cfengine/core — pull request #213 by mvpel (2012-10-29 05:11:19+00:00)
Title: Fix non-convergent HP-UX shared lib perms in failsafe.cf (R#1179)

HP-UX shared libraries must be executable, since the OS uses the file perms to set the permissions on the memory map, and the memory pages for a mapped shared library must have execute permissions in order for the shared library to be used.

An earlier commit (6edd6f9a8000c4fecc5e521ef048eeb69c3c99b5) added code to set the correct 755 permissions for HP-UX, but did not add an exception for non-HP-UX systems for 644 permissions. This led to a non-convergent pair of promises, one of which set mode 644 and the other which set 755 each time CFEngine ran on an HP-UX system.

This commit corrects that problem: it creates a new "perms" body - u_shared_lib_perms - which sets mode 755 in "hpux" context and 644 otherwise, and eliminates the duplicate promiser, providing convergence on HP-UX systems while also simplifying the failsafe.cf.