Skip to content
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

SUSE: sysconfig values may get clobbered #2607

Open
FladoToo opened this issue Jun 8, 2022 · 2 comments
Open

SUSE: sysconfig values may get clobbered #2607

FladoToo opened this issue Jun 8, 2022 · 2 comments
Assignees

Comments

@FladoToo
Copy link

FladoToo commented Jun 8, 2022

if value == '"AUTO"' or value == '"{0}"'.format(hostname):

Looking at wicked's source, this is buggy. Wicked accepts values with single quotes, double quotes, and no quotes at all, so this code should be prepared to react to all those variants ("AUTO", 'AUTO', and AUTO) and not clobber them if the wrong quotes are used.

https://github.com/openSUSE/wicked/blob/a0ba667fd3101bea28c7b0bb3d8692accf6069ae/src/sysconfig.c#L313-L318

@narrieta
Copy link
Member

narrieta commented Jun 8, 2022

Thanks, fixed by #1951

@narrieta narrieta closed this as completed Jun 8, 2022
@FladoToo
Copy link
Author

FladoToo commented Jun 9, 2022

@narrieta, do you mean #2583? Because #1951 is from January 2021...
Anyway, the fix in #2583 is very welcome, but not enough. It only repairs the damage done by the buggy agent and that only while de-provisioning. Meanwhile any hostname change would clobber any value that uses the wrong quotes or no quotes at all. Since AUTO, "AUTO" and 'AUTO' are all valid entries for wicked I don't think any of them should be clobbered by the agent at the first host rename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants