Commit Graph

3864 Commits

Author SHA1 Message Date
Will Andrews
2de6a43d0a Fix nasty bug where make(1) assumed that you could read the directory it
was in.  This shall be MFC'd in about three days (probably not a good idea
to MFC the stylistic changes though - see below).

PR:		19978
Submitted by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Patch by:	roam (slightly modified by me to use NULL not NIL)
2001-02-10 07:12:18 +00:00
Andrey A. Chernov
dc7d8c99d0 Localize it (LC_NUMERIC) 2001-02-10 06:49:53 +00:00
Jacques Vidrine
17ada68462 Fix login so that it exports environmental variables that are set by PAM
modules (via pam_putenv).  The following variables will never be set in
this fashion:

   SHELL, HOME, LOGNAME, MAIL, CDPATH, IFS, PATH
   any variable starting with `LD_'
2001-02-09 13:21:50 +00:00
Mike Heffner
8ecfa0142f Fix style(9) bugs from previous commit: remove space after function
names and revert to char *[].

bde by:	bde, imp
2001-02-08 20:15:59 +00:00
Alexey Zelkin
75c84bca41 Optimize gencat(1) sources in same manner as its libc part some time ago:
. remove SYSV compatibility bits
. sort #include's
. ifdef unused code
. cleanup BDECFLAGS warnings
. fixed few typos in diagnostics messages
. style(9) fixes

as part of this cleanup I have changed all K&R declarations to ANSI style.
Main reason for doing that was great mix of declarations used here - clean
ASNI , clean K&R, ifdef'ed (both).

Reviewed by:	ache (mostly)
2001-02-08 16:38:16 +00:00
David E. O'Brien
b7b2701f13 Remove the manpage since the actual software was put in the Attic.
Noticed by:	bde
2001-02-08 09:30:21 +00:00
Mike Heffner
7a536c3b41 De-__P()-ify, convert K&R style declarations to ANSI ones 2001-02-08 05:58:55 +00:00
Mike Heffner
aeacf525ad Prevent string overflows by using safer string functions
Use tolower() rather than bit or-ing
Sanity check user specified printf() format
Exit when too many input files are given
Remove register from variables

Reviewed by:	markm, imp
2001-02-08 05:33:19 +00:00
Ruslan Ermilov
46eea498da mdoc(7) police: Change -filled displays (which just happen
to be the same as -ragged in the current implementation) to
-ragged.  With mdocNG, -filled displays produce the correct
output, formatted and justified to both margins.
2001-02-07 13:45:30 +00:00
Philippe Charnier
4c86f3ad84 Spelling
Remove unused #includes
2001-02-06 20:13:48 +00:00
Philippe Charnier
39e21a1b64 Remove duplicate FreeBSD Id
Remoce unused #include
Use imperative mode to start flag description
2001-02-06 20:03:48 +00:00
Philippe Charnier
3a87eff1cf Rework diagnostics text
Remove unused #include
2001-02-06 20:01:40 +00:00
Ruslan Ermilov
c7368f9305 mdoc(7) police: simplify construct. 2001-02-06 16:20:31 +00:00
Jeroen Ruigrok van der Werven
2fa72ea7d4 Fix typo: compatability -> compatibility.
Compatability is not an existing english word.
2001-02-06 12:05:58 +00:00
Jeroen Ruigrok van der Werven
1a6e52d0e9 Fix typo: seperate -> separate.
Seperate does not exist in the english language.
2001-02-06 11:21:58 +00:00
Jeroen Ruigrok van der Werven
efe5a08e09 Fix typo: seperate -> separate.
Seperate does not exist in the english language.

Also add $FreeBSD$ to README.
2001-02-06 11:21:40 +00:00
Poul-Henning Kamp
6817526d14 Convert if_multiaddrs from LIST to TAILQ so that it can be traversed
backwards in the three drivers which want to do that.

Reviewed by:    mikeh
2001-02-06 10:12:15 +00:00
Jeroen Ruigrok van der Werven
f09deb6962 Fix typo: wierd -> weird.
There is no such thing as wierd in the english language.
2001-02-06 09:25:10 +00:00
Jeroen Ruigrok van der Werven
67034ac6ad Fix tftpd and tftp to support file transfers of over 65535 blocks
(about 31 MB - 32 MB).

Submitted (partially)
	by: Pascal Hofstee <daeron@wit401305.student.utwente.nl>
2001-02-02 10:53:02 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Will Andrews
99557a7988 De-__P()-ify
Reviewed by:	markm
2001-01-28 00:35:40 +00:00
Will Andrews
d8a3fbd50d BDECFLAGS: constify; use proper types. Add $FreeBSD$, clean up #ifndef lint.
Reviewed by:	markm
2001-01-28 00:34:29 +00:00
Alexey Zelkin
8b32114bd4 Fix typo 2001-01-25 13:13:55 +00:00
Alexey Zelkin
e85c02aad1 Slightly re-word sentence to allow using .Nm macro without parameter 2001-01-25 12:11:23 +00:00
Alexey Zelkin
020a8e3a9b Slightly re-word sentence to allow using .Nm macro without parameter
Use .St macro instead of hardcoding standard name
2001-01-25 12:10:57 +00:00
Will Andrews
34bc43d532 Fix bogus checking of snprintf() by decreasing the remaining size of the
string after each successful snprintf() call.  This makes apply(1) work
*correctly*, although the whole snprintf() deal really should be redone.

Bug noted by:	nectar (about 3 weeks ago)
2001-01-25 03:40:17 +00:00
John Baldwin
f5ace77533 Catch up to proc flag changes. 2001-01-24 14:28:24 +00:00
John Baldwin
0821b7ca3a Catch up to proc flag change. 2001-01-24 14:17:23 +00:00
John Baldwin
ad7b044802 Catch up to new proc flags. 2001-01-24 14:03:34 +00:00
Ruslan Ermilov
1715c485d4 Mention the -F in the usage().
PR:		24586
Submitted by:	Cyrille Lefevre <clefevre@citeweb.net>
2001-01-24 08:27:59 +00:00
Jacques Vidrine
8ad2668439 Call pam_setcred.
Reviewed by:	markm, months ago
2001-01-23 21:43:32 +00:00
Hajimu UMEMOTO
5d22597f3a Add mibs to hold the number of forks since boot. New mibs are:
vm.stats.vm.v_forks
	vm.stats.vm.v_vforks
	vm.stats.vm.v_rforks
	vm.stats.vm.v_kthreads
	vm.stats.vm.v_forkpages
	vm.stats.vm.v_vforkpages
	vm.stats.vm.v_rforkpages
	vm.stats.vm.v_kthreadpages

Submitted by:	Paul Herman <pherman@frenchfries.net>
Reviewed by:	alfred
2001-01-23 14:32:01 +00:00
Peter Wemm
ed1a4621a2 Add the -empty flag, from OpenBSD. It returns true if the directory
is empty.  There doesn't appear to be another easy way to do this.

mobile# mkdir foo
mobile# mkdir foo/bar
mobile# mkdir bar
mobile# find . -empty
./foo/bar
./bar
2001-01-23 11:16:50 +00:00
Dag-Erling Smørgrav
0b5c9ae2f3 Document that the -z option is equivalent to 'sysctl vm.zone'. 2001-01-23 00:37:54 +00:00
Dag-Erling Smørgrav
bec62dd817 Use the vm.zone sysctl rather that grope through the zone allocator's
internal data structures.
2001-01-23 00:31:56 +00:00
Matt Jacob
97ace1c6ac Update vm zone list traversal for changes made to kernel. Note that this
is ultimately silly because no locks are held in user space while traversing
the list via kvm_reads... really, this should use the sysctl interface
which *is* protected by a lock in the kernel.
2001-01-23 00:09:30 +00:00
Will Andrews
cdc8ffbbac Fix numerous style(9) bugs: Put #define's before declarations; sort the
declarations & their arguments; use only one tab after types; restore the
type of argv to sync with src tree style; sort new variables under main();
fix continuation indents; remove extra blank line before free()'s.  Still
to do: fix snprintf() handling as nectar & bde suggested to me.

Submitted by:	bde
2001-01-21 08:37:35 +00:00
Will Andrews
e3cb529472 Fix style(9) bug; use ISDOT[DOT,]() macro available in util.c by moving
it to make.h so both dir.c and util.c can use it, although bde didn't
particularly like this part of the idea, IMO it's cleaner than it was.

Submitted by:	bde
2001-01-21 08:24:41 +00:00
Matt Jacob
c310386321 Print out resid portion of MTIOCGET returned data. 2001-01-21 01:33:31 +00:00
Andrey A. Chernov
4eb83b01b8 Fix typo: -c -> -t 2001-01-21 01:07:26 +00:00
Andrey A. Chernov
6e1dea0642 Make "killall -t p0" really works.
Old code works only if at least one process name additionly specified.
2001-01-21 01:03:31 +00:00
Chris D. Faulhaber
8728c621a0 Check strdup() return values
Reviewed by:	kris
2001-01-20 00:26:32 +00:00
Ben Smithurst
892fc9c643 Minor grammar nit.
PR:		23742
Submitted by:	Rich Morin <rdm@cfcl.com>
2001-01-16 22:41:25 +00:00
Ruslan Ermilov
734e1e3b2e man(7) -> mdoc(7). 2001-01-16 17:04:17 +00:00
Ruslan Ermilov
9884911506 mdoc(7) police: fixed broken references. 2001-01-16 11:52:00 +00:00
David Malone
43cb2008e4 Correct spelling of millennium.
PR:		24369
Submitted by:	Tony Finch <dot@dotat.at>
2001-01-16 10:07:04 +00:00
Ruslan Ermilov
1bfea903ed Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
Ruslan Ermilov
536e683425 mdoc(7) police: fix the weird construct. 2001-01-15 16:49:28 +00:00
David Malone
9f4af3be75 The patch for the new calendar contained spaces instead of tabs.
I only noticed when I went to check that it worked OK in RELENG_3.
2001-01-15 10:18:24 +00:00
Andrey A. Chernov
d973f232c9 /usr/libexec/cpp -> /usr/bin/cpp
because of new rename to /usr/libexec/cpp0
2001-01-13 01:33:59 +00:00
David E. O'Brien
f29126734d Have rpcgen actually tell us what cpp it is looking for (as it would if we
were SVR%).
2001-01-10 19:12:47 +00:00
David E. O'Brien
89ea5c2a49 Use /usr/bin/cpp as on NetBSD, not /usr/libexec/cpp. 2001-01-09 17:14:04 +00:00
Wolfram Schneider
47ecee5e83 Off by one error in reading mmap data.
Submitted by: Martin Kraemer <Martin.Kraemer@Fujitsu-Siemens.com>
2001-01-06 18:17:06 +00:00
Will Andrews
f697348034 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
2001-01-05 18:15:17 +00:00
Will Andrews
9861e6df73 Back out last commit; it had string function mistakes. I will fix this
and make sure it works next time.

Submitted by:	markm, jhb
2001-01-04 20:11:09 +00:00
Will Andrews
fbd7649d29 Document new -s option: pass a shell to apply(1) when the desired shell
isn't found in /etc/shells.
2001-01-04 19:28:34 +00:00
Will Andrews
c494ed80cd BDECFLAGS; de-__P()-ify, ANSIfy, use snprintf() instead of sprintf(),
especially on strings passed from argv; rename system() to exec_shell(),
and make it static; use strlcpy() and make sure it works; use proper
type (size_t) to be passed to malloc()/realloc().

Use getusershell() to make sure the SHELL environment variable passed is
safe to use.  Add new option -s to allow anal users to pass things like
perl; this option is here along with getusershell() checking since the
such checking is only intended to affect things like suidperl that might
call apply(1).

Reviewed by:	markm, jhb, C. Stephen Gunn <csg@waterspout.com>
2001-01-04 19:05:49 +00:00
David Malone
2aeaf4a3fd Update for 2001.
PR:		23456
Submitted by:	jgrosch@mooseriver.com
2001-01-04 11:20:25 +00:00
Dag-Erling Smørgrav
a6115eb2f8 .publickey -> .pubkey to match other finger daemons.
Suggested by:	assar
2001-01-04 10:03:44 +00:00
David Malone
db3626fb72 Use a slightly better documented way of calculating easter and
include a reference to the Calendar FAQ. Also make argument parsing
a little more robust.

PR:		23881
2001-01-02 11:35:57 +00:00
Matt Jacob
23dc42d12f Oops, I'm such an idiot. For reasons I don't really agree with,
all devices are by default known by their 'cooked' name, so
my change was wrong. I thought it was a hangover from old 'block
tape device' support which hasn't worked (if it ever did) since
v6/PWB.

So, the default tape name is now the same as Linux. Far out, man....
2000-12-31 20:29:56 +00:00
Matt Jacob
95cb096e65 The default is /dev/nrsa0 (now), not /dev/nsa0. 2000-12-31 08:17:58 +00:00
Poul-Henning Kamp
1009e5708d My bad, committed the submitted patch rather than the fixed patch. 2000-12-30 21:56:18 +00:00
Poul-Henning Kamp
4d51ef6343 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	phk
2000-12-30 21:22:54 +00:00
Poul-Henning Kamp
539d2b38e2 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	phk
2000-12-30 21:17:03 +00:00
Poul-Henning Kamp
baba280c68 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 21:02:25 +00:00
Dag-Erling Smørgrav
d17485b639 Add support for a .publickey file.
Submitted by:	Svein Skogen <tds@nsn.no>
Reviewed by:	brian, ru
2000-12-29 11:39:25 +00:00
Poul-Henning Kamp
4ea7b32b35 Used macro-API to <sys/queue.h>.
Submitted by:	ben
2000-12-29 09:27:57 +00:00
Ruslan Ermilov
f4ddfb3865 Prepare for mdoc(7)NG. 2000-12-27 16:52:31 +00:00
Will Andrews
111632fd99 Fix for the case where the first two entries returned by readdir() are
actually NOT '.' and '..'.  Apparently this isn't the case when accessing
a directory via XFS over NFS on SGI systems.  Since I don't have access to
an environment like that, this will sit out in -current for at least six
weeks.  However, the patch proposed by the submitter seems acceptable, so
I've decided to commit it to the tree, in the hope that it will solve some
problems without bringing up others.

PR:		23300
Submitted by:	Jim Pirzyk <Jim.Pirzyk@disney.com>
2000-12-26 07:36:07 +00:00
Paul Saab
88522a2e3a Use the real user ID so non-root users can kill setuid processes
they started.

PR:		23356
Submitted by:	Maxim Konovalov <maxim@macomnet.ru>
2000-12-25 19:26:07 +00:00
David E. O'Brien
175f26d6ed Don't abuse the SCCS `@(#)' for RCS.
Requested by:	bde
2000-12-25 01:16:12 +00:00
David Malone
294a60d836 As far as I can tell, you have never been able to use 'ab' as a unit
name if 'a' and 'b' are unit names. You can use 'a b' though.
2000-12-24 16:15:28 +00:00
Dag-Erling Smørgrav
89a70fbeb3 Warn if the size of the remote file isn't known.
If the -R option was specified, don't truncate the local file even if its
mtime is incorrect.

PR:		bin/23719
2000-12-22 18:23:19 +00:00
Brian Somers
3b93c7437b Hostnames are case-insensitive 2000-12-22 15:21:06 +00:00
Ben Smithurst
3c6e4a5c16 Fix printf(1) for cases where a long string with no format specifiers is
followed by a %d (probably others too) format specifier.

Reviewed by:	audit
2000-12-21 22:21:38 +00:00
Brian Somers
3bebe99135 If the utmp login time is greater than the tty atime, use it to calculate
the idle time instead of the atime.

This makes entries for people that have logged in but done nothing
else show up correctly.

Reviewed by: markk@knigma.org
2000-12-21 01:30:47 +00:00
Ruslan Ermilov
9b88faecd3 Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
Ruslan Ermilov
c4646e2d76 mdoc(7) police: document IPv6 options in the SYNOPSIS. 2000-12-18 08:37:53 +00:00
Robert Watson
48c193e183 o Fix up includes which built due to excessive nested including in the
base system, but not in BruceBSD.
o Fix up style violations of various sorts.
o Remove redundant normalization of hertz variable, as the sysctl handler
  does this work (unlike when kread was used).

Submitted by:	bde
2000-12-17 18:43:28 +00:00
Hajimu UMEMOTO
0b5f90af27 IPv6 support for logger.
Reviewed by:	freebsd-current
2000-12-16 18:33:08 +00:00
Dag-Erling Smørgrav
65f74359cb Fix a bug introduced in rev. 1.17: initialize variables before use, not after.
Rev. 1.17 was "Obtained from NetBSD", but is significantly different from the
equivalent NetBSD revision (rev. 1.30), which does not have this bug.
2000-12-16 02:14:37 +00:00
Andrey A. Chernov
e6f0df2b20 Fix lseek args order (PR 23549)
Catch and report lseek errors too
While reading header don't attempt to continue reading
if some IO operation fails

PR:		23549
2000-12-15 13:20:43 +00:00
Alexey Zelkin
d2e8567ab3 Fix typo reported by Rich Morin <rdm@cfcl.com> on -doc mailing list.
Correct .Xr macro usage.
Also fix few more typos while I'm here.
2000-12-14 16:27:11 +00:00
Ruslan Ermilov
88544700ca mdoc(7) police: added missing .Os call. 2000-12-14 13:58:15 +00:00
Ruslan Ermilov
ed40311694 mdoc(7) police: removed history info from the .Os FreeBSD call. 2000-12-14 11:52:05 +00:00
Ruslan Ermilov
886539482d mdoc(7) police: removed history info from the .Os call. 2000-12-14 11:40:41 +00:00
Dag-Erling Smørgrav
64638f67a7 If the URL did not specify a scheme, try to guess it from the host name. 2000-12-13 11:26:27 +00:00
John Baldwin
93480bce7c Catch up to the new kinfo_proc. 2000-12-12 23:31:44 +00:00
Ruslan Ermilov
65d9e0e006 Remove hard-sentence breaks, canonify .Dd (no leading zero). 2000-12-12 14:46:55 +00:00
Ruslan Ermilov
52e5cddf31 Document what Idle=* means in a short format display. 2000-12-12 13:37:34 +00:00
Kirk McKusick
1f7d250182 Change the proc information returned from the kernel so that it
no longer contains kernel specific data structures, but rather
only scalar values and structures that are already part of the
kernel/user interface, specifically rusage and rtprio. It no
longer contains proc, session, pcred, ucred, procsig, vmspace,
pstats, mtx, sigiolst, klist, callout, pasleep, or mdproc. If
any of these changed in size, ps, w, fstat, gcore, systat, and
top would all stop working. The new structure has over 200 bytes
of unassigned space for future values to be added, yet is nearly
100 bytes smaller per entry than the structure that it replaced.
2000-12-12 07:25:57 +00:00
Alexey Zelkin
2f3408b204 Re-add home born file(1) and magic(5) manual pages. Update them to
current file(1) version (3.33)

Approved by:	obrien
2000-12-11 15:50:04 +00:00
Ruslan Ermilov
d7b336c076 mdoc(7) police: use canonical form of .Dd macro. 2000-12-11 15:47:53 +00:00
Philippe Charnier
3e7626264d Add rcsid. Remove unused #include. Remove error() definition and replace
with warn().
2000-12-10 20:54:13 +00:00
Philippe Charnier
10c959cad5 Remove one more incorrect section name. Typos.
Add rcsid. fprintf -> warn.
2000-12-10 20:52:43 +00:00
David E. O'Brien
9c8efe99eb Add history. 2000-12-10 01:10:54 +00:00
David E. O'Brien
1261f234e0 The options I added where not formated to new manpage style specs. 2000-12-09 19:03:21 +00:00
David E. O'Brien
9e50dd7726 Add or fix FreeBSD IDs. 2000-12-09 09:52:52 +00:00
David E. O'Brien
a5e1cac0f5 "Implement -[n]fcb (formatting of block comments) and attempt to implement
no-space=after-sizeof (not optional) and no-space-after 'struct foo *'
(not optional).  Without these, indent unKNFizes even more perfectly KNF code."

Submitted by:	bde
2000-12-09 09:45:09 +00:00
David E. O'Brien
1a37aa566b Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
David E. O'Brien
a3cea3dde5 Retire this ancient version of rdist. 2000-12-07 19:24:55 +00:00
David E. O'Brien
a8e642f574 Change the spelling of .' to .' from .OBJDIR since `.' really is where
generated files land.  Also give precedence to generated files.
2000-12-05 22:10:43 +00:00
Alfred Perlstein
7a8671e9b7 remove struct mount from useland visibility 2000-12-04 09:21:05 +00:00
Jeroen Ruigrok van der Werven
48a1ef2284 Remove register keyword usage with prejudice.
Modern compilers are smarter when it comes to allocating register
usage.
2000-12-03 17:05:45 +00:00
Will Andrews
1a1a8c9324 There's also no point in #typedef'ing void/char pointers. Accordingly,
rip out ClientData/Address pointers and use standard types.

Obtained from:	OpenBSD
2000-12-02 20:24:42 +00:00
Jeroen Ruigrok van der Werven
beed3992fc Use a size_t instead of an int. 2000-12-02 20:21:13 +00:00
Andrew Gallatin
19f085228f Correct int/long type mismatch in the proper place this time. freevnodes
and numvnodes are longs in the kernel.  They should remain longs in systat,
what really needs to change is that they should be using SYSCTL_LONG rather
than SYSCTL_INT.   I also changed wantfreevnodes to SYSCTL_LONG because I
happened to notice it.

I wish there was a way to find all of these automatically..

Pointed out by: bde
2000-12-02 20:08:33 +00:00
Jeroen Ruigrok van der Werven
247e7cb1d3 Properly constify some static arrays.
Also #if out some sccsid's and add rcsid's.
2000-12-02 19:10:12 +00:00
Will Andrews
98c28d6cc5 There's no reason to use fancy forms of NULL. Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL.

Obtained from:		OpenBSD
2000-12-02 18:58:01 +00:00
Andrew Gallatin
36acf3d991 fix another int/long type mismatch. This one was causing pigs to
die with an fpe on alpha because fscale wasn't properly initted
2000-12-01 20:57:02 +00:00
Andrew Gallatin
d468ee6f1a fix int/long type mismatches found on alpha 2000-12-01 20:01:38 +00:00
David E. O'Brien
1ab84b3fc7 Grrr... GCC 2.95.2 and 2.96 just will not agree what the default include
search paths are.  So add the requirements of both. :-(
2000-12-01 19:36:17 +00:00
David E. O'Brien
2c5569d6ff The GCC 2.96 snapshots have slightly different rules for finding include
files.  Mostly -I${.CURDIR} was needed -- especially for YACC generated
files as the new cpp does not look in the ultimate source file
(ie, the .y file)'s directory as told by the "#line" directive.  Some were
misspellings of "-I${.CURDIR}" as "-I.".
2000-12-01 09:39:28 +00:00
Robert Watson
e292984cd3 o Make comment match reality, synch code with comment.
o In practice: the comment indicates that all but umask and
  environmental variables of the users login class are applied when su
  occurs, unless -m is used to specify a class.  This was incorrect;
  in practice, the uid, gids, resources, and priority were set, and
  then resources and priority were selectively removed.  This meant
  that some aspects of the user context were not set, including handling
  of login events (wtmp, utmp), as well as the path specified in
  login.conf.
o I changed it so that the behavior is the same, but instead,
  LOGIN_SETALL is used, and appropriate flags are removed, including
  the LOGIN_SETLOGIN and LOGIN_SETPATH entries that were implicitly
  not present before.  I also updated the comment to reflect
  reality, selecting reality as the "correct" behavior.
o This has the practical benefit that as new LOGIN_SET* flags are
  introduced, they are supported by su unless specifically disabled.
  For example, of a LOGIN_SETLABEL flag is introduced to support
  MAC labels determined by the user's login class, then su no longer
  has to be modified.
o It might be desirable to have su use LOGIN_SETPATH depending on
  its command line parameters, as it might or might not be
  considered part of the "environment".

Obtained from:	TrustedBSD Project
2000-11-30 23:14:55 +00:00
Will Andrews
313c36f04b Format string paranoia. This should avoid potential buffer overflows from
user input (in its ever-broadening definition).

Obtained from:	NetBSD
2000-11-30 13:56:19 +00:00
Dag-Erling Smørgrav
30204f9830 If the transfer timed out, but we don't know how large the file is supposed
to be, assume it was truncated.
2000-11-30 10:08:22 +00:00
John Baldwin
7f18d5d343 Make use of the full screen width to display p_comm rather than assuming a
hardcoded screen width of 80 chars.
2000-11-29 23:03:02 +00:00
John Baldwin
089f9b7e2f Display the name of the mutex we are blocked on in the state field. To
differentiate mutex names from wait channel names, prefix mutex names with
an asterisk.

Submitted by:	Dan Nelson <dnelson@emsphone.com>
2000-11-29 20:22:34 +00:00
Nik Clayton
71e1d8b0dd Xref make.conf(5), and point to /usr/share/doc/psd/12.make for the
tutorial paper.
2000-11-29 14:40:02 +00:00
Ruslan Ermilov
ef4261bf71 Eliminate groff(1) warnings. 2000-11-29 10:56:59 +00:00
Ruslan Ermilov
38478faf72 Eliminate groff(1) warnings caused by vgrind(1). 2000-11-29 10:32:51 +00:00
Sheldon Hearn
7e812edfb7 Fix a typo and a punctuation mistake, the two of which conspired
against the reader.
2000-11-29 06:55:13 +00:00
Marcel Moolenaar
5a1ce5e6aa Add LIBCRYPT to DPADD.
Implied by: bde
2000-11-28 07:24:15 +00:00
Kris Kennaway
a6f339d266 Format string auditing 2000-11-27 07:35:53 +00:00
Kris Kennaway
c858db9672 *** empty log message *** 2000-11-27 06:55:38 +00:00
Kris Kennaway
40c068176d Constify 2000-11-27 06:40:35 +00:00
Kris Kennaway
50d793ebb0 Fix format string warnings.
Submitted by:	nra
Obtained from:	NetBSD
2000-11-27 04:26:39 +00:00
Kris Kennaway
56e7ae90cb Cleanup this code a bit by attempting to sync it up with NetBSD and
with each other.

Reviewed by:	markm, dwmalone
2000-11-26 22:36:35 +00:00
David E. O'Brien
5576244cd6 Use the vendor's manpages (which are in old -man format) rather than
our modified one based on a much older version of the vendor's manpage.
2000-11-26 22:19:56 +00:00
Kris Kennaway
f6fd83ed27 Correct definition of MAXHOSTNAMELEN in ifdef'ed code.
Submitted by:	Edwin Groothuis <mavetju@chello.nl>
PR:		bin/22787
2000-11-26 21:37:51 +00:00
Kris Kennaway
cca0db7e7e Constify 2000-11-26 11:07:45 +00:00
Kris Kennaway
da4cd46eac vsprintf() -> vsnprintf() 2000-11-26 08:14:55 +00:00
Robert Watson
c3a2720353 o Make systat/vmstat.c use sysctl() to retrieve cp_time, bufspace,
maxvnodes, numvnodes, freevnodes, nchstats, and numdirtybuffers.
o Make the hw.ncpu error checking code a little more rigorous by
  sanity checking the returned data size.
o Didn't fix machine-dependent non-sysctl-exported variables:
  intrnames, eintrnames, intrcnt, eintrcnt, as these variables are
  defined and exported from machine-dependent kernel code in
  assembly.  This should probably be fixed somehow.
2000-11-25 03:53:42 +00:00
Robert Watson
00df22775a o make systat/pigs.c use syctl() to retrieve cp_time, fscale, and ccpu
instead of using kmem.
2000-11-25 03:49:42 +00:00
Robert Watson
8c82fe65a7 o Make systat/iostat.c use sysctl() to retrieve cp_time instead of
kmem.
2000-11-25 03:47:36 +00:00
Robert Watson
7ace4e618a o Make systat use sysctl() to retrieve hz and stathz, instead of
using kmem.
2000-11-25 03:46:45 +00:00
Ruslan Ermilov
92ee29d2a5 Reimplement the groff(1) warnings elimination fixes in a better way. 2000-11-24 10:05:30 +00:00
Joseph Koshy
b67f439c91 [rsh.1] Document the -4' and -6' options.
[rsh.c] Make usage message match the code.
2000-11-24 09:25:44 +00:00
Joseph Koshy
0deea1c066 [rlogin.1] Document the -4' and -6' options. Correct a typo.
[rlogin.c] Make the usage message match the code.
2000-11-24 09:14:09 +00:00
Ruslan Ermilov
bbc7e5700d Eliminate groff(1) warnings. 2000-11-23 15:21:30 +00:00
Ben Smithurst
d9a7d86c29 kenv(1) first appeared in FreeBSD 4.1.1, not FreeBSD 5.0.
PR:		23020
Submitted by:	Simon Dick <simond@irrelevant.org>
2000-11-23 11:21:35 +00:00
Alexey Zelkin
89368610f8 Use correct macro for path name
PR:		docs/13218
2000-11-22 17:53:17 +00:00
Kris Kennaway
4f377e65c4 Create temporary files in a secure directory, instead of using multiple
filenames based on a single invocation of mktemp() in /tmp, which is
easily predictable after the first one.

Audited by:     markm
2000-11-22 11:09:30 +00:00
Ruslan Ermilov
f4d874a1db mdoc(7) police: do not split author names in the AUTHORS section. 2000-11-22 09:35:58 +00:00
Ruslan Ermilov
8fe908ef0c mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
Ruslan Ermilov
3450dff7f1 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 12:18:54 +00:00
Marcel Moolenaar
c71b3c67f1 Add -lcrypt. This fixes cross-building. 2000-11-20 02:19:05 +00:00
Kris Kennaway
29ac114aae Unlink the temporary file immediately so it is removed on exit.
Obtained from:	OpenBSD
2000-11-19 12:04:12 +00:00
Kris Kennaway
f743d11975 Fix a buffer overflow from a long local hostname.
Obtained from:	OpenBSD
2000-11-19 10:08:26 +00:00
John W. De Boskey
aecbd99950 Add/fix the ability to split a file larger than 2 gigabytes.
Added $FreeBSD tag (in the way the already present sccsid is
done). I've been told the rcsid stuff may be of dubious value
so I'm curious to know if folks (still) use it.

Submitted by:	Brad Chisholm <blc@bsdwins.com>
2000-11-19 01:44:20 +00:00
Matthew Hunt
45fe9882b0 "minute(s) period(s)" --> "minute(s)" 2000-11-17 23:08:03 +00:00
Ruslan Ermilov
251c176f41 mdoc(7) police: use certified section headers wherever possible. 2000-11-17 11:44:16 +00:00
Ben Smithurst
76a06f8483 remove trailing periods from SEE ALSO. 2000-11-15 17:27:54 +00:00
Ruslan Ermilov
b82f5db0ac Spell the des's name correctly. 2000-11-14 13:19:26 +00:00
Ruslan Ermilov
b5c508fba3 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
Paul Saab
ecc50bd485 -U cannot be an option since some signals start with U. -u is the
documented behavior so only check for that.
2000-11-12 07:43:50 +00:00
David Greenman
e61715de39 Changed variable killchar to killch and erasechar to erasech to avoid
a name clash with the library functions of the same name (in libncurses).
This problem was masked when building tset shared (the local symbols had
precedence), but caused tset to core dump when it was built -static.
2000-11-11 23:03:38 +00:00
Ruslan Ermilov
726b61ab5f Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
Ruslan Ermilov
20279a10b2 Fixed typo: .ar -> .Ar. 2000-11-10 14:40:50 +00:00
David E. O'Brien
912209a5b2 Install `chflags' in the root partition, NOT /usr where it is not available
in single user mode.
2000-11-10 05:31:52 +00:00
Ruslan Ermilov
d6801b5c51 Fixed typo: .FL -> .Fl 2000-11-06 09:29:17 +00:00
Ruslan Ermilov
6c56f330ec .UC -> .Os 2000-11-06 09:27:03 +00:00
Ruslan Ermilov
390f1a7402 Fixed typo: .EL -> .El 2000-11-06 09:20:09 +00:00
David E. O'Brien
de16accdd0 Switch over to using the Christos Zoulas maintained version in contrib/
This also gives use the same exact results as NetBSD, thus sharing more
code with our bretheren.
2000-11-05 09:06:06 +00:00
Sheldon Hearn
c4c5e2bc46 Good-bye cruel world.
This software is obsolete, and its successor has interested parties
looking at it.  Even if nobody was looking at kgzip, this utility
still wouldn't be useful in an environment where aout kernels
are a thing of the past.

PR:		20643
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-11-02 10:04:02 +00:00
Sheldon Hearn
39bc1ed00a Disconnect kzip from the build, as it's about to enter late retirement.
PR:		20643
Submitted by:	Peter Pentchev <roam@orbitel.bg>
2000-11-02 10:00:34 +00:00
David E. O'Brien
a07101ab73 Remove vestages of a previous implimentation of "-h".
Submitted by:	Tony Finch <dot@dotat.at>
2000-10-31 02:26:10 +00:00
Guido van Rooij
591c194a92 Now that the amount of (pseudo) interfaces is growing with IPv6,
get rid of stupid upperbound on the amount of interfaces (was 8).
2000-10-30 11:53:19 +00:00
David E. O'Brien
d75c9e3a48 string.h has been repo copied to mystring.h 2000-10-30 10:04:56 +00:00
Chris D. Faulhaber
2d45aed6bc Remove obsolete /dev/drum references
Reviewed by:	alex, asmodai, billf
2000-10-29 12:19:52 +00:00
David E. O'Brien
ea257bd554 Add a new "-h" Human-friendly h/m/s output format.
Reviewed by:	bde
2000-10-28 21:48:53 +00:00
Gregory Neil Shapiro
d1ba25f456 Add a MAINTAINER= line so people know who to blame 2000-10-26 23:02:36 +00:00
David E. O'Brien
9e1ade7750 While I'm here and got caught by it, add FreeBSD IDs so the next guy
won't have trouble committing his bits.
2000-10-26 10:07:20 +00:00
David E. O'Brien
e218b63212 Having a local `string.h' is just asking for trouble. As is having a
`struct string'.  Rename the struct and effectively rename the header
to `mystring.h'
2000-10-26 10:00:52 +00:00
David E. O'Brien
cc66bbda3c Use the pathnames from pathnames.h rather than hardcoding them here.
Add RCSIDs.
2000-10-26 09:52:06 +00:00
Poul-Henning Kamp
c23d986ebe Add $FreeBSD$
Rename local offsetof() macro to boffsetof() to avoid clashing with
the offsetof() from <stddef.h>
2000-10-24 13:54:31 +00:00
Ruslan Ermilov
cf040f7474 The -o is the default for "short" display, not the -h. 2000-10-24 08:47:07 +00:00
Ruslan Ermilov
1e832bf81d -Wall cleanup.
PR:		22187
2000-10-23 12:18:34 +00:00
David E. O'Brien
bcfa1e3a90 The last "-iDsym" makes more sense as "-iUsym". 2000-10-22 23:49:29 +00:00
Poul-Henning Kamp
f90e81f97b Avoid using the semi-bogus include <struct.h>
All uses of fldsiz() in this file were wrong anyway.
2000-10-22 17:38:32 +00:00
Josef Karthauser
5da9f8fa97 Augment the 'ifaddr' structure with a 'struct if_data' to keep
statistics on a per network address basis.

Teach the IPv4 and IPv6 input/output routines to log packets/bytes
against the network address connected to the flow.

Teach netstat to display the per-address stats for IP protocols
when 'netstat -i' is evoked, instead of displaying the per-interface
stats.
2000-10-19 23:15:54 +00:00
Dag-Erling Smørgrav
a0c6ec97c9 Understand the difference between an empty file and a non-existent file.
This has been sitting in my tree for ages...
2000-10-19 21:05:59 +00:00
Nick Hibma
1d10fe5062 Fix the build break.
The solution isn't perfect, instead of printing the first report, it
will the report no report id, but the proper solution is more complex
than this. We would need to iterate over the report descriptor and
figure out all the report id's before starting to print.
2000-10-17 17:13:38 +00:00
Ruslan Ermilov
cb22e4fad5 Backed out part of the revision 1.10.
BLOCKSIZE could specify arbitrary block sizes, not exactly 1K blocks.
2000-10-16 10:00:50 +00:00
Brian Somers
fe4f4f067a Include sys/types.h 2000-10-16 08:28:50 +00:00
Brian Somers
bff9e230c6 Include sys/types.h 2000-10-16 08:22:42 +00:00
Brian Somers
aab6541484 Include sys/types.h 2000-10-16 08:13:59 +00:00
Alexander Langer
c0206f33f7 Correct the usage of mktemp:
The old version lists all args as optional.
However, you need at least one arg to get a usable result.

PR:		18667
Reported by:	obrien
Submitted by:	Johan Karlsson <k@numeri.campus.luth.se>
Reviewed by:	sheldonh
2000-10-15 11:35:48 +00:00
David E. O'Brien
41698bde61 Remove GLOBAL -- it has moved to Ports.
Approved by:	unanimous response on arch@freebsd.org (June time frame)
2000-10-15 07:10:42 +00:00
Bosko Milekic
a01db67988 Change the "in use" percentage metric to actually display a real
"in use" percentage. In other words, show how much of mb_map is in use.
2000-10-15 06:29:22 +00:00
Dag-Erling Smørgrav
91ef813ce3 Skip sockets with no SCB 2000-10-13 16:25:37 +00:00
Dag-Erling Smørgrav
83d213303c Fix suffix matching.
Restore historical behaviour when the first argument is an empty string.

Submitted by:	Alexander N. Kabaev <ak03@gte.com>
Pointed out by:	bde
2000-10-12 16:22:15 +00:00
Gregory Neil Shapiro
3866ec8061 Fix man page installation
Style fixes

Submitted by:	bde
2000-10-11 04:53:30 +00:00
Gregory Neil Shapiro
8108227d7f Use sendmail's version of vacation. It is command line and database
compatible with the old version but includes new functionality and bug fixes.

Since it is not part of the NO_SENDMAIL make.conf option, libsmdb and
libsmutil should always be built for vacation's sake.

PR:		15227
2000-10-10 18:14:30 +00:00
Garrett Wollman
eb2fc78027 Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and thereby
<time.h>).
2000-10-10 01:50:26 +00:00
Kris Kennaway
b2338d532a Don't overflow in command-line args
Submitted by:	Mike Heffner <mheffner@vt.edu>
2000-10-09 05:44:39 +00:00
Will Andrews
28323ac07e Add :L and :U variable modifiers. These convert the variable's value to
all-lower or all-upper case characters, respectively.  These were added
to further reduce differences between NetBSD/OpenBSD and FreeBSD make(1)
to propagate OpenPackages.

PR:		19959
Submitted by:	Gaspar Chilingarav <nm@web.am>
2000-10-09 04:53:36 +00:00
Will Andrews
2694d8d147 Add :C/// variable modifier, which is similar to :S/// in functionality
but allows for regex.  I removed NO_REGEX since no one could give a reason
to have it, and since we don't use make in bootstrap tools, it's not needed.

This is mostly added to synch up with NetBSD/OpenBSD so as to eliminate
roadblocks in the OpenPackages project (see http://www.openpackages.org/).
It's also quite useful, and costs us only about 3 kilobytes of space.

PR:		21605
Submitted by:	Hubert Feyrer <hubertf@NetBSD.org>
Reviewed by:	silence on -arch
Obtained from:	NetBSD
2000-10-09 04:31:43 +00:00
Poul-Henning Kamp
00d25f512c Initiate deorbit burn sequence for <machine/console.h>.
Replace all in-tree uses with necessary subset of <sys/{fb,kb,cons}io.h>.
This is also the appropriate fix for exo-tree sources.

Put warnings in <machine/console.h> to discourage use.
November 15th 2000 the warnings will be converted to errors.
January 15th 2001 the <machine/console.h> files will be removed.
2000-10-08 21:34:00 +00:00