Bug 190338

Summary: Problem parsing numeric kernel parameters
Product: [Fedora] Fedora Reporter: David Yaw <dyaw>
Component: rhgbAssignee: Ray Strode [halfline] <rstrode>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-18 18:34:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description David Yaw 2006-05-01 13:10:37 UTC
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
the runlevel. 

in function check_for_run(), there is this code:

  for (x = 0; args[x] ; x++)
    {
      if (g_ascii_isdigit(args[x][0]))
        {
          if (atoi(args[x]) != 5)
            rc = 1;
          else
            rc = 0;
          break;
        }
      ...
      ...
      ...
    }
  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][0]) && args[x][1] == '\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. 

How reproducible:

Always.

Steps to Reproduce:
1. Boot with each of the following parameters, with inittab set to boot into
runlevel 5. 
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
8250.nr_uarts=10
2. Note whether rhgb is started. 

Actual results:

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.

Expected results:

Since we are booting into runlevel 5 in all cases, rhgb should run.

Additional info:

Comment 1 Ray Strode [halfline] 2008-03-18 18:34:29 UTC
Hi,

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)