Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  6 Feb 1999 12:39:21 -0600 (CST)
From:      Tony Kimball <alk@pobox.com>
To:        zach@uffdaonline.net
Cc:        current@FreeBSD.ORG
Subject:   Re: imgact_shell.c ENOEXEC
Message-ID:  <14012.34942.338695.378661@avalon.east>
References:  <14011.64749.572752.41299@avalon.east> <19990206112246.A26991@znh.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoth Zach Heilig on Sat, 6 February:
: On Sat, Feb 06, 1999 at 02:28:38AM -0600, Tony Kimball wrote:
: > In the file of the subject, I notice this:
: 
: > 	/*
: > 	 * Don't allow a shell script to be the shell for a shell
: > 	 *	script. :-)
: > 	 */
: > 	if (imgp->interpreted)
: > 		return(ENOEXEC);
: 
: > Why not?  I'd like to.
: 
: Imagine this:
: 
: $ file /tmp/test.sh
: /tmp/test.sh: a /tmp/test.sh script text
: $ /tmp/test.sh
: 

Won't this just fail when the recursion level is such that
the command length exceeds stringspace?

Ah, I see the difference:
			/*
			 * Copy to end of token. No need to watch stringspace
			 *	because this is at the front of the string buffer
			 *	and the maximum shell command length is tiny.
			 */

Very bogus.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14012.34942.338695.378661>