Bug 147444 - bootparamd-0.17-17 is incorrectly parsing the bootparams file
bootparamd-0.17-17 is incorrectly parsing the bootparams file
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bootparamd (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Martin Stransky
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-02-07 18:16 EST by Carleton Miyamoto
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-08 04:25:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Carleton Miyamoto 2005-02-07 18:16:19 EST
Description of problem:

bootparamd-0.17-17 is incorrectly parsing the bootparams file. It is
detecting the wrong hostname or if a comment is on the first line, the
hostname gets corrupted. This results in an error later on and
bootparamd fails to send the requested bootparams information.

Version-Release number of selected component (if applicable):

How reproducible:
Every time.

Steps to Reproduce:
1. Create an /etc/bootparams file with a '#' comment as the first line.
Actual results:
bootparamd reports an error in /var/log/messages

Expected results:
bootparams should find the requested information in the bootparams file.

Additional info:
The bug seems to be in bootparamd-resolver.patch. Basically, if
"!strcmp(hostname, askname)" matches on the first pass, the second
pass with begin but the hostname will get overwritten by the call to
"fscanf(bpf, "%s", hostname)" at the top of the inner loop. Here's one
way to fix the problem. Change the line:
    for (pass = 0; pass < 2; pass++) {
    for (pass = 0; pass < 2 && !match; pass++) {
Comment 1 Martin Stransky 2005-02-08 04:25:32 EST
It's fixed in devel (raw hide).

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