christos
7c1fafb5f3
Coverity CID 1233: Avoid negative index.
2006-05-01 22:55:50 +00:00
christos
501be8b824
Need assert.h now.
2006-05-01 05:14:22 +00:00
christos
e408cc2631
Coverity CID 766: Add assertion before pointer deref.
2006-05-01 05:13:58 +00:00
christos
76c6077db0
Coverity CID 815: Avoid NULL pointer deref.
2006-05-01 05:04:02 +00:00
christos
f2dd1e3c0c
Coverity CID 1772: Close file on error return.
2006-05-01 00:03:15 +00:00
christos
4f0fad7e36
Coverity CID 814: Add extraneous checks to shut up Coverity.
2006-05-01 00:00:12 +00:00
christos
f5c3fa40c3
Coverity CID 1206: Confusion between && and || leads to indexing an array
...
with negative index.
2006-04-30 23:56:42 +00:00
christos
1af32ba03a
Coverity CID 1566: fix memory leak.
2006-04-30 23:54:40 +00:00
christos
1f74082c09
Coverity CID 1972: Don't leak file descriptor.
2006-04-30 23:52:14 +00:00
christos
781d14720c
Coverity CID 1599: Fix memory leak.
2006-04-30 23:49:34 +00:00
christos
fc56e77334
Coverity CID 1483: Off-by-one stack overflow.
2006-04-30 23:43:31 +00:00
christos
9ff5bf4b8a
Coverity CID 788: Fix null pointer deref.
2006-04-30 23:42:06 +00:00
christos
4f6d3973bf
Coverity CID 787: Fix null pointer deref.
2006-04-30 23:40:20 +00:00
christos
0b78752ab3
Coverity CID 749: Comment out dead code.
2006-04-30 23:38:34 +00:00
christos
f84f0d3321
Coverity CID 2972, 2973: Don't call close() with a negative fd.
2006-04-30 23:34:50 +00:00
christos
011be34f91
Coverity CID 1565: Fix memory leak.
2006-04-30 23:30:13 +00:00
christos
7d7dff8590
Coverity CID 2986: Free lines before returning.
2006-04-30 23:27:15 +00:00
liamjfoy
9a4f3f0f6e
remove an unused variable
...
ok christos
2006-04-30 20:23:02 +00:00
liamjfoy
4ed54cf43d
Remove Pflag variable. its unused.
...
ok christos@
2006-04-30 19:24:50 +00:00
christos
0f2aabcd39
Coverity CID 1858, 1857: Fix leaks. While here, pass lint use warn/warnx
...
instead of perror/fprintf. KNF.
2006-04-28 20:35:15 +00:00
christos
69f8117233
Coverity CID 873: Only align if we printed a string.
2006-04-28 20:07:57 +00:00
christos
61e04d677f
Coverity CID 874: Don't check local; it cannot be NULL.
2006-04-28 20:06:50 +00:00
christos
fc5177078a
Coverity CID 875: local is not allowed to be NULL; don't check for it.
2006-04-28 20:05:43 +00:00
christos
32d85d8f66
Coverity CID 2194: Don't forget to free port.
2006-04-28 20:02:07 +00:00
christos
5c8a52b0f1
Coverity CID 2195: Free path in all code paths, not some.
2006-04-28 19:59:44 +00:00
christos
e8877ca717
Coverity CID 1780, 1779: Fix memory leak.
2006-04-28 19:53:56 +00:00
simonb
47890115bd
Unwrap a not too long line.
2006-04-27 09:04:41 +00:00
christos
63b0d1ab71
Coverity CID 2790: Always free tmp buffer, not somethimes.
2006-04-25 19:34:42 +00:00
christos
4d5030b7d4
Coverity CID 2969: Check for negative stack in the 'P' case like we do in
...
the 0 case.
2006-04-25 19:25:19 +00:00
wiz
61152e3f56
Document more explicitly that -c takes an optional file argument.
2006-04-24 22:00:43 +00:00
hubertf
0b4add3077
Allow reading the checksum list from stdin if no file is given with -c.
...
This allows verifying the checksums e.g. after downloading a NetBSD
release:
cat BSDSUM CKSUM MD5 SHA512 SYSVSUM | cksum -c
2006-04-24 21:07:43 +00:00
hubertf
1e8e9dee9c
Try guessing hash types. Prefix output with hash type,
...
the output format was inspired by Linux & OpenBSD.
This now allows doing something like:
miyu% ( md4 *.c ; md5 *.c ; sha1 *.c ) > /tmp/x
miyu% md5 -c /tmp/x
miyu% cksum -c /tmp/x
miyu% echo $?
0
miyu% date >test.c
miyu% cksum -c /tmp/x
(MD4) test.c: FAILED
(MD5) test.c: FAILED
(SHA1) test.c: FAILED
miyu% echo $?
1
2006-04-24 19:41:41 +00:00
jld
c861d33e38
Make yes exit if a write fails (due to, e.g., EPIPE or revocation).
...
With advice from rillig@; discussed on tech-userlevel on 2005-11-18.
2006-04-24 05:24:03 +00:00
wiz
f255a1f958
A fix for HTML output; punctuation nits.
2006-04-23 17:45:04 +00:00
hubertf
944a4820a3
Document -w, too.
2006-04-23 16:48:02 +00:00
hubertf
f9e91b57ed
Add a switch "-c file" to verify a list of checksums generated by the
...
cksum program and stored in file against files on disk. E.g. first
run "md5 *.tgz >MD5" to generate a list of MD5 checksums in MD5, then
use the following command to verify them use "md5 -c MD5"
Inspired by Linux' md5sum,
called for by Jukka Salmi <j+nbsd@2006.salmi.ch>on netbsd-help@,
reviewed by rui@.
2006-04-23 16:40:16 +00:00
christos
328064d112
Redo the previous change so that we can ignore access errors from find,
...
but also tell when writing to the output file failed, by using a pipeline
to cat. While here change `` to $(). Otherwise this would always fail
since it is ran as nobody and therefore it cannot access some files. Reported
by smb.
2006-04-23 03:04:08 +00:00
christos
731b0f1073
Coverity CID 522: Clarify that there is no overrun here.
2006-04-22 20:51:09 +00:00
christos
3d5b8ce5a8
Coverity CID 529: Call VarFreeEnv to prevent leak.
2006-04-22 19:40:40 +00:00
christos
ac5c384e1b
Coverity CID 534: Free junk variables on return from Var_Parse.
2006-04-22 19:32:35 +00:00
christos
bb46846e03
Coverity CID 533: Plug memory leak.
...
Add a new function VarFreeEnv() to free environment variables and use it.
2006-04-22 19:28:51 +00:00
christos
58c48be0b3
Coverity CID 526: Check for condTop < 0 where we decrement it, not later
...
when the damage is already done.
2006-04-22 18:53:32 +00:00
christos
1c603f6321
Coverity CID 527: Make it painfully obvious that av is freed.
2006-04-22 18:48:46 +00:00
christos
0f515a9e28
Coverity CID 528: Avoid NULL deref.
2006-04-22 18:47:10 +00:00
christos
f2f8f4c25a
Coverity CID 530: Don't leak the argument vector.
2006-04-22 18:43:06 +00:00
christos
1456136e74
Coverity CID 523: Fix off by one mistake.
2006-04-22 18:38:38 +00:00
christos
d64e64f832
Coverity CID 545: Appease coverity. return early if the locally allocated
...
memory is not going to be used (this is an impossible case).
2006-04-22 18:16:13 +00:00
christos
df780f7c38
Coverity CID 546: Add assertion before de-reference.
2006-04-22 18:08:13 +00:00
christos
2d84e02e2f
Coverity CID 552: Close opened file.
2006-04-22 18:02:26 +00:00
christos
ebd63cb6e2
Coverity CID 1748: Free alias on error.
2006-04-22 17:51:09 +00:00
christos
42bccc19d6
Coverity CID 2913: Check for EOF before using char as index to array.
2006-04-22 17:46:48 +00:00
christos
24f29ca641
Coverity CID 95: Fix resource leak.
2006-04-21 16:36:05 +00:00
yamt
1c625a0e79
remove unused files.
2006-04-21 13:45:42 +00:00
hubertf
ce8f04b19d
Don't try to determining the size of what's coming when reading from a pipe.
...
Instead of reporting some bogus values, print no progress at all.
(It's beyond me why stat(2) on a pipe returns funny values...
see the PR below for some examples!)
Fixes PR bin/33207 by myself.
OK'd by mrg@
2006-04-20 23:20:55 +00:00
blymn
10df330c85
Prefix iostat structure elements with io_
2006-04-20 12:13:51 +00:00
christos
862fe20f05
GC old signal handling and merge it in 4 places:
...
1. Immediately ignore all the signals we want to ignore and set the alarm.
2. Before we exit on error, restore all signals we modified
3. Before we exec a shell, restore all signals we modified and ignore TSTP.
Job control aware shells know how to deal with this.
4. Temporarily handle SIGINT while we read motd.
2006-04-17 16:29:44 +00:00
skrll
683ccd8e40
Add RCSId.
2006-04-17 06:53:06 +00:00
blymn
e48af18bc5
Update to use new kernel io statistics.
2006-04-14 13:14:06 +00:00
blymn
7d866d268b
Update statistics reporting to use new kernel framework, rename dkstats*
...
to a more generic name since it no longer just deals with disk.
2006-04-14 13:12:37 +00:00
wiz
3aec927b7b
Bump date for previous.
...
New sentence, new line.
Remove trailing whitespace.
2006-04-13 21:15:50 +00:00
wiz
afd4fdef89
Bump date for previous, slightly reword a sentencen.
2006-04-13 21:10:44 +00:00
sjg
d7df397808
Change ReadMakefile to return 0 on success so that it better meets
...
the expectations of Lst_Find*. This way we only read the first sys.mk
found via sysIncPath.
At the same time we need to add a ReadAllMakefiles() for the case
where multiple -f makefile args are provided (uncommon, but documented).
2006-04-12 20:32:27 +00:00
chuck
02ff9e80b9
fix .Xr to invalid man page that i put in by mistake
2006-04-10 16:20:46 +00:00
chuck
d09fe2c467
modified man(1):
...
- avoid double slashes when displaying man pages (got tired
of '/usr/share/man//cat1/man.0').
- got rid of __P() while working on it.
- incorporate some of my old notes explaining how manpath works into the
comments of the code itself.
- renamed some of the vars so that the code is consistent throughout
(and hopefully clearer and easier to understand)
- fixed relative man paths for multiple man pages (man did a chdir()
on the first man page it had to format --- this broke any remaining
relative path man pages left to process). save old directory and
fchdir() back to it after formatting.
- improved doc on "man -h" which does more than just whatis(1) [e.g.
"man -h fopen" prints the required include files and the prototypes
rather than just the one-liner you get with whatis(1)]
- manconf.c now fills in the "len" length field in the TAG/ENTRY
structures (man now uses len).
revise man.conf file reading stuff to return error on failure in
addentry/gettag (fka getlist) rather than just err()ing out. this
allows man(1) to call cleanup and delete its tmp files rather than
just leave them floating. revise other apps using this code
(makewhatis, apropos, catman, whatis) to expect this. also remove
__P on updated files.
2006-04-10 14:39:06 +00:00
chuck
82ad9348f2
rework the wording in these man pages (mainly in man.conf.5) based on
...
some old notes I found to make it clearer and easier to understand
how the man stuff works (hopefully!).
2006-04-10 14:02:57 +00:00
christos
857164eeb5
Coverity CID 2536: Clarify the error path further.
2006-04-09 20:01:40 +00:00
christos
c5e22666b0
Coverity CID 1596: Plug memory leak.
2006-04-09 19:51:23 +00:00
christos
e550e02b95
Coverity CID 1624: Plug memory leak.
2006-04-09 19:47:43 +00:00
christos
79059c6361
Coverity CID 1563: Fix memory leak.
2006-04-09 19:42:03 +00:00
christos
3bf01f5c84
Duh fixed error printing.
2006-04-09 19:39:17 +00:00
christos
034e8bc313
Coverity CID 1580: Plug memory leak.
2006-04-09 19:37:50 +00:00
christos
c1cd33addf
Coverity CID 2331: Plug memory leak.
2006-04-09 19:27:22 +00:00
christos
5d96bf2cf0
Coverity CID 2333: Fix memory leak.
2006-04-09 19:21:26 +00:00
christos
bd21f84917
Coverity CID 1253, 1254: Don't assign the return of read or write to size_t.
...
It will never be negative.
2006-04-09 19:12:17 +00:00
christos
f5a5211062
It is silly to creat() and close a file just to stat it. open/fstat/close
...
instead checking for errors. From Coverity CID 1276.
2006-04-09 19:06:34 +00:00
christos
5800a5519e
Coverity CID 2078, 2079, 2080: Plug memory leaks.
2006-04-09 19:03:32 +00:00
christos
e90cb419e0
Coverity CID 2355: Checking event for NULL is supefluous; restructure the
...
code to make this obvious.
2006-04-09 18:57:10 +00:00
christos
347d6ce9be
Pass lint. Also fix errx/err confusion.
2006-04-09 18:54:28 +00:00
christos
61894ae043
Coverity CID 894: Avoid NULL dereference that cannot really happen.
2006-04-09 18:47:49 +00:00
christos
9d0203193c
Pass lint.
2006-04-09 18:45:19 +00:00
wiz
498c64811f
Note that -v is broken in this version.
2006-04-08 23:56:39 +00:00
christos
03c0fd3fc6
change an int to size_t
2006-04-08 23:27:03 +00:00
christos
258969c334
Include bsd.own.mk; from Jukka Salmi
2006-04-08 20:07:29 +00:00
mrg
0db1500b43
retire HAVE_GCC3/HAVE_GCC4 and introduce HAVE_GCC that is set to 2, 3 or 4.
2006-04-07 19:38:58 +00:00
rpaulo
32f6ca81fb
snprintf returns int, not size_t. CID 691.
...
From bjh21.
2006-04-06 18:30:31 +00:00
simonb
372d44b647
Use TABs instead of spaces.
2006-04-06 00:48:14 +00:00
yamt
2267ff751f
cuhelp: fix a typo in usage.
2006-04-05 23:30:57 +00:00
dsl
2ab52a9ec8
Rework the way that files are closed and unlinked on error.
...
In particular avoid calling fclose() again once it has failed.
Also multply 'oreg' by 2 once we modify the file - so we know when to
unlink it on error.
Fixes Coverty CIDs 2535 and 2536
2006-04-05 20:24:38 +00:00
dsl
4fe310d596
Avoid iswhite(EOF) - fixes coverty CIDs 365 and 1196
...
I'm not at all sure EOF handling is correct anyway - but it probably only
affects the last line of a file (and maybe last lines without \n).
In particular I suspect that 'ungetc(EOF, file)' doesn't do the expected
thing, and that fseek() needs to be preceeded by clearerr(). But life it short.
2006-04-05 20:03:14 +00:00
dsl
abc6183046
Don't follow node->left after free(node).
...
Optimise out recursion unless both node->left and node->right non-NULL.
Fixes coverty CIDs 26 and 27.
2006-04-05 19:38:47 +00:00
tron
442e61c603
Fix "MKUUCP" check so that "cu" installed if "MKUUCP" is not defined.
2006-04-05 13:04:33 +00:00
christos
a2170ce453
make sure that netid always points to an allocated string. Pointed out by
...
enami; thanks.
2006-04-05 12:57:29 +00:00
christos
c721423ddc
Use the standard macros to compute the ioctl length instead of rolling our
...
own. Thanks to Chuck for noticing.
2006-04-05 00:50:59 +00:00
christos
48cf428279
Turn if/then/elif into a switch
2006-04-04 21:35:20 +00:00
christos
cda1870a45
Coverity CID 28: Fix resource leak.
2006-04-04 21:29:42 +00:00
christos
99f1624bd3
Coverity CID 97: Remove dead code.
2006-04-04 21:27:42 +00:00
wiz
e9821b1244
Sort SEE ALSO; mark up -; end sentence with dot.
2006-04-04 20:45:41 +00:00
dyoung
ca9de39d07
If MKUUCP=no, do not create links for cu and its manual page.
2006-04-04 15:09:50 +00:00
tls
76f2334c55
Use closefrom, don't iterate over file descriptors from 3 to 20.
2006-04-03 16:13:34 +00:00
tls
a973ebec53
Replace abuse of SIGIOT, SIGEMT, SIGSYS for communication between the
...
TIPIN and TIPOUT processes with a third "attention" pipe. While we're
here, fix a few other minor nits like the hardcoded use of fd 3 in
consh().
Now ~+/~C appear to work. This must have been broken for years.
2006-04-03 16:03:50 +00:00
christos
e0b8cfed06
Coverity CID 2287: Fix memory leak.
...
Plus:
- change fprintf -> errx
- remove unneeded casts
- avoid err() shadowing
2006-04-03 15:21:26 +00:00
tls
374e37364a
Move "cucommon" label (ugh) to above the O_NONBLOCK handling for direct
...
connections. This stops the tipout process from spinning.
2006-04-03 14:54:16 +00:00
christos
cb82eb0f6b
Redo the previous in the tip sanctioned way :-)
2006-04-03 14:12:29 +00:00
martin
d6d78510c3
printf format fixes for 64bit archs
2006-04-03 13:30:24 +00:00
he
3a81e1c420
For the benefit of our 64-bit ports, we need to cast via intptr_t when
...
casting from pointer to unsigned int.
2006-04-03 13:00:48 +00:00
scw
34b4a96dbb
Add a kernel driver and userland program for the Topfield TF5000PVR range
...
of digital video recorders popular in Europe and Australia.
These devices have a USB client port which can be used to upload and
download recordings (and other files, such as MIPS binaries for execution
on the DVR's CPU) to/from their internal hard disk, in addition to some
other operations on files and directories.
2006-04-03 08:15:48 +00:00
wiz
e9a003bced
Use Dq, punctuation vs whitespace nits.
2006-04-03 05:56:20 +00:00
yamt
e6e5a0e51b
actually set up baudrate after rev.1.33.
2006-04-03 05:08:40 +00:00
yamt
25e67975a5
fix a typo in LINKS.
2006-04-03 05:05:55 +00:00
christos
c4341bc3e1
Pass a little lint.
2006-04-03 04:53:58 +00:00
perry
29dc02e572
delinting. more needed. (lint found some real bugs that I haven't fixed yet.)
2006-04-03 04:25:30 +00:00
perry
b43b6e6666
Merge a few of the OpenBSD manual page changes. Not yet close to
...
finished but I have to break for now and Thor will probably pick up
from where I left off.
2006-04-03 03:46:34 +00:00
tls
125606b781
Wwwwwwww! Do not remove variables from the vtable in vars.c without
...
changing the indices in tip.h -- what a terrible design.
Okay, "design". Fine. Whatever. ;-) Now we don't dump core all the time.
2006-04-03 03:13:10 +00:00
perry
31f14bb93a
Clean up a bit.
2006-04-03 02:33:19 +00:00
perry
d71f683e39
Remove vestiges of the ACULOG support. It depended on the suid support
...
(which is now gone) and it is woefully obsolete -- if something
analogous is ever needed in the future, syslog is the way to do it.
2006-04-03 02:25:27 +00:00
tls
bc4c5be2bf
Now we use tip-as-cu, not Taylor UUCP cu.
...
These programs are no longer setuid, and now lock devices with flock,
not file locks in /var/spool/. They will no longer lock against UUCP
itself unless we modify UUCP to lock with flock, but this seems highly
unlikely to be an issue in the present day.
2006-04-03 02:21:13 +00:00
perry
8a1d2efb73
remove refs to uucp locking and aculog
2006-04-03 02:14:26 +00:00
tls
6bd8b21472
The ~C / ~+ command is no longer optional.
2006-04-03 02:06:44 +00:00
perry
eee85da04c
Remove support for uucp style locking.
...
This means we can get rid of the suid/sgid parts of the code (which
have been removed). The program is now installed with normal permissions.
To prevent accidents, we now flock the tty line, attempting to get an
exclusive lock.
Reviewed by: tls
2006-04-03 02:01:28 +00:00
tls
896b79dbc8
If we're not given a phone number or system name to dial, use "direct
...
connect" mode -- in other words, set CLOCAL so the user can talk to the
device before CD.
2006-04-03 01:48:22 +00:00
tls
bed8070daa
Whoops. We don't *use* log.o, so don't *build* it.
2006-04-03 01:47:20 +00:00
perry
58c2151f1e
ANSIfy decls, de-__P, clean trailing whitespace
2006-04-03 00:51:13 +00:00
tls
4c0b53d7b4
At Luke Mewburn's suggestion, disable "force" by default, too. Those using
...
the tip frontend who really want ^P used for "send literal" can turn it on
in tiprc or remote.
2006-04-02 23:25:35 +00:00
tls
edddcc4ac8
Add another Taylor compat option, --nostop to disable software flow control
...
(a.k.a. "tandem" mode). While we're here, fix a buglet with --halfduplex,
and add --flow {hard, soft, none}. Note that you can't get *both* hard and
soft flow control using the command-line option; if you want that, you
have to set the variables in tiprc or with ~s once tip is running.
Move all setting of vars.c named variables to *after* the call to vinit().
2006-04-02 22:19:26 +00:00
tls
da6a898cf6
Oddly enough, smashing CRTSCTS into the terminal input flags doesn't do
...
much; it is a control flag.
Now toggling hardware flow control works.
2006-04-02 20:44:20 +00:00
tls
6b0f06d935
Fix the conditional compilation on ACULOG so it actually works.
...
Turn it off by default -- it hardly saves any space, but it's
one of the reasons why the executable is installed setuid, and
other versions of tip/cu don't write a log file anyway. We can
add syslog support later if we ever really want this back, the
file-writing is all encapsulated in log.c.
2006-04-02 19:16:22 +00:00
tls
ad69069bcc
New 'cu' command-line handling, derived from Todd Miller's in OpenBSD,
...
but with some long options added for Taylor 'cu' compatibility, and
with some bugs fixed (in particular, the handling of -# now works as
documented and does not overwrite argv).
2006-04-02 19:04:24 +00:00
tls
0b7476a655
Remove extra \n from call to warn()
2006-04-02 19:03:55 +00:00
tls
b3de57c6bf
Don't build any of the dialers except Hayes. If anyone is using any of
...
the others (maybe "Courier", but I doubt it) we can easily enough turn
them back on.
Saves 20-30K depending on platform. Not totally insignificant, since this
often goes on install media, or very small systems.
2006-04-02 19:00:40 +00:00
tls
b8dc57b8d9
If we might have two links, we'd better print our program name when we
...
emit an error -- and it would be nice if it were the *right* program name.
Since it's convenient, change most perror calls to warn, and a lot of
fprintf ... exit to errx. Fix at least one fprintf that could run off
the end of its arguments (%s but no argument, how did we never catch this?).
2006-04-02 06:11:45 +00:00
tls
82222cd3ac
Default to no parity instead of even parity. OpenBSD made this change
...
long ago, and I think it makes sense.
2006-04-02 04:28:38 +00:00
tls
685d2e5048
Default the "raisechar" value (for the insane old case-mapping) to NULL.
...
As the same change in the OpenBSD tree says, "if you are crazy enough
to want it, then it can be turned on in /etc/remote."
2006-04-02 04:25:36 +00:00
christos
df58c5cd15
Coverity CID 1660: Plug memory leaks.
2006-04-02 04:17:08 +00:00
tls
8139858166
Default baud rate to 9600 (was 1200) to match Taylor cu.
2006-04-02 04:10:54 +00:00
tls
7d1bef10da
Add the rest of the speeds listed in termios.h. This is not, perhaps, as
...
sensible as the way OpenBSD supports arbitrary speeds; but we hardly add
new speeds often and this change is a lot less invasive.
2006-04-02 04:02:00 +00:00
christos
ceb6edafa6
Coverity CID 922: Fix check against NULL.
2006-04-02 03:50:38 +00:00
christos
472d6fbe72
Coverity CID 878: Remove impossible tests against NULL pointers.
2006-04-02 03:47:26 +00:00
christos
999d9f8f32
Coverity CID 1181: Protect access against NULL.
2006-04-02 03:40:06 +00:00
christos
002be29d1a
Coverity CID 2290: Fix memory leak.
2006-04-02 03:33:55 +00:00
christos
095e4da292
Coverity CID 1204: Prevent negative index.
2006-04-02 03:29:17 +00:00
christos
6e2787485e
Coverity CID 2336: Fix memory leak.
2006-04-02 03:19:34 +00:00
tls
40bdc77642
Change manual page (as OpenBSD did) to reflect the actual arrangement of
...
file descriptors with ~C, instead of some weird ancient arrangement.
Document ~+ as a synonym for ~C.
2006-04-02 03:15:02 +00:00
tls
b389579aca
Add "~+" as a synonym for "~C" for Taylor cu compatibility.
2006-04-02 03:10:54 +00:00
christos
8533275dab
Remove bogus debugging code I accidentally committed.
2006-04-02 00:15:53 +00:00
christos
46c0b8e98a
PR/26804: Jason Thorpe: Make PT_DUMPCORE require the process to be PT_ATTACH'ed
...
first so that it is stopped and there are no races.
2006-04-01 22:34:00 +00:00
jmmv
43e0f4ee96
Fix cross-reference to grep(1).
2006-04-01 16:12:23 +00:00
cherry
fb4fa95282
xlint for ia64
2006-04-01 09:39:47 +00:00
rtr
75de03412e
cast line_len to (int) to avoid warn.
2006-04-01 06:36:58 +00:00
rtr
df14d9f34e
revert previous to previous as it was correct
2006-04-01 06:31:43 +00:00
rtr
f738eedb64
change printf format from "%.*s" to "%.8s"
...
have to conclude it was what was actually intended in the previous change
2006-04-01 06:26:31 +00:00
christos
e052a053e4
Add some coverity allocation comments, and change the way the allocator
...
functions work. When they allocate storage that needs to be freed, instead
of setting a boolean, set the pointer to be freed. Plug some more memory
leaks found by inspection.
2006-03-31 21:58:08 +00:00
dsl
33369a0245
There is no need to count jobs and job tokens.
...
If we don't create the job pipe, use the '-j n' option to limit the number
of tokens we will remove from the pipe.
2006-03-31 21:05:34 +00:00
christos
ec5cc02622
Coverity CID 544: Fix memory leak.
2006-03-31 20:30:46 +00:00
dsl
ec40cf92c2
Rewrite parallel() so that it uses fgetln() instead of fgets() so that
...
horrid nasty things don't happen when the input lines are the same size
as the buffer.
Simplify by using an array of 'FILE *' instead of a linked list so that
is possible to appease coverty (SID:1598) by freeing the memory.
Also fclose() the input lines when they are consumed.
Code still modifies optarg strings....
2006-03-31 18:59:52 +00:00
dsl
0720992d8c
KNF prior to fixing all the buffer overruns....
...
Coverty highlighted something else that doesn't matter!
2006-03-31 17:20:07 +00:00
dsl
3db763ccc3
MCDelSet() contains an infinite loop!
...
I suspect it has never, ever, ever been asked to delete anything that exists.
Also neither it, nor MCDelMsg() below free() the set and msg structures.
Found by Coverty SID:54
2006-03-30 20:32:10 +00:00
dsl
e4573e12e3
Simplify the way the end of a singly linked list is followed (for adding
...
items) so it is more obvious that we aren't going to indirect through
a null pointer.
Fixes coverty SID:101
2006-03-30 19:53:58 +00:00
dsl
4c18b91e3e
If fgetln() returns a buffer that isn't terminated by \n, free the temporary
...
buffer inside the loop. Fixes coverty CID:1674.
(This should only happen at EOF, so the loop SHOULD terminate.)
While here always output a newline at the end of the input data even when
the last (unterminated) line doesn't contain a separator.
2006-03-30 19:17:44 +00:00
rpaulo
a0713f21de
ANSIfy. de-P.
2006-03-29 15:40:49 +00:00
yamt
01ef02441c
pull the following change from OpenBSD
...
and bump date of the manpage.
date: 2003/09/20 18:15:32; author: millert; state: Exp; lines: +4 -2
Implement hardwareflow varable in tip(1) like Solaris and hf in /etc/remote.
Based on PR 3411 from Matthew Gream
Also document "tandem" variable (XON/XOFF) in tip man page.
2006-03-29 12:37:59 +00:00
cube
c002406624
Fix a broken conditional that confused coverity. It cannot happen, anyway.
...
CID 178.
2006-03-29 09:16:36 +00:00
ginsbach
a8cd0ffcee
- Change where variable substitution is done when processing traditional
...
include statements so that if a variable expands to more than one file
name make will "do the right thing".
- Add additional debug print
Reviewed by christos.
2006-03-28 17:41:35 +00:00
joerg
3e3d6f89bd
Query kernel for maximum argument size instead of using ARG_MAX.
2006-03-28 14:27:41 +00:00
christos
3b6811d33b
PR/33123: Murray Armfield: standards compliance & glob.h
...
Certain fields in glob.h need to be size_t; fix this and version glob(3).
http://www.opengroup.org/onlinepubs/000095399/basedefs/glob.h.html
2006-03-26 18:11:22 +00:00
hubertf
517eb6559a
Remove unused variable 'salt'
...
Found by code inspection in one of my classes, not via Coverity :)
OK'd by christos
2006-03-26 16:45:33 +00:00
jld
42ddba8762
Correct logic error in wildcard handling, which was causing the
...
day-of-month on normal entries to always be treated as a wildcard.
Specifically, "if (x&(y|z))" is equivalent to "if ((x&y)||(x&z))", not
"if ((x&y)&&(x&z))", which latter is clearly what was intended.
2006-03-24 23:30:08 +00:00
wiz
7ee6cdd959
Serial comma, remove unnecessary .Pp.
2006-03-24 00:14:23 +00:00
reed
909919ef8b
Briefly document output of the modstat utility.
...
(And update document date.)
2006-03-23 23:59:38 +00:00
reed
04a9318e11
Changing a comment only because the module interface version
...
is not 1 anymore.
2006-03-23 23:52:35 +00:00
wiz
02b5f03672
Remove some more old kerberos4 code. Simplify usage.
2006-03-23 23:49:07 +00:00
wiz
eb525bd07c
Remove some more old kerberos4 code.
2006-03-23 23:44:15 +00:00
wiz
54cd24faa5
Get rid of more Kerberos 4 code.
2006-03-23 23:33:28 +00:00
wiz
f5a1361a8f
Remove some more kerberosIV references.
2006-03-23 21:48:18 +00:00
christos
a6ee606509
gcc says case is missing, coverity says case not reached. Appease both.
2006-03-22 16:16:59 +00:00
christos
f88156c66b
PR/33128: Martin Husemann: When login in on the console, SIGABRT is ignored
...
Both SIGINT and SIGABRT should be restored before executing the shell.
2006-03-22 15:36:49 +00:00
christos
ec4e36f798
Coverity CID 46: Remove dead code.
2006-03-22 02:17:52 +00:00
christos
4b41923ad3
Coverity CID 198: Remove dead code if INT_MAX == LONG_MAX
2006-03-22 02:14:03 +00:00
christos
ec166aba55
Coverity CID 199: make sure that rtp is not NULL before dereferencing.
2006-03-22 02:08:55 +00:00
phil
4617d0a2bf
Kill NULL deref (CID: 871)
...
Plug fd leak (not caught by coverity).
2006-03-21 21:59:56 +00:00
christos
9731df7d2d
make this compile again.
2006-03-20 23:13:51 +00:00
dsl
7ee2912cf6
free() intrnamebuf, intrname and intrloc on entry so we don't leak them
...
every time initvmstat() is called.
Change intrnamebuf to be static so this works.
Inspired by Coverty CID 2072 (incorrectly) reporting that the memory assigned
to intrnamebuf wasn't being freed.
2006-03-20 20:36:38 +00:00
elad
cd7d931d2e
plug leaks, coverity cids 92, 93.
2006-03-20 17:18:06 +00:00
elad
c080c43ef1
plug leak, coverity cid 98.
2006-03-20 17:03:08 +00:00
elad
3e7dafb547
plug leak, coverity cid 94.
2006-03-20 17:01:26 +00:00
elad
6bceef66d3
- plug leak in generate_guard()
...
- plug leak in h_output(), coverity cid 100
2006-03-20 16:58:13 +00:00
christos
85e611dd01
Goodbye KerberosIV
2006-03-20 04:03:10 +00:00
gdamore
6af224c1b4
Support cross-building tn3270 from other OS' e.g. Solaris by hiding
...
_RCS and _COPYRIGHT macros in #ifndef HOST_TOOL, and defining HOST_CPPFLAGS
apropriately for host tools. Approved by uwe@.
2006-03-20 01:34:49 +00:00
cube
6a6299eb8f
Panic on an unlikely error condition. CID 177.
2006-03-19 23:36:10 +00:00
cube
e50e4ee4b2
Free a nvlist used temporarily.
...
Found by Coverity, CID 179 and 180.
2006-03-19 23:12:59 +00:00
jnemeth
4be1f2c6fd
Fix Coverity run 5, issue 1931 -- memory leak. This was noted as being a
...
bug by cgilbert.
Approved by christos@.
2006-03-19 22:52:01 +00:00
cube
11820066f8
Close file on error. CID 176.
2006-03-19 22:34:44 +00:00
cube
8e4130e5ee
Fix various resource leaks, all happenning on error situations (IOW,
...
shortly before exit(1)). CIDs 181, 182, 183, 184 and 185.
2006-03-19 22:27:14 +00:00
cube
3eaff5cb14
Proper resource handling in mkmakefile().
...
Coverity CIDs: 186, 187, 188 and 189.
2006-03-19 16:27:13 +00:00
wiz
59ba5fe8d1
New sentence, new line.
2006-03-19 10:45:03 +00:00
rtr
739b734996
the preceeding loop does not terminate except in a condition where
...
kp != NULL therefore testing if kp is == NULL after it is pointless
coverity 2446 / run 6
2006-03-19 06:10:22 +00:00
rtr
880b6df674
avoid double fclose()
...
coverity 2577 / run 6
2006-03-19 05:01:48 +00:00
rtr
d9da031351
remove ambiguity in evaluation of conditional expressions and avoid
...
double fclose().
coverity 2713 / run 6
2006-03-19 04:34:19 +00:00
sjg
98b766c482
Fix :P modifier so it actually works as described.
...
I.e ${var.c:P} should expand to the absolute path of var.c found via .PATH
2006-03-19 01:54:21 +00:00
sjg
8af5ec82ab
Document an interesting kwirk in := handling of undefined variables.
2006-03-19 01:53:01 +00:00
dsl
1655d9a820
Code to display per-system call counts.
...
Very useful to help identify which code is doing 1000s of system calls.
Not built because no one else has a kernel yet, and I need to make
the kernel side configurable. But I don't want to lose this code....
2006-03-18 20:31:45 +00:00
dsl
efc0bc90c3
Count both read bytes and write bytes when we are not showing separate read
...
and write statistics. Discovered by go.
Since I broke in in rev 1.31, I guess I'll fix it first!
2006-03-18 16:48:44 +00:00
dsl
bee1c2beb6
Make the functions that display the top 8 lines externally visible so
...
they can be used to head other pages (not ready to commit yet...).
Use puthumanint() for oversize numbers when display_mode is RUN or BOOT (when
very big numbers are to be expected).
Allow an extra column for Csw..Flt.
Adjust some #defines to avoid use of global s & s1.
2006-03-18 14:58:49 +00:00
dsl
2769bb6a26
Coverty 1212: Avoid close(-1).
2006-03-18 11:15:00 +00:00
dsl
f9603a44ea
Coverty 7449: Remove splurious check for 'sep == NULL'.
2006-03-18 11:02:48 +00:00
christos
22983123c5
Coverity CID 2341, 2342: Plug memory leak.
2006-03-18 09:46:35 +00:00
ginsbach
ccae083c7b
Fix Coverity CID 1248, negative return from read() passed() to write()
...
as a large unsigned value.
2006-03-18 03:40:51 +00:00
ginsbach
1a75882940
Fix Coverity issue 1236, negative return from read() passed to write()
...
as a large unsigned valued when read() is interrupted (errno == EINTR).
2006-03-17 21:52:41 +00:00
ginsbach
7ee29c7f81
Fix Coverity issue 1564, resource leak, dynamically allocated storage not
...
freed before function return.
2006-03-17 21:19:24 +00:00
elad
cbe6a15c01
Another overrun forgotten in previous commit, also found by Coverity.
...
CID 1481.
2006-03-17 20:44:28 +00:00
elad
ab24a02ffe
Fix buffer overrun found by Coverity, CID 1482.
2006-03-17 20:41:02 +00:00
christos
75f03570ec
Coverity CID 2719: argvalue can be NULL when passed into functions.
...
De-obfuscate by undefining optarg, and check explicitly for NULL before
use.
2006-03-17 15:39:44 +00:00
rumble
0fe2cb9e42
Ensure that malloc does not return NULL before copying the buffer.
2006-03-17 04:53:55 +00:00
elad
9e505fa94b
Fix two off-by-ones found by Coverity.
2006-03-17 01:55:31 +00:00
christos
d8a5b3caf5
warns=4
2006-03-16 23:25:17 +00:00
christos
f04bb5fddb
warns=4
2006-03-16 16:49:07 +00:00
dsl
5f31eae781
nJobs and jobTokensRunning are both counting the same thing.
...
Kill nJobs and just use the count of tokens in use.
Don't eat job tokens when we are ignoring errors.
2006-03-15 20:33:19 +00:00
dsl
f26d89e3d9
JOB_FIRST is always set (since we only execute the shell once for every
...
target). Nuke it.
2006-03-13 20:35:09 +00:00
dsl
b85c051fa8
Remove the 'never non-NULL' 'previous' argument to JobStart.
...
Looks like it was intended as a minor (and pointless) optimisation to
remove a free() malloc() pair.
Make he comment about the stoppedJobs list more correct.
2006-03-12 20:14:56 +00:00
dsl
a484dfd693
It isn't possibly to execute any part of job.c that references compatMake
...
when it is 'true'. So delete the unexecutable code.
2006-03-12 19:14:51 +00:00
dsl
c9b3912b1e
Remove most of the code seemed to be there to support 'remote jobs'.
...
It isn't clear that it ever worked, if it did it has almost certainly
bitrotted in the last 12 years. I'm not even sure all the required
components were present.
I suspect it was written to attempt to use a 'farm' of diskless sun3s.
In any case the apparant random assignment fo jobs to other systems doesn't
actually seem like a good idea!
Things like 'distcc' han be used to help slow systems run native builds.
Removing this code also simplifies make, and should let me speed up some of
its processing - without worrying about bitrotting it further.
2006-03-11 17:18:00 +00:00
christos
bc3a1c6523
PR/33054: Nicolas Joly: id(1) sometimes report a duplicate group when a user
...
is not specified. This is because it prints getgid() and getgroups(). If the
getgid() is in the getgroups() set, it was printed twice. This is now detected
and the duplicate printing is avoided.
2006-03-11 17:16:01 +00:00
wiz
904496fbc8
Markup fixes.
2006-03-11 12:02:20 +00:00
christos
5e6b1075e2
PR/33049: OKANO Takayoshi: Fix the spelling of NetBSD RCS tags.
2006-03-10 15:53:55 +00:00
dsl
5e60bf00ce
Avoid calling JobRestartJobs() from the SIGCONT signal handler, instead
...
push a byte through the (now badly named) exit_pipe and call JobRestartJobs()
from the main code path when poll() wakes up.
Part of a plan to remove JobSigLock() and the zillions of system calls
it does.
2006-03-08 22:11:48 +00:00
jnemeth
1a6a87b59b
PR/23616: Christian Biere: login might not back-off as expected
2006-03-08 03:09:04 +00:00
jnemeth
2e3c4f59d7
PR/23616: Christian Biere: login might not back-off as expected
2006-03-08 02:49:18 +00:00
hubertf
8c061da318
Xref pwhash(1),
...
pointed out by Stefan Schumacher at the Chemnitz Linuxdays
2006-03-07 01:52:09 +00:00
jnemeth
99089ba6f8
PR/30923: Zafer Aydogan: pam too verbose
...
Don't display a different message for root logins on insecure terminals.
Approved by christos@.
2006-03-06 23:06:18 +00:00
jnemeth
a2645cdaf4
PR/31059: Zafer Aydogan: login too verbose
...
Don't display a different message for root login on insecure terminal.
Approved by christos@.
2006-03-06 22:59:27 +00:00
christos
ef5477c67d
Add PT_SYSCALL
2006-03-05 17:03:19 +00:00
christos
ac2addb00e
PR/31144: YOMURA Masanori: pwhash -S/-b never use optarg
2006-03-05 08:50:58 +00:00
christos
57e9a1d730
PR/32978: Johan Veenhuizen: mail(1) creates record file with insecure umask
2006-03-03 15:07:00 +00:00
christos
463f84da0a
PR/32964: Johan Veenhuizen: implement the unalias command
2006-03-03 13:36:27 +00:00
ginsbach
62221c2759
Code indentation fix up.
2006-02-28 17:17:43 +00:00
apb
f34c12e989
Make ".WAIT" apply recursively to all children of nodes on the right
...
hand side of the .WAIT, except when the recursive interpretation would
cause a cycle in the dependency graph.
Discussed in tech-toolchain. Reviewed by christos, sjg.
2006-02-26 22:45:46 +00:00
wiz
3ea7f78b57
Fix typo.
2006-02-26 22:40:50 +00:00
sjg
701c9d99a7
Using ./bin in the test case, causes problems when 'make test' is
...
run from 'unit-tests' rather than the parent dir.
2006-02-26 22:20:55 +00:00
sjg
2bc18a45e6
Update man page and add test case for specifying modifiers via variable.
...
Also allow said variable to appear anywhere in the modifier list.
2006-02-26 21:43:00 +00:00
dyoung
dd269ac542
This patch removes one possible cause for a prolonged "out of disk"
...
condition on /tmp/: if creating the file list ($FILELIST) fails,
immediately exit with a non-zero result code. This fixes a bug
where, if the file list filled /tmp/, updatedb.sh would nevertheless
run for several minutes before it removed the file list as it quit.
2006-02-26 03:00:16 +00:00
simonb
bee087d4cc
libcompat isn't needed any more here.
2006-02-25 12:00:24 +00:00
wiz
5d1e8b2745
Fix some typos.
2006-02-25 02:28:55 +00:00
wiz
91c57604ae
Two improvements, from a diff from jmc@openbsd.
2006-02-25 01:19:22 +00:00
wiz
e60a6b4449
Wording, use more macros, xref grep(1). From jmc@openbsd.
2006-02-25 01:15:36 +00:00
wiz
5560f3fc8c
Sort options; from jmc@openbsd.
2006-02-25 01:13:55 +00:00
jld
e1c2c022ba
Fix typo ("program").
2006-02-23 20:57:03 +00:00
dsl
2acc3971af
Allow menu entry option names to be code fragments that (should) call
...
wprintw(menu->mw, ftm, args) to generate the menu label.
Allows static menu labels to contain the current value (like a lot of the
dynamic menus do).
Correct width calculations, and bound menu table lookup.
2006-02-20 21:06:40 +00:00
jschauma
a32f19d465
Add a new primary '-exit n':
...
This primary causes find to stop traversing the filesystem and
exit immediately if a previous condition was met. If no value is
specified, the exit value will be 0, else n. Note that other
primaries will be evaluated and acted upon before exiting.
Ok matt@, garbled@.
2006-02-20 16:31:02 +00:00
christos
63780e0b44
Propagate change from login.c where if getpeername succeeded, then we have
...
the sockaddr from the remote peer.
2006-02-20 05:05:16 +00:00
christos
539c95af37
PR/32873: Johan Veenhuizen: login(1) does not initialize lastlogx struct
...
properly
2006-02-19 00:48:34 +00:00
christos
e551462e89
PR/32870: Johan Veenhuizen: login(1) does not obey .hushlogin
2006-02-19 00:12:36 +00:00