From owner-cvs-all@FreeBSD.ORG Fri Feb 25 10:17:53 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF1D516A4CE; Fri, 25 Feb 2005 10:17:53 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A924443D4C; Fri, 25 Feb 2005 10:17:53 +0000 (GMT) (envelope-from sobomax@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j1PAHr3e051597; Fri, 25 Feb 2005 10:17:53 GMT (envelope-from sobomax@repoman.freebsd.org) Received: (from sobomax@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j1PAHroL051596; Fri, 25 Feb 2005 10:17:53 GMT (envelope-from sobomax) Message-Id: <200502251017.j1PAHroL051596@repoman.freebsd.org> From: Maxim Sobolev Date: Fri, 25 Feb 2005 10:17:53 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern imgact_shell.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Feb 2005 10:17:53 -0000 sobomax 2005-02-25 10:17:53 UTC FreeBSD src repository Modified files: sys/kern imgact_shell.c Log: o Replace two while {} do loops with more appropriate do {} while loops. This doesn't change functionality, but makes code more logical. Obtained from: DrafonFlyBSD o Use VOP_GETATTR() to obtain actual size of file and parse no more than that. Previously, we parsed MAXSHELLCMDLEN characters regardless of the actual file size. This makes the following working: $ printf '#!/bin/echo' > /tmp/test.sh $ chmod 755 /tmp/test.sh $ /tmp/test.sh Previously, attempts to execve() that shell script has been failing with bogus ENAMETOOLONG. PR: kern/64196 Submitted by: Magnus B.ckstr.m Revision Changes Path 1.32 +27 -12 src/sys/kern/imgact_shell.c