-
Notifications
You must be signed in to change notification settings - Fork 190
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
base: master
Are you sure you want to change the base?
Conversation
This test also serves as the basis for checking additional types of files promises. Ticket: CFE-4591 Changelog: None
|
…ions This is failing. It shows that when move_obstructions is used when the promiser is targeting a symlink that the symlink is not replaced with a plain file. Instead the content of the symlinked file is modified.
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.
…nt attribute Ticket: CFE-4591 Changelog: Title Co-authored-by: Qwen Code <[email protected]> Co-authored-by: Gemini <[email protected]>
b235aba
to
e9a8f71
Compare
edit_template_string is only used with template_method inline_mustache.
An `assert` should be sufficient to let the static analysis tools know that these pointers are not `NULL`. Please squash this one with e9a8f71. Signed-off-by: Lars Erik Wik <[email protected]>
Handle the edge case where obstruction filepath is too long to fit in `backup` buffer. Please squash with e9a8f71. Signed-off-by: Lars Erik Wik <[email protected]>
Please squash with e9a8f71. Signed-off-by: Lars Erik Wik <[email protected]>
Please squash with e9a8f71 Signed-off-by: Lars Erik Wik <[email protected]>
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.
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