Commit Graph

8056 Commits

Author SHA1 Message Date
xtraeme 5ca972d91b This needs <err.h> for err() and errx() (hi wiz) 2005-03-30 18:01:32 +00:00
wiz bd02b4a3e5 v1.14 from OpenBSD (jaredy):
- fix overflow when too many -a arguments are given
 - properly NUL-terminate -a arguments when copying
 - check strdup for error failure
2005-03-30 14:18:41 +00:00
christos 13f609d284 - use getpwnam_r
- KNF
2005-03-30 01:30:21 +00:00
christos bbb7e01ae0 - Use the getpw*_r methods.
- KNF.
2005-03-30 01:16:22 +00:00
jmmv f9774bdb30 Add a colon before %m in calls to syslog(3) for consistency with other
messages in this same file and in many other tools.
2005-03-29 17:00:21 +00:00
drochner 6ff7079afd plug buffer overflows, see
http://www.idefense.com/application/poi/display?id=220&type=vulnerabilities
http://www.idefense.com/application/poi/display?id=221&type=vulnerabilities
(CAN 2005-0468 and 2005-0469)

Patch taken from MIT/Kerberos (MITKRB5-SA-2005-001-telnet.txt)
2005-03-29 12:18:28 +00:00
christos 1d7be8c539 WARNS=3, ansi, knf 2005-03-28 23:33:22 +00:00
christos 3e8931ae19 PR/29819: Robert Elz: lastcomm mangles elapsed time calculation because
of incorrect rounding.
2005-03-28 22:10:06 +00:00
peter 272712e0e4 Sort options alphabetically. 2005-03-27 18:41:22 +00:00
christos 375c0a113d der_chop is gone. 2005-03-26 00:32:35 +00:00
wiz de60b309dc Sort options. Add -C to usage. 2005-03-25 23:55:02 +00:00
wiz eb0439126c Fix typo and drop trailing whitespace. 2005-03-25 23:49:28 +00:00
skd 4f9669ed8d add --dry-run like gnu patch. 2005-03-25 23:00:55 +00:00
christos 9b98663df7 add prime.c 2005-03-25 22:36:54 +00:00
christos 93bf0b6883 Deal with signals and process groups (from FreeBSD)
Fixes issues with kill -STOP $$ in the su'd shell, and setting up signals
for the child process properly.
2005-03-23 20:02:28 +00:00
dsl a2a01de947 Remember to consume input bytes when processing '\0nnn' for %b formats 2005-03-22 23:55:46 +00:00
yamt 656cf52a10 a fix from openbsd.
XXX is it better to output a newline?

> revision 1.7
> date: 2000/06/04 23:52:19;  author: aaron;  state: Exp;  lines: +30 -14
> Handle the case where the last line of input does not contain a newline; issue
> reported by marc@snafu.org. The main thing here is we use fgetln() instead of
> fgets(), also giving us the advantage of being able to handle lines of
> unlimited length. Some -Wall and other fixes from millert@ as well.
2005-03-22 21:56:28 +00:00
peter c36f9da926 Fix a typo. 2005-03-22 15:51:35 +00:00
tron f4d67200a3 Make S/Key prompt compliant with RFC 2289. Patch supplied by Dave Huang
in PR bin/23167.
2005-03-20 13:20:07 +00:00
wiz 7cd222b164 Bump date for -i. 2005-03-16 15:05:25 +00:00
sketch 8e587b4ca1 Add a -i option to ignore case in the process match. 2005-03-16 08:52:20 +00:00
christos 8f166961b9 Remove extra ; found by gcc-2.95 and reported in port-vax. 2005-03-14 13:34:57 +00:00
kim 077ff6605b One third of screen looks much better than half, for default maxhost. 2005-03-13 04:08:16 +00:00
reed be2370c0aa Sorted two entries that were out of order.
And used spaces (instead of tab) for one entry to be consistent with rest
of file.
2005-03-12 15:13:54 +00:00
reed e991dffff3 Add that NetBSD 2.0 was released on December 09, 2004 2005-03-12 15:07:56 +00:00
wiz 2c2533b641 Bump date for new -4, -6. 2005-03-11 13:14:34 +00:00
ginsbach 733e4b48e2 Add -4 and -6 to usage. 2005-03-11 03:20:23 +00:00
ginsbach d9a614deae Support -4 and -6. Approved by christos. 2005-03-11 03:19:31 +00:00
ginsbach 605994654d Support -4 and -6. Approved by christos. 2005-03-11 02:45:24 +00:00
wiz 416aba1dc6 Bump date for -t. 2005-03-10 16:29:04 +00:00
wiz 96b620b365 Add -t to usage. 2005-03-10 16:28:54 +00:00
he 5f8555bc7c Add a '-t' option to print the contents of the vmtotal structure,
possibly repeatedly.
2005-03-10 16:23:42 +00:00
atatat 1a773e1da4 Fix printing of AF_LOCAL names. 2005-03-10 05:39:54 +00:00
kleink fcbd09f9f1 Field width and precision specifier arguments to printf must be ints. 2005-03-09 19:09:05 +00:00
wiz 73eb81183c Make Dd date match import date more closely. 2005-03-09 17:16:54 +00:00
wiz 0f7047cb0b Grammar improvements. 2005-03-09 17:16:30 +00:00
atatat 900e40a9ae almost forgot about this.
Optimize getting process information by not getting it again if you're
looking for the same pid.
2005-03-09 05:53:47 +00:00
atatat 724bd01950 Add a sockstat(1) command that can list open sockets and the processes
that own them.  The implementation concept and man page came largely
from FreeBSD, but the program is fresh.
2005-03-09 05:20:05 +00:00
christos 192c2eccf6 Add -lcrypt where -lcrypto is specified. 2005-03-09 03:11:22 +00:00
christos 1c7109cbce - ansi
- better error detection
- avoid overflow
- WARNS=3
2005-03-09 02:02:07 +00:00
dsl 48a0480288 Initialise dfound outside loop so that 0 sized files compare correctly
and to that 'cmp -l' will exit with error is the last block matches.
Pointed out in a private mail bt someone who wishes to remain anonymous.
2005-03-07 07:51:42 +00:00
christos cbc2d45618 If we cannot retrieve lines from a recovery file, don't call ourselves
recursively until we run out of stack.
2005-03-06 03:39:49 +00:00
christos bf6d5c8643 A corrupt recovery file can have vs_scmap NULL now, since paint may return
early. Compensate.
2005-03-06 03:39:07 +00:00
wiz 35a9dd4fdd Remove trailing whitespace, and use .Sq instead of manual quoting. 2005-03-05 14:28:31 +00:00
he 5152518685 Add -lcrypt to link lines for applications using -lkrb5, so that they
link successfully when MKPIC=no, as is always the case for our ports
which do not support shared libraries.

Discussed with thorpej and christos.
2005-03-04 20:44:55 +00:00
he 8e8728c45c Introduce PAM_STATIC_LDADD and PAM_STATIC_DPADD. When compiling
with MKPIC=no, possibly because the target does not support shared
libraries, these include libraries required to resolve all symbols
which end up referenced from PAM-using applications.  The libraries
presently required are -lcrypt, -lrpcsvc and -lutil.

Add use of these variables which are currently set up to use PAM,
so that they compile when MKPIC=no.

Also, in the telnetd case, reorder the order of the libraries, so
that libtelnet.a comes before -ltermcap and -lutil, again to fix
link error when MKPIC=no.

