From zgabor@code.hu  Fri Aug  9 10:10:55 1996
Received: from mail.EUnet.hu (mail.eunet.hu [193.225.28.100])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id KAA24895
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 9 Aug 1996 10:10:53 -0700 (PDT)
Received: by mail.EUnet.hu, id TAA22415; Fri, 9 Aug 1996 19:10:50 +0200
Received: from zg.CoDe.hu by CoDe.CoDe.hu (TAA03924); Fri, 9 Aug 1996 19:00:09 GMT
Received: (from zgabor@localhost) by zg.CoDe.hu (8.6.12/8.6.12) id TAA01293; Fri, 9 Aug 1996 19:29:23 +0200
Message-Id: <199608091729.TAA01293@zg.CoDe.hu>
Date: Fri, 9 Aug 1996 19:29:23 +0200
From: Zahemszky Gabor <zgabor@code.hu>
Reply-To: zgabor@code.hu
To: FreeBSD-gnats-submit@freebsd.org
Subject: bug in exec(2)
X-Send-Pr-Version: 3.2

>Number:         1487
>Category:       kern
>Synopsis:       bug in exec(2)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    bde
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Aug  9 10:20:02 PDT 1996
>Closed-Date:    Sat Apr 11 03:50:45 PDT 1998
>Last-Modified:  Sat Apr 11 03:51:44 PDT 1998
>Originator:     Zahemszky Gabor
>Release:        FreeBSD 2.1.0-RELEASE i386
>Organization:
>Environment:

	2.1R from Walnut Creek CD

>Description:

If there is a file, which named as a directory in the PATH, some 
programs, that use the exec... system call, failed 

>How-To-Repeat:

	$ export PATH=/root/bin:/bin:/usr/bin
	$ cd ~root
	$ rm bin ; rmdir bin ; touch bin
	$ rm /usr/share/man/cat1/error.1.gz
	$ man error # it has to be such a manual, which has to creat
	Formatting page, please wait...groff: couldn't exec troff: Not a
	directory
	groff: couldn't exec grotty: Not a directory
	Done
	$ rm /usr/share/man/cat1/error.gz.1
	$ rm ~root/bin
	$ man error
	Formatting page, please wait ...
	(and the normal way, I get the manual page)
	$

	If we try it as normal user, chsh/chpass/chfn exiting, too:
	(and maybe some other commands)

	$ chsh # or chfn or chpass
	commandname: vi: undefined error: 0
	commandname: /etc/master.passwd: unchanged



>Fix:
	
	

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: scrappy 
State-Changed-When: Tue Oct 22 22:12:01 PDT 1996 
State-Changed-Why:  

Confirm Status: 

State-Changed-From-To: feedback->open 
State-Changed-By: wollman 
State-Changed-When: Tue Dec 17 08:16:21 PST 1996 
State-Changed-Why:  
Not sure what the systus of this is, but there doesn't appear to 
be any feedback. 
State-Changed-From-To: open->analyzed 
State-Changed-By: wollman 
State-Changed-When: Tue Dec 17 12:12:28 PST 1996 
State-Changed-Why:  
Bruce has done a good analysis of the various bugs in execvp() 
with respect to error handling. 


Responsible-Changed-From-To: freebsd-bugs->bde 
Responsible-Changed-By: wollman 
Responsible-Changed-When: Tue Dec 17 12:12:28 PST 1996 
Responsible-Changed-Why:  
Bruce has a partial fix. 
State-Changed-From-To: analyzed->closed 
State-Changed-By: phk 
State-Changed-When: Sat Apr 11 03:50:45 PDT 1998 
State-Changed-Why:  
Tried this, and it didn't fail for me today. 
>Unformatted:
