daemon: handle quoted values in kargs deletion#5562
Conversation
There was a problem hiding this comment.
Code Review
This pull request addresses the issue of deleting kernel arguments that may be quoted. The introduction of smart_kernel_args_delete and the modifications in kernel_arg_apply_patching provide a way to handle kernel arguments with spaces, whether they are quoted or not. The SAST Reconnaissance Pass did not find any vulnerabilities. I have a couple of suggestions to refactor duplicated code blocks into loops, which should improve maintainability without changing the logic.
|
Thanks for the PR. Offhand...it feels quite heuristic - and also arguably the fix should land in the ostree kargs code. I think we actually implicitly handle this today in https://bootc-dev.github.io/bootc/internals/bootc_kernel_cmdline/index.html - so another angle is to try rebasing on top of that crate. |
ff056c3 to
9dd68be
Compare
This replaces the heuristic quote-handling workaround with proper kernel command line parsing from the bootc-kernel-cmdline crate, which correctly handles quoted values during comparison. Fixes issue #2159.
9dd68be to
dcf87bf
Compare
|
@cgwalters could you take another look? Thank you! |
Fixes issue #2159. The daemon now handles unquoted inputs for kernel arguments that were quoted in the boot config due to spaces.