Subject: kern/3472: exec on a directory no longer returns EACCESS but EISDIR
To: None <gnats-bugs@gnats.netbsd.org>
From: None <leo@marco.de>
List: netbsd-bugs
Date: 04/10/1997 16:47:00
>Number:         3472
>Category:       kern
>Synopsis:       exec on a directory no longer returns EACCESS but EISDIR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 10 07:50:01 1997
>Last-Modified:
>Originator:     
>Organization:
leo@dachau.marco.de			in real life: Matthias Pfaller
marco GmbH, 85221 Dachau, Germany	tel: +49 8131 516141
>Release:        970407
>Environment:
	
System: NetBSD quax 1.2D NetBSD 1.2D (QUAX) #7: Thu Apr 10 12:36:12 CEST 1997 leo@quax:/usr/src/sys/arch/sparc/compile/QUAX sparc


>Description:
	We have a directory with a subdirectory named "as". Up to now
	compiling things at this place worked ok. After updating the
	kernel gcc fails with
		cc: installation problem, cannot exec `as': Is a directory
	Is returning EISDIR more correct then returning EACCES?
	But in any case I think it is pretty bogus where cc looks for it's
	programs and files. After doing a ktrace I found that cc looks for
		/usr/libexec/NetBSD/sparc/2.7.2/cc1
		/usr/libexec/NetBSD/sparc/cc1
		/usr/lib/gcc/NetBSD/sparc/2.7.2/cc1
		/usr/lib/gcc/NetBSD/sparc/cc1
		/usr/local/NetBSD/sparc/bin/NetBSD/sparc/2.7.2/cc1
		/usr/local/NetBSD/sparc/bin/cc1
		/usr/libexec/NetBSD/sparc/2.7.2/cc1
		/usr/libexec/cc1
	and so on. I think it should look for /usr/libexec/cc1 only.

>How-To-Repeat:
	$ cd /tmp
	$ mkdir as
	$ echo "main(){}" >xxx.c
	$ cc -o xxx xxx.c
>Fix:
>Audit-Trail:
>Unformatted: