Home | History | Annotate | only in /src/usr.bin/whereis
History log of /src/usr.bin/whereis
RevisionDateAuthorComments
 1.6 14-Apr-2009  lukem Enable WARNS=4 by default for usr.bin, except for:
awk bdes checknr compile_et error gss hxtool kgetcred kinit
klist ldd less lex locale login m4 man menuc mk_cmds
mklocale msgc openssl rpcgen rpcinfo sdiff spell ssh
string2key telnet tn3270 verify_krb5_conf xlint
 1.5 01-Apr-2004  christos branches: 1.5.36;
Resurrect which(1), blessed by core.
 1.4 09-Jan-1997  tls RCS ID police
 1.3 18-Sep-1994  mycroft 4.4-Lite version, slightly edited.
 1.2 30-Jul-1993  mycroft Add RCS identifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2 18-Sep-1994  mycroft Import original 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.5.36.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.15 19-Sep-2014  wiz Sort sections. From Henning Petersen in PR 49222.
 1.14 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.13 03-Apr-2003  perry Return non-zero exit status if the listed programs aren't found.
Submitted by Gabriel Gonzalez in PR bin/20984
I deviated from the patch by returning 2 if only some programs were
located and 3 if none were. The submitted patch returned 1 and 2,
respectively, and 1 is already used for general error.
 1.12 01-Dec-2001  wiz Whitespace cleanup.
 1.11 16-Jul-2000  jdolecek add comma between xrefs in SEE ALSO
 1.10 22-Mar-1999  garbled branches: 1.10.10;
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.9 11-Mar-1999  fair Add .Xr which 1
 1.8 11-Mar-1999  fair Apply patch, KNF'd, from PR#3363 to add a "-p" option to whereis.
 1.7 06-Feb-1998  perry macroize BSD, NetBSD, FreeBSD and misc cleanup
 1.6 20-Oct-1997  lukem fix .Nm usage
 1.5 20-Oct-1997  mrg WARNSify; clean up .Nm usage
 1.4 31-Aug-1995  jtc Sync with 44lite2
 1.3 18-Sep-1994  mycroft 4.4-Lite version, slightly edited.
 1.2 01-Aug-1993  mycroft Add RCS indentifiers.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 31-Aug-1995  jtc imported from 44lite2
 1.1.1.2 18-Sep-1994  mycroft Import original 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.10.10.1 17-Jul-2000  jdolecek pullup rev 1.11 from trunk (approved by thorpej):
add comma between xrefs in SEE ALSO
 1.22 01-Jun-2025  jschauma PR bin/59449: use setregid(2)/setreuid(2) instead of setgid(2)/setuid(2)

This allows the calls to succeed when a non-root user runs
with e[gu]id != [gu]id and then produce the correct output.

Fix suggested by @kre.
 1.21 17-Oct-2008  apb branches: 1.21.72;
Fix a bug in which which(1) would check only the first element of the
path for all args except the first. So "which cp vi" found /bin/cp
using the first entry in the path, but failed to find /usr/bin/vi
using the second entry in the path, although "whereis cp vi" worked.
Restoring the ":" was done in the wrong place.

Also fix a bug in which an arg beginning with "/" would cause all
subsequent args to be ignored. A "break" should have been "continue".
Add comments to all break and continue statements saying what they are
intended to do.

Also add braces around the body of a for loop which contained only one
multi-line statement.
 1.20 21-Jul-2008  lukem Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
 1.19 15-Dec-2007  perry branches: 1.19.6;
convert __attribute__s to applicable cdefs.h macros
 1.18 30-Jul-2006  martin branches: 1.18.10;
Apply patch from Michael van Elst to fix PR bin/34114:
which doesn't handle commands given as absolute pathnames.
 1.17 23-May-2004  christos branches: 1.17.2; 1.17.4;
PR/25680: Christian Biere: whereis/which return invalid information with
huge path
 1.16 01-Apr-2004  christos Set our uid and gid to the effective user and group id's of the current
process so that access(2) DTRT's (from Peter Postma).
 1.15 01-Apr-2004  christos Fix const problem.
 1.14 01-Apr-2004  christos - add which(1) functionality.
- fix bug where if a program appeared in more than one place it would
erroneously exit(2)
- fix error messages to use err and errx as appropriate.
- made sure we don't pick up directories or non executable files.
 1.13 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.
 1.12 03-Apr-2003  perry Return non-zero exit status if the listed programs aren't found.
Submitted by Gabriel Gonzalez in PR bin/20984
I deviated from the patch by returning 2 if only some programs were
located and 3 if none were. The submitted patch returned 1 and 2,
respectively, and 1 is already used for general error.
 1.11 11-Jun-2002  itojun err/errx/warn/warnx do not need \n at the end
 1.10 09-Nov-1999  drochner Since our gcc doesn't warn about NULL format strings anymore, we can
fix the incorrect err(1, "%s", "") et al.
Closes PR bin/7592 by cgd.
 1.9 11-Mar-1999  fair branches: 1.9.6;
Apply patch, KNF'd, from PR#3363 to add a "-p" option to whereis.
 1.8 20-Oct-1997  mrg WARNSify; clean up .Nm usage
 1.7 23-Jan-1997  mikel return 0 on successful exit, compare getopt() result to -1 instead of EOF.
 1.6 31-Aug-1995  jtc Sync with 44lite2
 1.5 18-Sep-1994  mycroft 4.4-Lite version, slightly edited.
 1.4 04-Dec-1993  jtc Use <dirent.h> instead of <sys/dir.h>.
 1.3 01-Aug-1993  mycroft Add RCS identifiers.
 1.2 22-Jun-1993  mycroft /usr/src/usr.lib --> /usr/src/lib, and add some /usr/src/gnu paths.
 1.1 21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.3 31-Aug-1995  jtc imported from 44lite2
 1.1.1.2 18-Sep-1994  mycroft Import original 4.4-Lite version.
 1.1.1.1 21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.9.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.17.4.1 10-Aug-2006  tron Pull up following revision(s) (requested by cube in ticket #1456):
usr.bin/whereis/whereis.c: revision 1.18
Apply patch from Michael van Elst to fix PR bin/34114:
which doesn't handle commands given as absolute pathnames.
 1.17.2.1 10-Aug-2006  tron Pull up following revision(s) (requested by cube in ticket #1456):
usr.bin/whereis/whereis.c: revision 1.18
Apply patch from Michael van Elst to fix PR bin/34114:
which doesn't handle commands given as absolute pathnames.
 1.18.10.1 09-Jan-2008  matt sync with HEAD
 1.19.6.1 18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.21.72.1 02-Aug-2025  perseant Sync with HEAD
 1.4 11-Sep-2022  wiz remove unnecessary quotes
 1.3 11-Sep-2022  gutteridge which.1: minor grammar and style consistency fixes
 1.2 05-Apr-2010  joerg No trailing whitespace
 1.1 01-Apr-2004  christos Resurrect which(1), blessed by core.

RSS XML Feed