diff --git a/cf-agent/verify_files.c b/cf-agent/verify_files.c index fd641def4f..54450593a2 100644 --- a/cf-agent/verify_files.c +++ b/cf-agent/verify_files.c @@ -599,9 +599,9 @@ static PromiseResult VerifyFilePromise(EvalContext *ctx, char *path, const Promi // Once more in case a file has been created as a result of editing or copying - exists = (stat(changes_path, &osb) != -1); + exists = (lstat(changes_path, &osb) != -1); - if (exists && (S_ISREG(osb.st_mode)) + if (exists && (S_ISREG(osb.st_mode) || S_ISLNK(osb.st_mode)) && (!a.haveselect || SelectLeaf(ctx, path, &osb, &(a.select)))) { VerifyFileLeaf(ctx, path, &osb, &a, pp, &result); diff --git a/tests/acceptance/10_files/10_links/owner-mismatch-link-and-target.cf b/tests/acceptance/10_files/10_links/owner-mismatch-link-and-target.cf index 5625a4b7c4..1202fab036 100755 --- a/tests/acceptance/10_files/10_links/owner-mismatch-link-and-target.cf +++ b/tests/acceptance/10_files/10_links/owner-mismatch-link-and-target.cf @@ -28,13 +28,7 @@ bundle agent test "description" -> { "CFE-3116" } string => "Test that promising ownership of symlinks is not confused by target"; - "test_soft_fail" - string => "any", - meta => { "CFE-3116" }; - - # this test isn't super comprehensive, once the issue is fixed, it will - # need to be skipped on various platforms, at least windows. - # "test_skip_unsupported" string => "windows"; + "test_skip_unsupported" string => "windows"; files: "/tmp/symlink" diff --git a/tests/acceptance/28_inform_testing/01_files/perms.cf.expected b/tests/acceptance/28_inform_testing/01_files/perms.cf.expected index 4f0cb75e2f..c45c216d86 100644 --- a/tests/acceptance/28_inform_testing/01_files/perms.cf.expected +++ b/tests/acceptance/28_inform_testing/01_files/perms.cf.expected @@ -1,3 +1,2 @@ info: Regular file '/tmp/TESTDIR.cfengine/foo' had permissions 0600, changed it to 0777 - info: Symbolic link to regular file '/tmp/TESTDIR.cfengine/baz' had permissions 0600, changed it to 0777 info: Directory '/tmp/TESTDIR.cfengine/foobar' had permissions 0700, changed it to 0777