-
Notifications
You must be signed in to change notification settings - Fork 189
CFE-4591: move_obstructions should replace symlinks #5894
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
Conversation
|
|
As expected: |
|
| return false; | ||
| } | ||
|
|
||
| const mode_t st_mode = sb->st_mode; |
Check notice
Code scanning / CodeQL
Pointer argument is dereferenced without checking for NULL Note
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.
@larsewi i had done that safe_attr and safe_sb to avoid this check
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.
I thought so. But it should not be an issue anymore with the assert's.
Assigning them to a local variable does not really solve the issue. Although, you had some if-statements that in fact does solve it. However, these variables should not be NULL, so an assert be sufficient.
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.
@larsewi I'm sorry, it's been three weeks and I no longer understand this context. You said you would push some commit on top monday. Sounds great to me I can squash it all together at the end.
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.
I'm very sorry @nickanderson. I see that you have actually done exactly what I asked for. Looks great 🚀
b235aba to
e9a8f71
Compare
craigcomstock
left a comment
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.
Looks good. Would be ready to go after squashing a few commits and passing tests.
larsewi
left a comment
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.
Great 🚀 Please squash and merge!
|
thanks! |
- Added test for copy_from and move_obstructions - Added test and support for content attribute targeting symlink with move_obstructions - Added test and support for move_obstructions for symlinks targeted by inline_mustache - Added tests and support for edit_template mustache and cfengine - Added test for edit_line, disabled because it's failing Ticket: CFE-4591 Changelog: None Co-authored-by: Qwen Code <qwen-code@alibaba.com> Co-authored-by: Gemini <gemini-copilot@google.com> Co-authored-by: Lars Erik Wik <lars.erik.wik@northern.tech> Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
3f60a9e to
4f3bb4a
Compare
Added test for copy_from which already respects move_obstructions. Foundation for testing other files promise behavior with move_obstructions and symlinks.
Ticket: CFE-4591