-
Notifications
You must be signed in to change notification settings - Fork 189
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
Carefully handle symlinks at the last phase of VerifyFilePromise() #5444
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks.
@cf-bottom please test this in Jenkins :) |
Sure, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/10429/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-10429/ |
06b58cd
to
20c21cb
Compare
Some acceptance tests need adjusting. Hopefully that's good news and the adapted tests will serve as tests for the new/right behavior. |
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
Setting permissions on symlinks should not act on targets. Ticket: CFE-4148 Changelog: None
9dd093e
to
b267435
Compare
@cf-bottom jenkins with exotics, please |
Alright, I triggered a build: (with exotics) Jenkins: https://ci.cfengine.com/job/pr-pipeline/10433/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-10433/ |
If the promiser is a symlink,
lstat()
andstat()
give different results. We need to uselstat()
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: None