Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 701 - Problem with NISDOMAINNAME environment variable
Summary: Problem with NISDOMAINNAME environment variable
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dhcpcd
Version: 5.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-01-06 11:38 UTC by morris
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-01-06 23:09:32 UTC


Attachments (Terms of Use)

Description morris 1999-01-06 11:38:12 UTC
The NISDOMAINNAME environment variable is incorrectly set.
Some invalis characters are added at the end of the string.
The following patch seems to correct the problem by adding
a null character at the end of the string.
--- hostinfo.c.ORG      Mon Jan  4 12:59:07 1999
+++ hostinfo.c  Wed Jan  6 12:30:27 1999
@@ -215,6 +215,7 @@
        switch ( flag ) {
          case OT_STRING:
                strncpy(env, optp+1, *optp);
+               env[*optp] = '\0';
                if ( setenv(name, env, 1) < 0 ) {
                        logRet("setenv (addHostInfo):
insufficient space");
                }

Comment 1 David Lawrence 1999-01-06 23:09:59 UTC
I have not been able to replicate this problem on test lab machines.
Also most of our workstations use NIS and have not reported this
problem with 5.2.


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