Discussed with thorpej and christos.
2005-03-04 20:41:08 +00:00
christos 5c543845da PR/26934: Curt Sampson: Add -x flag to process wtmpx files that don't end
in `x'.
2005-03-04 17:16:13 +00:00
christos add06817f7 PR/23409: Geoff C. Wing: make sure we only print nul terminated strings. 2005-03-04 17:11:19 +00:00
atatat e698a148f7 For connected local domain sockets that don't have a "local" name,
print the "remote" name instead.
2005-03-04 03:59:07 +00:00
atatat 9244b3d60d Print the pcb address like the man page says, not the socket address. 2005-03-04 03:57:48 +00:00
christos 3f0344e8e8 1. Restore missing tty action.
2. Pass the nested user name to pam.
3. always try to fill in sockaddr.
2005-03-03 02:06:16 +00:00
abs 24cba1ac9a If a user or group is not known, report the problem user/group, rather than
the first user/group. Caused huge fun in error messages from large script.
Old:	pgrep -u root,NoSuchUser,daemon	-> pgrep: unknown user `root'
Now:	pgrep -u root,NoSuchUser,daemon	-> pgrep: unknown user `NoSuchUser'
2005-03-02 15:31:44 +00:00
christos 13481917e0 When parsing conditional tokens, make sure that the token is followed by
a non-alpha character, so that .elsefoo is not parsed as .else leading
to confusion later.
2005-03-01 04:34:55 +00:00
christos 10cd3dcdb4 - use F_CLOSEM instead of walking the fd list
- determine pty name properly for ptyfs ptys
- use setproctitle(NULL) to kill our args
2005-02-28 16:13:02 +00:00
christos 70a8501f05 - deal with ptyfs pty names.
- put back chown pty code.
- use setproctitle(NULL) to kill our argument display.
- don't wait for any pid, just the one we forked.
2005-02-28 16:11:36 +00:00
wiz a5924c4e9e YP password -> NIS password. Ok'd by thorpej. 2005-02-28 15:19:59 +00:00
wiz 8168d38f56 Remove COPTS+=-g. 2005-02-28 10:37:49 +00:00
wiz b34e537add infomration -> information. 2005-02-28 10:37:34 +00:00
christos c1fe2057f5 Fix unmatched .El warning. 2005-02-28 02:30:54 +00:00
thorpej feee050f0e user -> principal in the krb5 synopsis. 2005-02-28 02:02:43 +00:00
thorpej c80d0a6dc7 Fix a typo, and sort SEE ALSO correctly. 2005-02-28 02:01:35 +00:00
dsl f62ff76f8b Add an extra digit to the kBps column - now overflows at 100MB/s 2005-02-26 22:28:23 +00:00
dsl 019733f61e WARNS=3 2005-02-26 22:12:33 +00:00
dsl ff927e7098 Fix field widths for 'numbers' display, and allow it without 'secs'. 2005-02-26 22:11:06 +00:00
dsl 2229b6a79b WARNS=3 2005-02-26 21:19:18 +00:00
dsl 5af2964703 Always treat ^h and ^? as erase chars (as well as stty erase).
Make the ':' erasable.
Fix typo in unviewable help message.
No point in having 'else' after 'return'...
2005-02-26 19:01:09 +00:00
dsl 4583d5361a Refresh labels and display after changing displayed disks 2005-02-26 18:58:45 +00:00
wiz c3b040d5f4 Sort SEE ALSO. 2005-02-26 16:22:27 +00:00
wiz 4cc6eaf04c Sort SEE ALSO, remove superfluous quotes. 2005-02-26 16:21:44 +00:00
thorpej 63f6912b86 YP -> NIS 2005-02-26 16:21:26 +00:00
wiz b14dfa00d2 Sort SEE ALSO. 2005-02-26 16:20:36 +00:00
thorpej 1059994aca YP -> NIS 2005-02-26 16:19:55 +00:00
thorpej 6136ecaa8e YP -> NIS 2005-02-26 16:18:19 +00:00
thorpej 4e63fd43ef Magor rework of passwd(1) for the PAM case. Add "-d <database>" option,
similar to Solaris's "-r <repository" or Mac OS X's "-i <infosystem>",
to select the password database (files, nis, krb5).  Otherwise, we default
to using whatever PAM decides.
2005-02-26 07:19:25 +00:00
christos dc9dbb2ac7 Don't wait for any process, just our child. pam sessions can fork other
processes (such as the ssh pam agent handler) and the wrong process ends
up reaped, wreaking havoc.
2005-02-25 21:49:43 +00:00
thorpej 8c9dd4bba7 Add missing RCS ID. 2005-02-24 05:11:34 +00:00
dsl 8d3b64e3cb Exit with any failure code from the cmd or gzip.
Decode gzip -l output with strtoimax() (not sscanf()) so we don't use an
uninitialised variable if the output format isn't what we expect.
This might fix some installation PRs (no error being reported)
2005-02-23 22:32:31 +00:00
sjg 34180b9ccc In the case of :? modifier, variable can be an expression - say so. 2005-02-23 17:22:29 +00:00
yamt 751e975bfc handle partial reads. PR/29484. 2005-02-22 21:45:44 +00:00
christos b74b94a591 PR/29505: Nicolas Joly: Increase width of csw value in systat vmstat. 2005-02-22 15:13:57 +00:00
wiz 823387f1c8 Drop some whitespace
XXX: -p not described.
2005-02-22 01:49:20 +00:00
christos 11e49612c8 Add a PAM passwd module.
XXX: This avoids the issue of supporting separate -l -y -k, but is the behavior
correct? Should passwd -p disable all other passwd methods? Should it become
the default if compiled in?
2005-02-22 01:08:43 +00:00
simonb b6dcc6d5d8 Print a nice introductory line, per SUSv3 (and Posix?) 2005-02-21 04:32:55 +00:00
wiz 0d1974308b Sort SEE ALSO (hi hubert! First by section, then by name.) 2005-02-20 21:18:27 +00:00
wiz 320e63ae50 Drop trailing whitespace. 2005-02-20 21:16:38 +00:00
wiz aa3d6fa3ca If we mark up RFC, then avoid using "command modifier" for it. 2005-02-20 20:54:01 +00:00
christos 66e1a2c606 Make this compile if pam is present. XXX: this sucks, because we don't
really use PAM here, but libtelnet needs it.
2005-02-19 23:28:41 +00:00
matt f19d600803 Don't include the powerpc64 definitions in here. Since lint is a host
tool, the hosts definition of _LP64 will confuse things.
2005-02-19 17:15:56 +00:00
xtraeme ef1154956f Kill __P(), use ANSI function declarations; WARNS=3. 2005-02-17 17:41:34 +00:00
xtraeme 6dca62f25b Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-17 17:35:47 +00:00
xtraeme ee89c9ff79 Kill __P(), use ANSI function declarations. 2005-02-17 17:31:28 +00:00
xtraeme 1db2ef90e1 Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-17 17:29:58 +00:00
xtraeme abda23981e Kill __P(), use ANSI function declarations, constify; WARNS=3. 2005-02-17 17:17:25 +00:00
xtraeme 6dd2a8ed92 Kill __P(), use ANSI function declarations; WARNS=3. 2005-02-17 17:12:42 +00:00
xtraeme 971b39df9c Kill __P(), use ANSI function declarations. 2005-02-17 16:53:45 +00:00
christos 63fca13660 PR/29203, PR/29204: Max Okumoto: KNF changes to make [no functional changes] 2005-02-16 15:11:52 +00:00
hubertf 756c7041c0 Add "df" display to give information about filesystems, available diskspace
and used disk capacity, similar to df(1):

Filesystem        Avail   Capacity
                         /0%  /10% /20% /30% /40% /50% /60% /70% /80% /90% /100%
/                  359M |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
/tmp               180M |
/home              146G |XXXXXXXXXXXXXXXX
2005-02-16 03:45:41 +00:00
christos 0f037c7626 - Add depency ob ligssapi and the required c-file(s).
- Reorder libkafs so its possible to build w/o kerberos4
From Love.
2005-02-13 22:48:01 +00:00
christos 1b9aa59ad8 Add depency on libgssapi and add the required c-file(s)
From Love.
2005-02-13 22:44:07 +00:00
christos d578cd9dc7 Add a couple of HAVE_'s 2005-02-13 19:15:43 +00:00