RT RT/krbdev.mit.edu: Ticket #427 PATH setenv() policy conflicts with /etc/environment. Signed in as guest.
[Logout]

[Home] [Search] [Configuration]

[Display] [History] [Basics] [Dates] [People] [Links] [Jumbo]

 
 

 The Basics  
Id
427
Status
resolved
Worked
0 min
Priority
50/
Queue
krb5
 

 Keyword Selections  
Component
  • krb5-appl
Version_reported
Version_Fixed
  • 1.4
Target_Version
Tags
  • enhancement
 

 Relationships  
Depends on:
Depended on by:
Parents:
Children:

Refers to:
Referred to by:
 
 Dates  
Created: Mon May 19 20:27:00 1997
Starts: Not set
Started: Wed Sep 8 16:23:05 2004
Last Contact: Wed Sep 8 16:23:08 2004
Due: Not set
Updated: Mon Nov 15 22:21:50 2004 by tlyu
 

 People  
Owner
 tlyu
Requestors
 donn@u.washington.edu
Cc
 
AdminCc
 
 

 More about donn@u.washington.edu  
Comments about this user:
No comment entered about this user
This user's 25 highest priority tickets:
 

History   Display mode: [Brief headers] [Full headers]
      Mon Aug 19 14:17:45 2002  RT_System - Default: Import/ changed from to    
     
From donn@u.washington.edu  Mon May 19 20:26:34 1997
Received: from MIT.EDU (PACIFIC-CARRIER-ANNEX.MIT.EDU [18.69.0.28]) by rt-11.MIT.EDU
(8.7.5/8.7.3) with SMTP id UAA27741 for <bugs@RT-11.MIT.EDU>; Mon, 19 May 1997
20:26:34 -0400
Received: from melville.u.washington.edu by MIT.EDU with SMTP
	id AA10283; Mon, 19 May 97 20:25:49 EDT
Received: (from donn@localhost)
          by melville.u.washington.edu (8.8.4+UW97.04/8.8.4+UW97.05)
	  id RAA69008; Mon, 19 May 1997 17:26:32 -0700
Message-Id: <199705200026.RAA69008@melville.u.washington.edu>
Date: Mon, 19 May 1997 17:26:32 -0700
From: donn@u.washington.edu
Reply-To: donn@u.washington.edu
To: krb5-bugs@MIT.EDU
Subject: appl/bsd/login.c: PATH setenv policy.
X-Send-Pr-Version: 3.99

>Number:         427
>Category:       krb5-appl
>Synopsis:       PATH setenv() policy conflicts with /etc/environment.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    krb5-unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   unknown
>Arrival-Date:   Mon May 19 20:27:00 EDT 1997
>Last-Modified:
>Originator:     Donn Cave
>Organization:
	University Computing Services
	University of Washington
>Release:        1.0pl1
>Environment:
	AIX 4.2
System: AIX melville 2 4 000010504900


>Description:
	login.krb5 reads /etc/environment with no-override setenv(),
	and then forces PATH to a hard-coded value.  This prevents
	use of /etc/environment to initialize PATH.

>How-To-Repeat:
>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 17:01:02 1997
***************
*** 1117,1124 ****
  	    if (p)
  		*p = 0;
  	    *eq++ = 0;
! 	    /* Don't override, in case -p was used.  */
! 	    setenv (tbuf, eq, 0);
  	}
  	fclose(fp);
      }
--- 1117,1123 ----
  	    if (p)
  		*p = 0;
  	    *eq++ = 0;
! 	    setenv (tbuf, eq, 1);
  	}
  	fclose(fp);
      }
***************
*** 1842,1848 ****
  		setenv("KRB5CCNAME", ccname, 1);

  	setenv("HOME", pwd->pw_dir, 1);
! 	setenv("PATH", LPATH, 1);
  	setenv("USER", pwd->pw_name, 1);
  	setenv("SHELL", pwd->pw_shell, 1);

--- 1841,1847 ----
  		setenv("KRB5CCNAME", ccname, 1);

  	setenv("HOME", pwd->pw_dir, 1);
! 	setenv("PATH", LPATH, 0);
  	setenv("USER", pwd->pw_name, 1);
  	setenv("SHELL", pwd->pw_shell, 1);

>Audit-Trail:
>Unformatted:


Download (untitled) 2.3k
      Mon Aug 19 14:17:45 2002  RT_System - Tags enhancement added    
      Mon Aug 19 14:17:45 2002  RT_System - Component krb5-appl added    
      Mon Aug 19 14:18:24 2002  RT_System - Ticket 768: Default: Import/ changed from to    
     
From donn@u.washington.edu  Wed Oct  6 19:59:05 1999
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 TAA09542 for <bugs@RT-11.MIT.EDU>; Wed, 6 Oct 1999
19:59:05 -0400
Received: from jason05.u.washington.edu by MIT.EDU with SMTP
	id AA22354; Wed, 6 Oct 99 19:58:57 EDT
Received: from saul8.u.washington.edu (donn@saul8.u.washington.edu [140.142.82.3])
	by jason05.u.washington.edu (8.9.3+UW99.09/8.9.3+UW99.09) with ESMTP id QAA25430
	for <krb5-bugs@mit.edu>; Wed, 6 Oct 1999 16:59:01 -0700
Received: (from donn@localhost)
	by saul8.u.washington.edu (8.9.3+UW99.09/8.9.3+UW99.09) id QAA01427;
	Wed, 6 Oct 1999 16:59:00 -0700 (PDT)
Message-Id: <199910062359.QAA01427@saul8.u.washington.edu>
Date: Wed, 6 Oct 1999 16:59:00 -0700 (PDT)
From: donn@u.washington.edu
Reply-To: donn@u.washington.edu
To: krb5-bugs@MIT.EDU
Subject: PATH setenv overwrites /etc/environment, in login
X-Send-Pr-Version: 3.99

>Number:         768
>Category:       krb5-appl
>Synopsis:       in appl/bsd/login.c, setenv("PATH", LPATH, 1) overwrites ...
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    krb5-unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Wed Oct 06 20:00:00 EDT 1999
>Last-Modified:
>Originator:     Donn Cave
>Organization:
University Computing Services
University of Washington
>Release:        krb5-1.1
>Environment:
System: AIX 4.2
Machine: RS/6000
>Description:
In appl/bsd/login.c, setenv("PATH", LPATH, 1) overwrites a value for
PATH from /etc/environment, read a few lines earlier.

>How-To-Repeat:
Login on AIX with local PATH value in /etc/environment

>Fix:
Reduce that to setenv("PATH", LPATH, 0), i.e., supply as default but
don't overwrite.
>Audit-Trail:
>Unformatted:


Download (untitled) 1.7k
      Mon Aug 19 14:18:24 2002  RT_System - Ticket 768: Component krb5-appl added    
      Mon Aug 19 14:18:24 2002  RT_System - Ticket 768: Version_reported 1.1 added    
      Fri Jan  9 16:56:01 2004  hartmans - Subject changed from PATH setenv() policy conflicts with /etc/environment. to preauth    
      Fri Jan  9 16:56:23 2004  hartmans - Ticket 768: Subject changed from in appl/bsd/login.c, setenv("PATH", LPATH, 1) overwrites ... to preauth    
      Tue Sep  7 19:32:42 2004  tlyu - Ticket 768: Ticket 768 MergedInto ticket 427.    
      Wed Sep  8 16:23:05 2004  tlyu - Status changed from new to resolved    
      Wed Sep  8 16:23:06 2004  tlyu - Given to tlyu    
      Wed Sep  8 16:23:06 2004  tlyu - Correspondence added    
     
From: tlyu@mit.edu
Subject: CVS Commit

	* login.c (main): Don't overwrite "PATH" environment variable if
	it's already set.


To generate a diff of this commit:



	cvs diff -r5.386 -r5.387 krb5/src/appl/bsd/ChangeLog
	cvs diff -r5.103 -r5.104 krb5/src/appl/bsd/login.c


Download (untitled) 231b
      Mon Nov 15 22:21:49 2004  tlyu - Version_Fixed 1.4 added