[2645] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

pending/354: krb5-appl

daemon@ATHENA.MIT.EDU (Patrick Powell)
Mon Jan 27 14:20:04 1997

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: gnats-admin@rt-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, papowell@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


>Number:         354
>Category:       pending
>Synopsis:       krb5-appl
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    gnats-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Mon Jan 27 14:19:01 EST 1997
>Last-Modified:
>Originator:     Patrick Powell
>Organization:
Prof. Patrick Powell
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
>Release:        1.0
>Environment:
	<machine, os, target, libraries (multiple lines)>
System: SunOS dickory 4.1.4 2 sun4m
Architecture: sun4

>Description:
Causes login failures when .login and .cshrc scripts
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().

>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.
>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));
>Audit-Trail:
>Unformatted:
The login.krb5 code does not set the HOME, PATH, USER, and SHELL environment variables correctly.

home help back first fref pref prev next nref lref last post