CFE-4591: move_obstructions should replace symlinks#5894
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.
@larsewi i had done that safe_attr and safe_sb to avoid this check
There was a problem hiding this comment.
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.
@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.
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.
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.
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