cfengine/core — pull request #1623 by kacfengine (2014-04-04 11:25:58+00:00)
Title: Fix infinite recursion when checking cf_promises_validated.

GenericAgentIsPolicyReloadNeeded() calls
GenericAgentTagReleaseDirectory(), so we cannot also call the former
from within there. This only happens if the timestamp within
cf_promises_validated is newer than the current time, which shouldn't
be often, but is not impossible either.

Within generic_agent.c, GenericAgentTagReleaseDirectory() is only
called after GenericAgentIsPolicyReloadNeeded() has already been
checked, so there is no point in calling it a second time. However, it
changes the behavior of "cf-promises -T", which will now
unconditionally write cf_promises_validated, whereas before it would
only write if the timestamp was older than any of the policy files.