From owner-freebsd-questions Wed Nov 18 08:01:16 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA23129 for freebsd-questions-outgoing; Wed, 18 Nov 1998 08:01:16 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from smtp01.wxs.nl (smtp01.wxs.nl [195.121.6.61]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA23113 for ; Wed, 18 Nov 1998 08:01:06 -0800 (PST) (envelope-from asmodai@wxs.nl) Received: from chronias.ninth-circle.org ([195.121.58.153]) by smtp01.wxs.nl (Netscape Messaging Server 3.6) with ESMTP id AAA4EDA; Wed, 18 Nov 1998 17:00:23 +0100 Message-ID: X-Mailer: XFMail 1.3 [p0] on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Wed, 18 Nov 1998 17:04:52 +0100 (CET) Organization: Ninth Circle Enterprises From: Jeroen Ruigrok/Asmodai To: Jonathan Chen Subject: Re: C executables Cc: freebsd-questions@FreeBSD.ORG, G578@ix.netcom.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 18-Nov-98 Jonathan Chen wrote: > On Tue, 17 Nov 1998 G578@ix.netcom.com wrote: >> You >> compile, you don't specify an object module name, it defaults to >> "a.out", then you type "a.out" and, Voila, Hello World! Why am I >> getting Voila, Not Found? > > By default, your executable search-path doesn't include the current > directory. You'll be able to run your program with: > > ./a.out > > If you want to include the current directory, you'll have to modify > your startup script for your shell (.login/.profile/.bashrc/etc) to > include the current directory for PATH And by doing that ye start the slow descent into security compromise. If one would have . in their PATH ye are risking to faster execute maliscious code than by doing ./name. Surely others on this list have more to say on this matter. I just know enough of the long story that I was being told about PATH and . to keep myself out of that trouble... --- Jeroen Ruigrok van der Werven/Asmodai asmodai(at)wxs.nl | Cum angelis et pueris, Junior Network/Security Specialist | fideles inveniamur *BSD & picoBSD: The Power to Serve... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message