From smkelly@slashnet.org Thu Nov 18 22:57:48 1999
Return-Path: <smkelly@slashnet.org>
Received: from area51.slashnet.org (area51.slashnet.org [208.222.214.95])
	by hub.freebsd.org (Postfix) with ESMTP id 69027155ED
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 18 Nov 1999 22:57:44 -0800 (PST)
	(envelope-from smkelly@slashnet.org)
Received: from smkelly by area51.slashnet.org with local (Exim 3.03 #1)
	id 11ohzM-0007yO-00
	for FreeBSD-gnats-submit@freebsd.org; Fri, 19 Nov 1999 01:57:44 -0500
Message-Id: <E11ohzM-0007yO-00@area51.slashnet.org>
Date: Fri, 19 Nov 1999 01:57:44 -0500
From: Sean Kelly <smkelly@slashnet.org>
Reply-To: smkelly@slashnet.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: OpenSSH Path problem
X-Send-Pr-Version: 3.2

>Number:         14992
>Category:       ports
>Synopsis:       Path problem in OpenSSH prevents scp from working
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    green
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 18 23:00:01 PST 1999
>Closed-Date:    Mon Nov 22 14:50:27 PST 1999
>Last-Modified:  Mon Nov 22 14:51:55 PST 1999
>Originator:     Sean Kelly
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
SlashNET/OSOnline.org 
>Environment:

	OpenSSH from /usr/ports/security/openssh Fri Nov 19 00:54:07 CST 1999

>Description:

	In sshd.c:
	child_set_env(&env, &envsize, "PATH", _PATH_STDPATH "/usr/local/bin" "/usr/local/bin");

	That code gives a PATH like this:
		_PATH_STDPATH/usr/local/bin/usr/local/bin
	The code should look something like this:
	child_set_env(&env, &envsize, "PATH", _PATH_STDPATH ":/usr/local/bin:/usr/local/sbin");
	
	This bug causes both scp and user logins to fail (assuming no login
	script modifies the user's environment for them).

>How-To-Repeat:

	Install OpenSSH, try to scp a file from/to the machine.

>Fix:

	The code should look something like this:
	child_set_env(&env, &envsize, "PATH", _PATH_STDPATH ":/usr/local/bin:/usr/local/sbin");


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports->green  
Responsible-Changed-By: cpiazza 
Responsible-Changed-When: Thu Nov 18 23:09:47 PST 1999 
Responsible-Changed-Why:  
Over to maintainer 

From: Steve Price <sprice@hiwaay.net>
To: freebsd-gnats-submit@freebsd.org
Cc:  
Subject: Re: ports/14992: OpenSSH Path problem (fwd)
Date: Fri, 19 Nov 1999 09:51:23 -0600 (CST)

 ---------- Forwarded message ----------
 Date: Fri, 19 Nov 1999 16:34:08 +0100
 From: Christian Weisgerber <naddy@unix-ag.uni-kl.de>
 To: gnats@freebsd.org
 Subject: Re: ports/14992: OpenSSH Path problem
 
 > >Number:         14992
 > >Category:       ports
 > >Synopsis:       Path problem in OpenSSH prevents scp from working
 
 diff -uNr /usr/ports/security/openssh/patches/patch-bc openssh/patches/patch-bc
 --- /usr/ports/security/openssh/patches/patch-bc	Thu Nov 18 06:25:51 1999
 +++ openssh/patches/patch-bc	Fri Nov 19 16:06:06 1999
 @@ -1,5 +1,5 @@
 ---- /usr/ports/distfiles/OpenSSH-1.2/src/usr.bin/ssh/sshd.c	Wed Nov 17 04:51:21 1999
 -+++ ./sshd.c	Wed Nov 17 14:32:39 1999
 +--- sshd.c.orig	Fri Nov 19 16:01:15 1999
 ++++ sshd.c	Fri Nov 19 16:03:39 1999
  @@ -39,6 +39,16 @@
   int deny_severity = LOG_WARNING;
   #endif /* LIBWRAP */
 @@ -170,15 +170,6 @@
   
   #ifdef AFS
     /* Try to get AFS tokens for the local cell. */
 -@@ -2080,7 +2163,7 @@
 -     child_set_env(&env, &envsize, "USER", pw->pw_name);
 -     child_set_env(&env, &envsize, "LOGNAME", pw->pw_name);
 -     child_set_env(&env, &envsize, "HOME", pw->pw_dir);
 --    child_set_env(&env, &envsize, "PATH", _PATH_STDPATH);
 -+    child_set_env(&env, &envsize, "PATH", _PATH_STDPATH "/usr/local/bin");
 -    
 -     snprintf(buf, sizeof buf, "%.200s/%.50s",
 -       _PATH_MAILDIR, pw->pw_name);
  @@ -2180,6 +2263,22 @@
        descriptors left by system functions.  They will be closed later. */
     endpwent();
 
 -- 
 Christian "naddy" Weisgerber                     naddy@unix-ag.uni-kl.de
 
 
State-Changed-From-To: open->closed 
State-Changed-By: green 
State-Changed-When: Mon Nov 22 14:50:27 PST 1999 
State-Changed-Why:  
Sorry, that /usr/local/bin improperly snuck into the patch-bc.  This 
has been fixed in the proper way now (support for login.conf path.) 
>Unformatted:
