-
Notifications
You must be signed in to change notification settings - Fork 208
fstab: Allow consecutive commas in mount options #866
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 works for me. However it doesn't parse: saying: Not sure whether we care. |
f8b99d8 to
78edf87
Compare
Good catch. I fixed the patch to test + address that now |
|
Looks fine to me. Note I'm unable to merge stuff in Augeas. |
|
Question for someone with more insight than me: Are empty mount options filtered out by |
|
In my testing, the multiple commas were ignored. Now looking at util-linux code the opstr parsing basically iterates over the string using ul_optstr_next: https://github.com/util-linux/util-linux/blob/master/lib/strutils.c#L1234 Option parsing stops at the first comma, and then next iteration strips all leading commas |
Fix the fstab lens to handle consecutive commas in mount options (e.g., "rw,,nodev"). This has been seen in the wild via libguestfs/ virt-v2v: https://issues.redhat.com/browse/RHEL-77279 Handle multiple commas as separators. Also handle multiple commas at the start and end of the option line, all like mount does. Co-Authored-By: Claude <[email protected]> Signed-off-by: Cole Robinson <[email protected]>
78edf87 to
d3d3518
Compare
|
Updated now to deal with leading commas too |
Fix the fstab lens to handle consecutive commas in mount options (e.g., "rw,,nodev"). This has been seen in the wild via libguestfs/ virt-v2v:
https://issues.redhat.com/browse/RHEL-77279
The fix changes the comma separator from matching a single comma to matching one or more consecutive commas.
🤖 Generated with Claude Code