FreeBSD src
Go to file
Jilles Tjoelker 4b45b49a70 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
2011-01-09 21:07:30 +00:00
bin sh: Remove special %builtin PATH entry. 2011-01-09 21:07:30 +00:00
cddl Print message with information about updating the boot code if a new 2010-12-08 13:51:25 +00:00
contrib Make gcc emit the .note.GNU-stack section into the assembler files. 2011-01-07 14:24:24 +00:00
crypto Merge OpenSSL 0.9.8q into head. 2010-12-03 22:59:54 +00:00
etc Replace nfs4 with newnfs in netfs_types. nfs4 was removed in r192578 and 2011-01-09 09:21:11 +00:00
games factor(6): Check return values of BN_* functions. 2010-12-20 19:07:56 +00:00
gnu Remove unused support for 64 bit long on 32 bit architectures. 2011-01-07 22:57:31 +00:00
include Remove leftover for r214093. 2011-01-06 03:30:16 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Implement the __pthread_map_stacks_exec() for libthr. 2011-01-09 12:38:40 +00:00
libexec In rtld, read the initial stack access mode from AT_STACKPROT as set 2011-01-08 17:11:49 +00:00
release Fix the overflowing livefs ISO by removing man pages from the HFS part of 2010-12-15 23:43:25 +00:00
rescue Break out the rules which generate crunchgen'ed binaries into a separate 2010-11-13 03:11:27 +00:00
sbin The camcontrol smppc option to clear a PHY error log is 'clearerrlog', 2011-01-05 18:27:38 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8q. 2010-12-03 23:07:45 +00:00
share Document rc.conf.d in rc.conf(5). 2011-01-08 13:28:43 +00:00
sys MfP4 CH=185246 [1]: 2011-01-09 20:40:21 +00:00
tools sh: Remove special %builtin PATH entry. 2011-01-09 21:07:30 +00:00
usr.bin sed: Try hard links to make -i target available continually. 2011-01-08 00:03:18 +00:00
usr.sbin Take passwords out of debug log. 2011-01-08 23:03:24 +00:00
COPYRIGHT Happy New Year 2011. 2010-12-31 18:07:16 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile make targets 2011-01-07 20:36:27 +00:00
Makefile.inc1 Retire TARGET_ABI. 2011-01-07 20:26:33 +00:00
Makefile.mips Retire TARGET_ABI. 2011-01-07 20:26:33 +00:00
ObsoleteFiles.inc libbsnmp was moved to usr/lib 2010-12-16 11:58:50 +00:00
README Import OpenSSL 0.9.8q. 2010-12-02 22:36:51 +00:00
UPDATING Note compatibility issues with make universe and stable systems. 2011-01-03 23:05:20 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html