freebsd-skq/usr.bin
Tom Rhodes 33ffdd8115 Don't truncate the output file before making sure that we can
read at least 1 byte from the input file without problems.  This
fixes a bug in uncompress(1) that causes the accidental removal
of files that happen to have the same name as the output file,
even when the uncompression fails and is aborted, i.e.:

$ echo hello world > hello
$ touch hello.Z
$ ls -l hello*
-rw-rw-r--  1 giorgos  giorgos  12 Jun 14 13:33 hello
-rw-rw-r--  1 giorgos  giorgos   0 Jun 14 13:33 hello.Z
$ ./uncompress -f hello
uncompress: hello.Z: Inappropriate file type or format
$ ls -l hello*
-rw-rw-r--  1 giorgos  giorgos  0 Jun 14 13:33 hello.Z
$

PR:		46787
Submitted by:	keramida
2003-06-14 13:41:31 +00:00
..
alias Mark bits that do not require an object directory as such. 2003-04-01 12:37:54 +00:00
apply Revert previous commit, from Bruce: 2003-06-09 19:21:35 +00:00
ar WARNS=4 2002-07-14 18:23:22 +00:00
asa mdoc(7) police: minor markup nits. 2002-05-30 13:33:59 +00:00
at Explain the format of the at.allow and at.deny files in detail. 2003-03-26 02:38:18 +00:00
awk Use 2003-06-06 13:46:55 +00:00
banner
basename ANSIify function definitions. 2002-09-04 23:29:10 +00:00
biff Bump document date for the 'beep only' change. 2002-08-16 03:08:25 +00:00
bluetooth Reapply mdoc(7) fixes that got accidentally lost in the last 2003-05-20 21:01:21 +00:00
brandelf Fix typo in the BSD copyright: s/withough/without/ 2002-06-02 20:05:59 +00:00
bzip2
bzip2recover Complete the bzip2 suite. 2003-01-04 17:09:27 +00:00
c89
c99 mdoc(7) police: overhaul. 2002-12-11 17:26:53 +00:00
calendar add my birthday 2003-06-11 09:04:53 +00:00
cap_mkdb ANSIify function definitions to avoid a warning. 2002-07-28 14:41:26 +00:00
catman Add (unsigned char) cast to ctype macros 2003-06-10 02:18:00 +00:00
chat Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ 2002-12-30 21:18:15 +00:00
checknr Close files after opening them to avoiding leaking descriptors and memory. 2003-06-01 06:15:30 +00:00
chkey Use strchr() instead of index(). Use getopt(). Use err(). 2002-08-27 19:06:44 +00:00
chpass Make GCC 3.3 happy with rcsid[], sccs[], and copyright[]. 2003-05-03 19:44:46 +00:00
cksum - For variables holding offset values, use off_t rather than 2003-03-13 23:32:28 +00:00
cmp The cmp utility has the questionable feature of using mmap when 2003-02-26 06:44:46 +00:00
col ANSIify function definitions. 2002-09-04 23:29:10 +00:00
colcrt Fixed the abuses of .Ql visible on stderr in troff mode. 2002-12-23 16:04:51 +00:00
colldef mdoc(7) police: markup polishing. 2002-11-26 17:33:37 +00:00
colrm ANSIify function definitions to avoid a warning. 2002-07-28 15:22:43 +00:00
column ANSify function definitions to avoid a warning. 2002-07-28 15:25:15 +00:00
comm ANSIify function definitions to avoid a warning. 2002-07-28 15:28:38 +00:00
compile_et
compress Don't truncate the output file before making sure that we can 2003-06-14 13:41:31 +00:00
csplit mdoc(7) police: simplify. 2002-08-14 11:38:30 +00:00
ctags The .Xr files 2003-06-08 13:43:56 +00:00
cut Duplicate "from". 2003-05-03 15:55:23 +00:00
dig
dirname ANSIify function definitions to avoid a warning. 2002-07-28 15:50:38 +00:00
dnskeygen
dnsquery
doscmd Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
du -{h,k} are mutually exclisive. So only pay attention to the last of the 2003-03-30 21:25:16 +00:00
ee Fix references to non-existing or obsoleted man pages. 2003-04-30 19:18:50 +00:00
elf2aout Back out the totally unapproved backout of my commits. 2003-03-29 03:03:42 +00:00
elfdump mdoc(7) police: Revision. 2003-03-03 11:51:30 +00:00
enigma ANSIify function definitions. 2002-09-04 23:29:10 +00:00
env Split the env(1) manpage off from printenv(1); there is not much point 2003-06-01 06:29:47 +00:00
expand mdoc(7) police: markup polishing. 2002-11-26 10:57:57 +00:00
false Consistently use FBSDID 2002-06-30 05:25:07 +00:00
fetch Revert 1.52. This should have been added to fetch.3. 2003-06-10 20:34:50 +00:00
file Update for FILE v3.41. 2003-03-12 14:37:01 +00:00
file2c Consistently use FBSDID 2002-06-30 05:25:07 +00:00
find Fix all WARNS. Checked with "make WARNS=9". Remove unused file. 2003-06-14 13:00:21 +00:00
finger If stat() on the terminal specified in utmp fails due to ENOENT, don't 2003-04-02 20:22:29 +00:00
fmt Consistently use FBSDID 2002-06-30 05:25:07 +00:00
fold ANSIify function definitions. 2002-09-04 23:29:10 +00:00
from ANSIify function definitions. 2002-09-04 23:29:10 +00:00
fstat Bow to the whining masses and change a union back into void *. Retain 2003-01-13 00:33:17 +00:00
fsync Consistently use FBSDID 2002-06-30 05:25:07 +00:00
ftp Update for lukemftp-1.6-beta2. 2002-06-15 09:42:17 +00:00
gcore Add #include <sys/queue.h> for sparc64's benefit. The MD includes there 2002-09-13 18:24:59 +00:00
gencat Check NULL pointer to avoid SIGSEGV 2002-12-24 07:40:10 +00:00
getconf Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
getopt english(4) police. 2002-12-27 12:15:40 +00:00
gprof Remove 2 more unused doc Makefiles. 2003-02-04 18:26:08 +00:00
head Remove duplicate __FBSDID() - spotted by trying to build with a non-GNU 2002-07-23 14:39:20 +00:00
hesinfo ANSIify function definitions. 2002-09-04 23:29:10 +00:00
hexdump Capitalize ASCII code names. 2002-12-05 08:50:00 +00:00
host
id ANSIify function definitions. 2002-09-04 23:29:10 +00:00
indent Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
ipcrm Wrap long line. Use .Ar instead of .Nm where appropriate. 2003-02-05 14:15:02 +00:00
ipcs Markup bits. 2003-05-21 21:07:28 +00:00
join mdoc(7) police: nit. 2002-11-26 11:25:04 +00:00
jot Don't depend on pollution in <limits.h> for the definition of 2002-07-05 15:58:27 +00:00
kdump Two enhancements for kdump. 2003-06-03 01:44:43 +00:00
keylogin Consistently use FBSDID 2002-06-30 05:25:07 +00:00
keylogout Consistently use FBSDID 2002-06-30 05:25:07 +00:00
killall make "killall -j" not core dump. 2003-04-27 07:17:27 +00:00
ktrace Do not start err(3) strings with uppercase nor dot terminate them. 2003-02-05 14:25:43 +00:00
ktrdump Use strlcpy() instead of strcpy() to not overflow static buffers. 2002-10-06 23:52:06 +00:00
lam Back out my minorly disputed and possibly not well thought out changes to how 2002-07-01 18:03:30 +00:00
last Fix core dumps when invoking with something like ``last -w1''. 2002-10-30 18:19:59 +00:00
lastcomm Don't try to fseek before the beginning of the file; POSIX requires that 2003-01-27 18:16:32 +00:00
ldd Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ 2002-12-30 21:18:15 +00:00
leave Fixed the abuses of .Ql visible on stderr in troff mode. 2002-12-23 16:04:51 +00:00
less Use 2003-06-06 13:46:55 +00:00
lessecho
lesskey
lex Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
limits Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
locale Add locale(1). I have used it for while as useful debugging tool 2002-10-16 13:17:18 +00:00
locate The .Xr utility 2003-06-08 13:45:37 +00:00
lock Introduce options definition the standard way. 2003-06-09 19:32:02 +00:00
lockf Consistently use FBSDID 2002-06-30 05:25:07 +00:00
logger Clarify the describtion of the -A switch 2003-05-21 15:00:47 +00:00
login When the tty chown() fails, report a chown() failure rather than a 2003-04-26 02:51:03 +00:00
logname ANSIify function definitions. 2002-09-04 23:29:10 +00:00
look Introduce options definition the standard way. 2003-06-09 19:32:02 +00:00
lorder Give the -o option before any filename operands when invoking the sort 2003-06-01 22:37:38 +00:00
lsvfs Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
m4 The .Nm utility 2003-06-08 13:47:20 +00:00
mail Remove 2 more unused doc Makefiles. 2003-02-04 18:26:08 +00:00
make Sync usage() with SYNOPSIS. 2003-04-15 14:27:21 +00:00
makewhatis Install /usr/libexec/makewhatis.local and /usr/libexec/catman.local. 2002-11-18 10:11:22 +00:00
mesg Introduce options definition the standard way. 2003-06-09 19:32:02 +00:00
minigzip mdoc(7) police: markup polishing. 2002-11-26 17:33:37 +00:00
mkdep english(4) police. 2002-12-27 12:15:40 +00:00
mkfifo ANSIify function definitions. 2002-09-04 23:29:10 +00:00
mklocale Change fatal to warnx() for unknown encoding 2003-06-03 16:58:31 +00:00
mkstr Remove claim that pi and ex use mkstr; pi is long gone, and nex doesn't 2002-11-01 12:22:41 +00:00
mktemp Use proper article. 2002-07-16 05:38:26 +00:00
msgs Fix singular/plural confusion in a printf. 2003-02-06 22:39:44 +00:00
mt Markup bits. 2003-05-21 21:07:28 +00:00
ncal Teach ncal(1) about month names specified on the command line. 2002-10-02 12:31:10 +00:00
ncplist Style fixes; whitespace and header order. 2002-04-28 12:21:31 +00:00
ncplogin ANSIify function definitions. 2002-09-04 23:29:10 +00:00
netstat Revert last delta. 2003-05-21 20:52:57 +00:00
newgrp mdoc(7) police: one minor change that was not probably worth a commit. 2002-05-30 13:57:35 +00:00
newkey The .Nm utility 2002-07-14 15:12:00 +00:00
nfsstat Replace /kernel with /boot/kernel/kernel. 2002-05-09 11:47:42 +00:00
nice english(4) police. 2002-12-27 12:15:40 +00:00
nl Remove local prototypes for main(). 2002-08-19 03:07:56 +00:00
nm Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup, 2003-01-01 18:49:04 +00:00
nohup Make GCC 3.3 happy with rcsid[], sccs[], and copyright[]. 2003-05-03 19:44:46 +00:00
objformat mdoc(7) police: markup and spelling. 2002-11-26 17:34:25 +00:00
opieinfo
opiekey
opiepasswd
pagesize Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
passwd While I really liked the error message one received from `passwd' 2003-04-18 21:27:09 +00:00
paste Fixed the abuses of .Ql visible on stderr in troff mode. 2002-12-23 16:04:51 +00:00
pathchk Unbreak support for systems that have no limit on pathname length. 2002-12-15 00:40:47 +00:00
pr Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ 2002-12-30 21:18:15 +00:00
printenv Split the env(1) manpage off from printenv(1); there is not much point 2003-06-01 06:29:47 +00:00
printf ANSIify function definitions. 2002-09-04 23:29:10 +00:00
quota Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
ranlib ANSIfy functions, and move extern declarations into a shared header 2002-04-28 11:59:43 +00:00
renice The usage string: renice [priority | [-n incr]] ... assumed that the part 2003-02-26 20:27:24 +00:00
rev ANSIify function definitions. 2002-09-04 23:29:10 +00:00
rlogin Dekerberise. The corresponding userland stuff has been dekerberised 2002-10-16 16:09:05 +00:00
rpcgen Implement nonblocking tpc-connections. rpcgen -m does still 2003-01-16 07:27:30 +00:00
rpcinfo Change the name for the local unix-socket based protocol 2002-12-16 22:24:26 +00:00
rs Add section number to .Xr 2003-06-08 13:58:08 +00:00
rsh Dekerberise. The corresponding userland stuff has been dekerberised 2002-10-16 16:10:46 +00:00
rup Style only; format function declarations, sort header includes, and 2002-04-28 10:49:15 +00:00
ruptime Forgot to update the date field; from David Magda <dmagda@magda.ca>. 2003-03-01 23:43:53 +00:00
rusers Trivial warnings fixes; staticise and use unsigned. 2002-04-28 11:13:20 +00:00
rwall ANSIify function definitions. 2002-09-04 23:29:10 +00:00
rwho Modernise; ISOify, use __FBSDID(), use headers instead of hand-declaring. 2002-07-01 16:40:33 +00:00
sasc
script ANSIify function definitions. 2002-09-04 23:29:10 +00:00
sed Do not dribble zero bytes into the output, by replacing an obfuscated if 2003-06-05 12:10:19 +00:00
shar
showmount Uniformly refer to a file system as "file system". 2002-12-12 17:26:04 +00:00
size Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
smbutil
sockstat Finish the implementation of the -p switch so that it 2003-06-07 14:36:49 +00:00
soelim Fixed the abuses of .Ql visible on stderr in troff mode. 2002-12-23 16:04:51 +00:00
split Support larger files (at least 64-bit offsets) by using off_t instead of 2002-07-15 05:31:55 +00:00
stat Assorted mdoc(7) fixes. 2003-06-02 11:19:24 +00:00
strings Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
strip Drop support for COPY, -c has been the default mode of install(1) 2002-07-29 09:40:17 +00:00
su typo 2003-06-08 13:51:40 +00:00
symorder command -> utility 2003-06-08 14:35:11 +00:00
systat Let libdevstat calculate the device-busy % instead of home-rolling. 2003-04-09 07:49:43 +00:00
tabs mdoc(7) police: markup polishing. 2002-11-26 17:33:37 +00:00
tail Revert part of the last commit. This fixes tail for pipes. 2003-06-10 16:49:14 +00:00
talk Add a reference to talkd(8) as a hint that talk(1) depends on a 2003-01-23 22:40:18 +00:00
tcopy The .Nm utility 2003-06-08 14:36:22 +00:00
tee ANSIify function definitions. 2002-09-04 23:29:10 +00:00
telnet Mrege from crypto telnet with "make unifdef". This gets a bunch of 2003-05-11 18:27:49 +00:00
tftp fix reverse logic in "connect" command that cause port specifications to be ignored. 2003-03-25 02:33:35 +00:00
time Introduce options definition the standard way. command -> utility. 2003-06-09 19:37:45 +00:00
tip make prototpyes match functions, and declare things static as needed 2003-04-06 08:30:25 +00:00
top Remove #include <sys/dkstat.h> 2003-02-16 14:13:23 +00:00
touch ANSIify function definitions. 2002-09-04 23:29:10 +00:00
tput command -> utility. Add section number to .Xr 2003-06-08 14:38:02 +00:00
tr Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/ 2002-12-30 21:18:15 +00:00
true A function which takes no arguments has an argument list spelled (void) in the 2002-06-20 05:35:40 +00:00
truncate
truss Use cat(1) instead of cp(1) so as not to break -DNOCLEAN builds 2003-06-06 05:38:09 +00:00
tset Add section number to .Xr 2003-06-08 13:58:08 +00:00
tsort ANSIify function definitions. 2002-09-04 23:29:10 +00:00
tty A space between switch and open-paren. Don't explicitly cast the value 2002-05-29 17:12:30 +00:00
uac Fix typo in the BSD copyright: s/withough/without/ 2002-06-02 20:05:59 +00:00
ul Add section number to .Xr 2003-06-08 13:58:08 +00:00
uname Add sysctlbyname(3) support, and use that for uname -i, in preparation for 2003-06-09 10:23:43 +00:00
unexpand Fix off-by-one error processing the line after an empty line when the 2002-10-04 16:45:25 +00:00
unifdef MAINTAINER line moved to MAINTAINERS file. 2003-06-04 10:01:10 +00:00
uniq Mention the environment variables that affect the execution of uniq. 2003-04-12 04:17:14 +00:00
units Add enough consts to keep everyone happy. 2002-07-28 16:23:28 +00:00
unvis ANSIify function definitions. 2002-09-04 23:29:10 +00:00
usbhidaction Assorted mdoc(7) fixes. 2003-05-30 21:27:29 +00:00
usbhidctl Remove uninitialized local variable in favor of global. 2003-05-26 04:58:26 +00:00
users ANSIify function definitions. 2002-09-04 23:29:10 +00:00
uudecode Make GCC 3.3 happy with rcsid[], sccs[], and copyright[]. 2003-05-03 19:44:46 +00:00
uuencode Make GCC 3.3 happy with rcsid[], sccs[], and copyright[]. 2003-05-03 19:44:46 +00:00
uuidgen Erase whitspace at EOL. 2003-05-22 13:10:32 +00:00
vacation
vgrind Add section number to .Xr 2003-06-08 13:58:08 +00:00
vi Remove deprecated locale names 2003-06-10 01:54:10 +00:00
vis ANSIify function definitions. 2002-09-04 23:29:10 +00:00
vmstat Uncomment the description of the -f option. Add rfork() to the list of 2003-04-14 07:22:25 +00:00
w Fix warning when calling w(1) when logged in via xdm/kdm. This is 2002-08-23 04:31:58 +00:00
wall Remove "sleeper" nonsense. 2003-02-21 08:46:44 +00:00
wc mdoc(7) police: markup polishing. 2002-11-26 17:33:37 +00:00
what mdoc(7) police: markup polishing. 2002-11-26 17:33:37 +00:00
whereis Adjust max WARNs for sparc64. 2002-12-30 09:48:40 +00:00
which Handle relative and absolute pathnames (anything with a `/' in it) in the same 2002-06-30 06:02:39 +00:00
who Remove unimplemented System V options from the getopt() option string. 2002-12-21 00:38:14 +00:00
whois Drop maintainership of whois(1). If someone needs a review they can 2003-06-12 02:46:47 +00:00
window Remove the only varargs.h consumer in the tree. Use stdarg.h instead. 2003-04-15 18:59:22 +00:00
write ANSIify function definitions. 2002-09-04 23:29:10 +00:00
xargs - Use _PATH_TTY and _PATH_DEVNULL macros. 2003-06-13 17:05:41 +00:00
xinstall Migrate to a new way of dealing with building from old revisions of 2003-04-05 20:30:30 +00:00
xlint Consistently use __inline for pure c89 compilers. 2003-06-07 18:12:30 +00:00
xstr Introduce options definition the standard way. Do not uppercase first 2003-06-09 19:35:56 +00:00
yacc Add __unused to the declaration of yyrcsid in a more portable way. 2003-02-12 18:03:55 +00:00
yes #include <err.h> to make yes warns clean again. 2002-11-09 21:00:39 +00:00
ypcat Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
ypmatch Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
ypwhich Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
Makefile Retire the useless NOSECURE knob. 2003-05-19 15:52:01 +00:00
Makefile.inc