[2734] in Kerberos-V5-bugs
krb5-appl/426: appl/bsd/login.c:read_env_vars_from_file() ignores parameter
daemon@ATHENA.MIT.EDU (donn@u.washington.edu)
Mon May 19 20:22:03 1997
Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: krb5-unassigned@RT-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, donn@u.washington.edu
Date: Mon, 19 May 1997 17:19:47 -0700
From: donn@u.washington.edu
Reply-To: donn@u.washington.edu
To: krb5-bugs@MIT.EDU
>Number: 426
>Category: krb5-appl
>Synopsis: read_env_vars_from_file() ignores parameter
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: krb5-unassigned
>State: open
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon May 19 20:20:01 EDT 1997
>Last-Modified:
>Originator: Donn Cave
>Organization:
University Computing Services
University of Washington
>Release: 1.0pl1
>Environment:
System: AIX melville 2 4 000010504900
>Description:
read_env_vars_from_file() ignores its parameter, and always
opens /etc/environment.
>How-To-Repeat:
Thought experiment should suffice.
>Fix:
Context diff appended.
-----------------------------
*** src/appl/bsd/login.c.dist Wed Apr 2 23:35:11 1997
--- src/appl/bsd/login.c Mon May 19 16:59:13 1997
***************
*** 1106,1112 ****
char *p, *eq;
char tbuf[MAXPATHLEN+2];
! if ((fp = fopen("/etc/environment", "r")) != NULL) {
while (fgets(tbuf, sizeof(tbuf), fp)) {
if (tbuf[0] == '#')
continue;
--- 1106,1112 ----
char *p, *eq;
char tbuf[MAXPATHLEN+2];
! if ((fp = fopen(filename, "r")) != NULL) {
while (fgets(tbuf, sizeof(tbuf), fp)) {
if (tbuf[0] == '#')
continue;
>Audit-Trail:
>Unformatted: