From owner-cvs-src-old@FreeBSD.ORG Sun Jan 9 21:09:18 2011 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84BC5106566C for ; Sun, 9 Jan 2011 21:09:18 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 720B68FC12 for ; Sun, 9 Jan 2011 21:09:18 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.4/8.14.4) with ESMTP id p09L9Irl093654 for ; Sun, 9 Jan 2011 21:09:18 GMT (envelope-from jilles@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.4/8.14.4/Submit) id p09L9IVZ093653 for cvs-src-old@freebsd.org; Sun, 9 Jan 2011 21:09:18 GMT (envelope-from jilles@repoman.freebsd.org) Message-Id: <201101092109.p09L9IVZ093653@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jilles@repoman.freebsd.org using -f From: Jilles Tjoelker Date: Sun, 9 Jan 2011 21:07:30 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/sh exec.c src/tools/regression/bin/sh/execution path1.0 X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 21:09:18 -0000 jilles 2011-01-09 21:07:30 UTC FreeBSD src repository Modified files: bin/sh exec.c Added files: tools/regression/bin/sh/execution path1.0 Log: SVN rev 217206 on 2011-01-09 21:07:30Z by jilles sh: Remove special %builtin PATH entry. All builtins are now always found before a PATH search. Most ash derivatives have an undocumented feature where the presence of an entry "%builtin" in $PATH will cause builtins to be checked at that point of the PATH search, rather than before looking at any directories as documented in the man page (very old versions do document this feature). I am removing this feature from sh, as it complicates the code, may violate expectations (for example, /usr/bin/alias is very close to a forkbomb with PATH=/usr/bin:%builtin, only /usr/bin/builtin not being another link saves it) and appears to be unused (all the %builtin google code search finds is in some sort of ash source code). Note that aliases and functions took and take precedence above builtins. Because aliases work on a lexical level they can only ever be overridden on a lexical level (quoting or preceding 'builtin' or 'command'). Allowing override of functions via PATH does not really fit in the model of sh and it would work differently from %builtin if implemented. Note: POSIX says special builtins are found before functions. We comply to this because we do not allow functions with the same name as a special builtin. Silence from: freebsd-hackers@ (message sent 20101225) Discussed with: dougb Revision Changes Path 1.47 +7 -33 src/bin/sh/exec.c 1.1 +15 -0 src/tools/regression/bin/sh/execution/path1.0 (new)