Bug 147444 - bootparamd-0.17-17 is incorrectly parsing the bootparams file
Summary: bootparamd-0.17-17 is incorrectly parsing the bootparams file
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: bootparamd
Version: 3.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-02-07 23:16 UTC by Carleton Miyamoto
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-08 09:25:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Carleton Miyamoto 2005-02-07 23:16:19 UTC
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):
bootparamd-0.17-17

How reproducible:
Every time.

Steps to Reproduce:
1. Create an /etc/bootparams file with a '#' comment as the first line.
2.
3.
  
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++) {
to:
    for (pass = 0; pass < 2 && !match; pass++) {

Comment 1 Martin Stransky 2005-02-08 09:25:32 UTC
It's fixed in devel (raw hide).


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