From papowell@dickory.sdsu.edu Mon Jan 27 14:18:48 1997
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id OAA03038 for <bugs@RT-11.MIT.EDU>; Mon, 27 Jan 1997 14:18:47 -0500
Received: from dickory.sdsu.edu by MIT.EDU with SMTP
id AA29759; Mon, 27 Jan 97 14:18:45 EST
Received: (from papowell@localhost) by dickory.sdsu.edu (8.8.3/8.8.2) id LAA26359; Mon, 27 Jan 1997 11:18:14 -0800 (PST)
Message-Id: <199701271918.LAA26359@dickory.sdsu.edu>
Date: Mon, 27 Jan 1997 11:18:14 -0800 (PST)
From: Patrick Powell <papowell@dickory.sdsu.edu>
Reply-To: papowell@dickory.sdsu.edu
To: krb5-bugs@MIT.EDU
Subject: login.krb5 does not set environment vars correctly
X-Send-Pr-Version: 3.99
Dept. Electrical and Computer Engineering,
San Diego State University,
San Diego, CA 92182-1309
Office (619) 594-7796; Lab (619) 594-7578 FAX (619) 594-7577
email: papowell@sdsu.edu
System: SunOS dickory 4.1.4 2 sun4m
Architecture: sun4
depend on the correct environment variables being set.
The login.krb5 code does not set the HOME, PATH, USER, and SHELL environment variables correctly.
The setenv() calls in src/appl/bsd/login.c have erroneous parameters.
(See patch below.) The original version does not override the USER,
PATH, HOME, and SHELL environment variables with the correct values from
getpwent().
and do:
rsh hostname printenv
Note that the environment variables are incorrect.
*** src/appl/bsd/login.c Mon Jan 27 11:03:35 1997
--- src/appl/bsd/login.c.orig Sun Nov 24 20:45:21 1996
***************
*** 1835,1844 ****
if (ccname)
setenv("KRB5CCNAME", ccname, 0);
! setenv("HOME", pwd->pw_dir, 1);
! setenv("PATH", LPATH, 1);
! setenv("USER", pwd->pw_name, 1);
! setenv("SHELL", pwd->pw_shell, 1);
if (term[0] == '\0')
(void) strncpy(term, stypeof(tty), sizeof(term));
--- 1835,1844 ----
if (ccname)
setenv("KRB5CCNAME", ccname, 0);
! setenv("HOME", pwd->pw_dir, 0);
! setenv("PATH", LPATH, 0);
! setenv("USER", pwd->pw_name, 0);
! setenv("SHELL", pwd->pw_shell, 0);
if (term[0] == '\0')
(void) strncpy(term, stypeof(tty), sizeof(term));
Responsible-Changed-From-To: gnats-admin->krb5-unassigned
Responsible-Changed-By: tlyu
Responsible-Changed-When: Fri Jan 31 21:21:46 1997
Responsible-Changed-Why:
Refiled
State-Changed-From-To: open-closed
State-Changed-By: tlyu
State-Changed-When: Sun Mar 16 02:27:06 1997
State-Changed-Why:
This is the same bug as krb5-appl/326; further followups should go
there.
Received: from MIT.EDU (SOUTH-STATION-ANNEX.MIT.EDU [18.72.1.2]) by rt-11.MIT.EDU (8.7.5/8.7.3) with SMTP id OAA03038 for <bugs@RT-11.MIT.EDU>; Mon, 27 Jan 1997 14:18:47 -0500
Received: from dickory.sdsu.edu by MIT.EDU with SMTP
id AA29759; Mon, 27 Jan 97 14:18:45 EST
Received: (from papowell@localhost) by dickory.sdsu.edu (8.8.3/8.8.2) id LAA26359; Mon, 27 Jan 1997 11:18:14 -0800 (PST)
Message-Id: <199701271918.LAA26359@dickory.sdsu.edu>
Date: Mon, 27 Jan 1997 11:18:14 -0800 (PST)
From: Patrick Powell <papowell@dickory.sdsu.edu>
Reply-To: papowell@dickory.sdsu.edu
To: krb5-bugs@MIT.EDU
Subject: login.krb5 does not set environment vars correctly
X-Send-Pr-Version: 3.99
Show quoted text
>Number: 354
>Category: krb5-appl
>Synopsis: login.krb5 does not set environment vars correctly
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: krb5-unassigned
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon Jan 27 14:19:01 EST 1997
>Last-Modified: Sun Mar 16 02:28:15 EST 1997
>Originator: Patrick Powell
>Organization:
Prof. Patrick Powell>Category: krb5-appl
>Synopsis: login.krb5 does not set environment vars correctly
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: krb5-unassigned
>State: closed
>Class: sw-bug
>Submitter-Id: unknown
>Arrival-Date: Mon Jan 27 14:19:01 EST 1997
>Last-Modified: Sun Mar 16 02:28:15 EST 1997
>Originator: Patrick Powell
>Organization:
Dept. Electrical and Computer Engineering,
San Diego State University,
San Diego, CA 92182-1309
Office (619) 594-7796; Lab (619) 594-7578 FAX (619) 594-7577
email: papowell@sdsu.edu
Show quoted text
>Release: 1.0
>Environment:
<machine, os, target, libraries (multiple lines)>>Environment:
System: SunOS dickory 4.1.4 2 sun4m
Architecture: sun4
Show quoted text
>Description:
Causes login failures when .login and .cshrc scriptsdepend on the correct environment variables being set.
The login.krb5 code does not set the HOME, PATH, USER, and SHELL environment variables correctly.
The setenv() calls in src/appl/bsd/login.c have erroneous parameters.
(See patch below.) The original version does not override the USER,
PATH, HOME, and SHELL environment variables with the correct values from
getpwent().
Show quoted text
>How-To-Repeat:
use rsh (/usr/local/sbin/rsh) to log in via Kerberos authentication,and do:
rsh hostname printenv
Note that the environment variables are incorrect.
Show quoted text
>Fix:
*** src/appl/bsd/login.c Mon Jan 27 11:03:35 1997
--- src/appl/bsd/login.c.orig Sun Nov 24 20:45:21 1996
***************
*** 1835,1844 ****
if (ccname)
setenv("KRB5CCNAME", ccname, 0);
! setenv("HOME", pwd->pw_dir, 1);
! setenv("PATH", LPATH, 1);
! setenv("USER", pwd->pw_name, 1);
! setenv("SHELL", pwd->pw_shell, 1);
if (term[0] == '\0')
(void) strncpy(term, stypeof(tty), sizeof(term));
--- 1835,1844 ----
if (ccname)
setenv("KRB5CCNAME", ccname, 0);
! setenv("HOME", pwd->pw_dir, 0);
! setenv("PATH", LPATH, 0);
! setenv("USER", pwd->pw_name, 0);
! setenv("SHELL", pwd->pw_shell, 0);
if (term[0] == '\0')
(void) strncpy(term, stypeof(tty), sizeof(term));
Show quoted text
>Audit-Trail:
Responsible-Changed-From-To: gnats-admin->krb5-unassigned
Responsible-Changed-By: tlyu
Responsible-Changed-When: Fri Jan 31 21:21:46 1997
Responsible-Changed-Why:
Refiled
State-Changed-From-To: open-closed
State-Changed-By: tlyu
State-Changed-When: Sun Mar 16 02:27:06 1997
State-Changed-Why:
This is the same bug as krb5-appl/326; further followups should go
there.
Show quoted text
>Unformatted: