Red Hat Bugzilla – Bug 12258
no checking that lilo strings are valid
Last modified: 2007-04-18 12:27:16 EDT
During the GUI installation of beta1, I wanted to check and see whether the
installer would only allow me to pass in a valid string for the lilo label
of my new installation. No checking done, with the resulting file:
As expected, lilo doesn't like that kind of string :)
[root@jmm-nt /root]# lilo
unknown variable "!" near line 8 in file /etc/lilo.conf
I'd imagine '#' and '$' need to get checked for at a minimum, but there
could be other special chars as well.
I will work only passing on reasonable characters - I had added a check to
not let users put ' ' in the name, but not the other characters you
After doing some fairly extensive testing and then looking at lilo/cfg.c, it
looks like only a few other characters need to get added to the check. I
couldn't figure out where the validation checking was happening for the TUI, so
I'd imagine this logic also needs to get replicated elsewhere.
--- anaconda-beta2/iw/lilo_gui.py.orig Mon Jun 26 22:23:33 2000
+++ anaconda-beta2/iw/lilo_gui.py Mon Jun 26 22:47:05 2000
@@ -91,7 +91,8 @@
def labelInsertText(self, entry, text, len, data):
i = 0
while i < len:
- if text[i] == ' ':
+ if text[i] == ' ' or text[i] == '#' \
+ or text[i] == '$' or text[i] == '=':
i = i + 1
Created attachment 760 [details]
Add checking for #, $, and = in lilo labels
Thanks have applied your patch.
Please verify in test lab.
verified fix in internal build for some characters... error dialog "Boot label
contains illegal characters" appears for TUI ... GUI also does not allow the
illegal characters ...