Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.21.x] Carefully handle symlinks at the last phase of VerifyFilePromise() #5445

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

vpodzime
Copy link
Contributor

If the promiser is a symlink, lstat() and stat() give different results. We need to use lstat() to get info about the promiser (symlink) itself.

Also, we need to call VerifyFileLeaf() on symlinks as well as on regular files.

Ticket: ENT-11235
Changelog: Ownership of symlinks is now handled properly (cherry picked from commit 84b6783)

Conflicts:
tests/acceptance/28_inform_testing/01_files/perms.cf.expected

If the promiser is a symlink, `lstat()` and `stat()` give
different results. We need to use `lstat()` to get info about the
promiser (symlink) itself.

Also, we need to call `VerifyFileLeaf()` on symlinks as well as
on regular files.

Ticket: ENT-11235
Changelog: Ownership of symlinks is now handled properly
(cherry picked from commit 84b6783)

Conflicts:
  tests/acceptance/28_inform_testing/01_files/perms.cf.expected
@vpodzime vpodzime merged commit 3f2ba01 into cfengine:3.21.x Feb 12, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant