This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 190338 - Problem parsing numeric kernel parameters
Problem parsing numeric kernel parameters
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: rhgb (Show other bugs)
5
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ray Strode [halfline]
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-01 09:10 EDT by David Yaw
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-18 14:34:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description David Yaw 2006-05-01 09:10:37 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
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 14:34:29 EDT
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)

Note You need to log in before you can comment on or make changes to this bug.