]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Reinstate revision 1.11:
authorwill <will@FreeBSD.org>
Fri, 5 Jan 2001 18:15:17 +0000 (18:15 +0000)
committerwill <will@FreeBSD.org>
Fri, 5 Jan 2001 18:15:17 +0000 (18:15 +0000)
commit733a059cc15d1f317ac496d140bfd1dcc325a249
tree73e497c1eb8de590e17ea688f66fc1917bb825ae
parent729a83c25cb4d059eb77b954f6990dfb1d3e3dde
Reinstate revision 1.11:
BDECFLAGS; ANSIfy; use EXEC instead of "exec " where appropriate; use
proper types (size_t, int); use proper variable names for certain things;
get rid of static 'cache' style stuff by moving and sanitizing the
original SHELL checking code to main(), this also makes it easier to
free() the string; rename file-scope system() to exec_shell(); use
snprintf() everywhere instead of sprintf(); actually remember to free()
other malloc()'d char pointers in main().

I left out the -s option in this revision along with getusershell()
checking because of objections made by Warner Losh <imp> and Garrett
Wollman <wollman>.  I agreed with their assertions that such code was
unnecessary in a program like this.

I dare people to make this coredump now.

Some suggestions: nectar (snprintf() truncate checking)
Reviewed by: markm, eivind, jedgar
Tortured by: examples in apply(1), fuzz(1),
and a lot of random ideas I came up with
usr.bin/apply/apply.c