Red Hat Bugzilla – Bug 190338
Problem parsing numeric kernel parameters
Last modified: 2008-05-01 11:38:06 EDT
Description of problem:
During rhgb's startup, it verifies that it is supposed to be running, i.e., that
we are booting into runlevel 5. When it is examining the kernel command line, it
doesn't do enough checks to be sure it's really looking at an option to modify
in function check_for_run(), there is this code:
for (x = 0; args[x] ; x++)
if (atoi(args[x]) != 5)
rc = 1;
rc = 0;
if (rc >= 0) return rc;
This code will take the first kernel parameter that starts with a number, and
use that for it's comparison, even if the kernel parameter is not a modification
to the runlevel.
I would suggest a modification along these lines:
if (g_ascii_isdigit(args[x]) && args[x] == '\0')
Version-Release number of selected component (if applicable):
Tested on FC5.
Examimed the code in the FC5 SRPM and CVS as of 2006-04-28.
Steps to Reproduce:
1. Boot with each of the following parameters, with inittab set to boot into
A) /vmlinuz-2.6.15-1.2054_FC5smp ro root=LABEL=/ rhgb quiet
B) /vmlinuz-2.6.15-1.2054_FC5smp ro root=LABEL=/ rhgb quiet 8250.nr_uarts=10
C) /vmlinuz-2.6.15-1.2054_FC5smp ro root=LABEL=/ rhgb quiet 5rhgbHasABug
2. Note whether rhgb is started.
A) rhgb loads properly
B) rhgb detects the "8250..." parameter, and thinks we are booting into runlevel
8, and doesn't load.
C) rhgb detects the "5rhgbHasABug" parameter, and is tricked into loading. Note
that even if inittab was set to boot into runlevel 3, rhgb would still run.
Since we are booting into runlevel 5 in all cases, rhgb should run.
We no longer support Fedora Core 5 and I am currently trying to get my open bug
count down to a more manageable state. I'm going to close this bug as WONTFIX.
If this issue is still a concern for you, would you mind trying to reproduce on
a supported version of Fedora and reopening?
(this is a mass message)