Commit Graph

4019 Commits

Author SHA1 Message Date
Maxim Sobolev
15129224d4 Describe details of importing. 2001-03-27 16:27:31 +00:00
Ruslan Ermilov
5c9b69e3ac Traverse ${DESTDIR}/usr/include in lexographical order.
This should fix problems reported recently on -current.
2001-03-27 16:15:25 +00:00
Andrey A. Chernov
6bea9ab43b Add comment explaining why size not passed directly to mmap, i.e. not relay
on its check.
KNF multi-line comments
(inspired by bde)
2001-03-27 15:53:48 +00:00
Ruslan Ermilov
d92a0c0bde Do not override the ``install'' target. 2001-03-27 15:14:49 +00:00
Maxim Sobolev
f0adfd584f Update FreeBSD translations to match 1.4.1 (actually just copied Enslish
messages as I don't know de, pl and fr).
2001-03-27 13:53:08 +00:00
Maxim Sobolev
3019084254 Resolve conflicts. 2001-03-27 13:51:18 +00:00
Maxim Sobolev
cb167b5936 This commit was generated by cvs2svn to compensate for changes in r74853,
which included commits to RCS files with non-trunk default branches.
2001-03-27 13:38:19 +00:00
Maxim Sobolev
74d9f07d37 Virgin import of Hugh F. Mahon's EasyEditor 1.4.1. 2001-03-27 13:38:19 +00:00
Ruslan Ermilov
dc12be5258 MAN[1-9] -> MAN. 2001-03-27 10:52:19 +00:00
Kenneth D. Merry
3393f8daa3 Rewrite of the CAM error recovery code.
Some of the major changes include:

	- The SCSI error handling portion of cam_periph_error() has
	  been broken out into a number of subfunctions to better
	  modularize the code that handles the hierarchy of SCSI errors.
	  As a result, the code is now much easier to read.

	- String handling and error printing has been significantly
	  revamped.  We now use sbufs to do string formatting instead
	  of using printfs (for the kernel) and snprintf/strncat (for
	  userland) as before.

	  There is a new catchall error printing routine,
	  cam_error_print() and its string-based counterpart,
	  cam_error_string() that allow the kernel and userland
	  applications to pass in a CCB and have errors printed out
	  properly, whether or not they're SCSI errors.  Among other
	  things, this helped eliminate a fair amount of duplicate code
	  in camcontrol.

	  We now print out more information than before, including
	  the CAM status and SCSI status and the error recovery action
	  taken to remedy the problem.

	- sbufs are now available in userland, via libsbuf.  This
	  change was necessary since most of the error printing code
	  is shared between libcam and the kernel.

	- A new transfer settings interface is included in this checkin.
	  This code is #ifdef'ed out, and is primarily intended to aid
	  discussion with HBA driver authors on the final form the
	  interface should take.  There is example code in the ahc(4)
	  driver that implements the HBA driver side of the new
	  interface.  The new transfer settings code won't be enabled
	  until we're ready to switch all HBA drivers over to the new
	  interface.

src/Makefile.inc1,
lib/Makefile:		Add libsbuf.  It must be built before libcam,
			since libcam uses sbuf routines.

libcam/Makefile:	libcam now depends on libsbuf.

libsbuf/Makefile:	Add a makefile for libsbuf.  This pulls in the
			sbuf sources from sys/kern.

bsd.libnames.mk:	Add LIBSBUF.

camcontrol/Makefile:	Add -lsbuf.  Since camcontrol is statically
			linked, we can't depend on the dynamic linker
			to pull in libsbuf.

camcontrol.c:		Use cam_error_print() instead of checking for
			CAM_SCSI_STATUS_ERROR on every failed CCB.

sbuf.9:			Change the prototypes for sbuf_cat() and
			sbuf_cpy() so that the source string is now a
			const char *.  This is more in line wth the
			standard system string functions, and helps
			eliminate warnings when dealing with a const
			source buffer.

			Fix a typo.

cam.c:			Add description strings for the various CAM
			error status values, as well as routines to
			look up those strings.

			Add new cam_error_string() and
			cam_error_print() routines for userland and
			the kernel.

cam.h:			Add a new CAM flag, CAM_RETRY_SELTO.

			Add enumerated types for the various options
			available with cam_error_print() and
			cam_error_string().

cam_ccb.h:		Add new transfer negotiation structures/types.

			Change inq_len in the ccb_getdev structure to
			be "reserved".  This field has never been
			filled in, and will be removed when we next
			bump the CAM version.

cam_debug.h:		Fix typo.

cam_periph.c:		Modularize cam_periph_error().  The SCSI error
			handling part of cam_periph_error() is now
			in camperiphscsistatuserror() and
			camperiphscsisenseerror().

			In cam_periph_lock(), increase the reference
			count on the periph while we wait for our lock
			attempt to succeed so that the periph won't go
			away while we're sleeping.

cam_xpt.c:		Add new transfer negotiation code.  (ifdefed
			out)

			Add a new function, xpt_path_string().  This
			is a string/sbuf analog to xpt_print_path().

scsi_all.c:		Revamp string handing and error printing code.
			We now use sbufs for much of the string
			formatting code.  More of that code is shared
			between userland the kernel.

scsi_all.h:		Get rid of SS_TURSTART, it wasn't terribly
			useful in the first place.

			Add a new error action, SS_REQSENSE.  (Send a
			request sense and then retry the command.)
			This is useful when the controller hasn't
			performed autosense for some reason.

			Change the default actions around a bit.

scsi_cd.c,
scsi_da.c,
scsi_pt.c,
scsi_ses.c:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.  Selection
			timeouts shouldn't be covered by a sense flag.

scsi_pass.[ch]:		SF_RETRY_SELTO -> CAM_RETRY_SELTO.

			Get rid of the last vestiges of a read/write
			interface.

libkern/bsearch.c,
sys/libkern.h,
conf/files:		Add bsearch.c, which is needed for some of the
			new table lookup routines.

aic7xxx_freebsd.c:	Define AHC_NEW_TRAN_SETTINGS if
			CAM_NEW_TRAN_CODE is defined.

sbuf.h,
subr_sbuf.c:		Add the appropriate #ifdefs so sbufs can
			compile and run in userland.

			Change sbuf_printf() to use vsnprintf()
			instead of kvprintf(), which is only available
			in the kernel.

			Change the source string for sbuf_cpy() and
			sbuf_cat() to be a const char *.

			Add __BEGIN_DECLS and __END_DECLS around
			function prototypes since they're now exported
			to userland.

kdump/mkioctls:		Include stdio.h before cam.h since cam.h now
			includes a function with a FILE * argument.

Submitted by:	gibbs (mostly)
Reviewed by:	jdp, marcel (libsbuf makefile changes)
Reviewed by:	des (sbuf changes)
Reviewed by:	ken
2001-03-27 05:45:52 +00:00
Andrey A. Chernov
1410c7cc9a Use SSIZE_MAX instead of INT_MAX, as kernel does ssize_t check
Better explanation comment of FIXME section
2001-03-27 01:16:44 +00:00
Andrey A. Chernov
ad859a471d Treat mmap() error as fatal too, i.e. do exit(1) instead of return 2001-03-26 19:36:27 +00:00
Andrey A. Chernov
4f2554b7b7 rlines() checks:
1) really check for size overflow by checking negative value.
2) since mmap() not support files over INT_MAX size, add check for it
until either mmap() will be fixed or tail will be rewritted to handle
large files alternatively.
3) replace fseek(... file_size, SEEK_SET) with fseek(... 0L, SEEK_END)
to avoid off_t -> long cast
4) Use exit() if file is too big instead of warning and wrong logic
afterwards.
2001-03-26 19:29:49 +00:00
Ruslan Ermilov
0dc44b5add Do not build (and install) both secure/ and standard versions
of libtelnet, telnetd, and telnet.  This only worked because
secure/ was listed late in SUBDIR in Makefile.inc1.

Reviewed by:	markm
2001-03-26 12:49:05 +00:00
Ruslan Ermilov
0414fc4dd0 Don't use MANDEPEND and MANSRC. 2001-03-26 07:28:26 +00:00
Mike Heffner
0c3a8314c0 Merge various changes from OpenBSD and NetBSD.
o remove panic() in favor of err(3) and use err(3) functions
  consistently throughout
o use stat(2)'s S_IS* macros rather than S_IF*
o [r]index -> str[r]chr
o convert some static buffers to dynamic ones
o use real tempfiles rather than reopening the same templates
o rename some functions that clash with libc
o convert wait_status from union to int and use wait(2) status macros
o fix multiple potential buffer overflows
o fix a few comments
o add $FreeBSD$

Reviewed by:	nra, nectar (earlier version)
2001-03-25 04:57:05 +00:00
Dag-Erling Smørgrav
7c480c6c77 Now that libfetch uses the high port range by default, add a -U option to
make it use the low (default) port range instead.
2001-03-24 00:32:11 +00:00
Thomas Moestl
342e2faa09 Get rid of setgid kmem for systat, and while being there, fix some bugs
and compiler warnings.
The data for network statistics are still obtained via the kvm interface
if systat was started with the needed privileges, otherwise sysctls are
used. The reason for this is that with really many open sockets, the
sysctl method is probably slower, but it systat -netstat is probably not
really usable in either mode under these conditions.

Approved by:	rwatson
2001-03-23 03:58:25 +00:00
Thomas Moestl
f8d15d5230 Take setgid kmem away from nfsstat, it has not needed it for some time
now.

Approved by:	rwatson
2001-03-22 17:39:57 +00:00
Andrey A. Chernov
3740863d60 Properly deal with one char weekdays 2001-03-22 00:38:46 +00:00
Andrey A. Chernov
e036a70eb9 Uppercase first month letter
Terminate weekday string
2001-03-22 00:25:26 +00:00
Andrey A. Chernov
9575fb2f65 Fix width for printing time 2001-03-21 21:49:33 +00:00
Andrey A. Chernov
f1b3d82406 Don't attempt to parse %c 2001-03-21 20:47:43 +00:00
Andrey A. Chernov
6ab831378a Don't attempt to parse %c 2001-03-21 20:32:20 +00:00
Andrey A. Chernov
3bd65123fa Don't attempt to parse %c 2001-03-21 20:26:51 +00:00
Andrey A. Chernov
e36de81ee2 Don't attempt to parse %c 2001-03-21 19:16:41 +00:00
Andrey A. Chernov
a99768c6e2 Don't attempt to parse %c 2001-03-21 19:08:01 +00:00
Andrey A. Chernov
f4d292b799 Don't attempt to parse %c 2001-03-21 18:43:49 +00:00
Andrey A. Chernov
fa2b491527 Don't attempt to parse %c, use nl_langinfo instead 2001-03-21 15:51:50 +00:00
Andrey A. Chernov
800f0ffbbe Don't attempt to parse %c, use nl_langinfo instead 2001-03-21 15:41:02 +00:00
Andrey A. Chernov
1f30a4236c Restore old locale properly 2001-03-21 15:39:17 +00:00
Andrey A. Chernov
77b898c43a Use nl_langinfo instead of %Ef 2001-03-21 14:32:02 +00:00
Andrey A. Chernov
f5e40af22e Use nl_langinfo instead of %EF 2001-03-21 14:24:05 +00:00
Thomas Moestl
6243f7aca4 Correct the top memory stats display: convert page counts to kB.
Submitted by:	Andrea Campi <andrea@webcom.it>
Approved by:	rwatson
Pointy hat to:	myself
2001-03-20 16:02:16 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Poul-Henning Kamp
6eec3af9fe Add an example of a novel technique to the IPv6 code. This technique seems
to have been developed after the IPv6 code was written, it's called "checking
for error returns".

Now netstat at least doesnt't go beserk in jails.
2001-03-19 08:51:56 +00:00
Ruslan Ermilov
8eda014034 s/protocol-cloned/cloned/ I have missed in 1.24 -> 1.25. 2001-03-18 13:50:58 +00:00
Dag-Erling Smørgrav
84e268e3fc Use the newly introduced -W flag to netstat(1) to avoid truncated addresses. 2001-03-15 20:46:35 +00:00
Dag-Erling Smørgrav
080b7f4967 Add a -W flag that tells netstat not to truncate addresses even if they are
too long for the column they're printed in.

Move variable definitions out of netstat.h and into main.c.

Clean up some warnings.
2001-03-15 20:46:04 +00:00
Ruslan Ermilov
089cdfad78 net/route.c:
A route generated from an RTF_CLONING route had the RTF_WASCLONED flag
  set but did not have a reference to the parent route, as documented in
  the rtentry(9) manpage.  This prevented such routes from being deleted
  when their parent route is deleted.

  Now, for example, if you delete an IP address from a network interface,
  all ARP entries that were cloned from this interface route are flushed.

  This also has an impact on netstat(1) output.  Previously, dynamically
  created ARP cache entries (RTF_STATIC flag is unset) were displayed as
  part of the routing table display (-r).  Now, they are only printed if
  the -a option is given.

netinet/in.c, netinet/in_rmx.c:

  When address is removed from an interface, also delete all routes that
  point to this interface and address.  Previously, for example, if you
  changed the address on an interface, outgoing IP datagrams might still
  use the old address.  The only solution was to delete and re-add some
  routes.  (The problem is easily observed with the route(8) command.)

  Note, that if the socket was already bound to the local address before
  this address is removed, new datagrams generated from this socket will
  still be sent from the old address.

PR:		kern/20785, kern/21914
Reviewed by:	wollman (the idea)
2001-03-15 14:52:12 +00:00
Bill Fumerola
bdc8631e01 with my mentor hat on...
remove the concept of a 'maintainer' of our make. there really isn't a
need for any one committer to hold an exclusive lock or serve as a filter
for this code.
2001-03-15 10:33:00 +00:00
Will Andrews
fdcd2e7d3a Revert previous change -- apparently it's not quite right. It broke
src/sys/modules/if_ef and possibly other things.  I tested the build with
a make based on rev. 1.26, and it worked fine.  Since I'm not particularly
inclined to figure out what's going on with this, it's probably prudent
just to back it out for now.

Found by:	jkh
Suggested by:	jhay
2001-03-15 10:22:50 +00:00
Will Andrews
fff8dac495 Fix make(1) bug: nested comments may be placed in .if, .else .if, and
.endif statements but can't be placed in .elif.  Basically, the problem
was that ParseSkipLine() didn't handle comments the same way that
ParseReadLine() did, and thus you had errors with comments that are on a
conditional line (i.e. "^.") rather than a non-conditional line.

MFC candidate for 4.3-STABLE and 3.5-STABLE.

PR:			25627
Bug found by:		jhs
Fix submitted by:	Seth Kingsley <sethk@osd.bsdi.com>  (thanks!!)
2001-03-15 02:51:11 +00:00
Brian Somers
d121b55666 MAXHOSTNAMELEN includes space for a NUL.
Don't roll our own version of trimdomain(), use the one in libutil.

Not objected to by: freebsd-audit
2001-03-14 20:51:26 +00:00
Ruslan Ermilov
fb9aaba000 Count and show incoming UDP datagrams with no checksum. 2001-03-13 13:26:06 +00:00
Will Andrews
9e13809564 Fix top(1) display for SMP systems where the username is longer than 14
characters.  This should avoid unattractive wrapping for people who are
stuck in an 80x24 screen.  :-)

PR:		22270
Submitted by:	William Carrel <williamc@go2net.com>
2001-03-12 05:53:54 +00:00
Assar Westerlund
1d4589b693 reset uid back to the user before doing kerberised change password.
root permission is not needed and the kerberos library is paranoid
about access control to the ticket file

PR:		bin/20779
2001-03-12 03:52:00 +00:00
Mark Murray
82e377fd12 Updates for Blowfish password hashing. 2001-03-11 16:37:33 +00:00
David E. O'Brien
8454c72c24 Move _PATH_DEFTAPE to <paths.h> to remove all the duplication of definitons,
and remove leading `r'(aw) from it.
2001-03-08 09:04:40 +00:00
Thomas Moestl
a333d4f752 Fix two bugs in null suffix handling. Both occured only after the suffix
list was cleared.
Rules with null suffixes would not be rebuilt when the suffixes were
added again.
Adding null suffix rules would fail when a rule for the same source was
declared before the suffix list was cleared.

PR:		23328, 24102
Reviewed by:	will
Approved by:	rwatson
2001-03-08 00:55:08 +00:00
Dag-Erling Smørgrav
cd400b67a4 If SIGINFO is received during the transfer, print a status line similar
to the summary shown at the end of the transfer.

Some days, I really hate Unix...

Suggested by:	cracauer
2001-03-07 05:33:50 +00:00
Dag-Erling Smørgrav
150fb21bf8 Fix a formatting bug (MFC candidate) 2001-03-07 03:22:11 +00:00
Doug Rabson
7172dc3b54 Pick up the environment variable ${NM} if it exists and use that to list
symbols. This allows lorder to be used more easily in a cross-build
environment.
2001-03-06 15:00:32 +00:00
Dag-Erling Smørgrav
a0581bbcc2 Add (and document) options for showing only listening or connected sockets. 2001-03-06 13:48:38 +00:00
Andrey A. Chernov
92992ece46 Fix ttynames generation broken with strlcat
PR:		25541
Submitted by:	Nickolay Dudorov <nnd@mail.nsk.ru>
2001-03-05 14:10:15 +00:00
Kris Kennaway
27540537e8 Switch from using rand() or random() to a stronger, more appropriate PRNG
(random() or arc4random())

Reviewed by:	bde
2001-03-05 02:15:38 +00:00
Josef Karthauser
445f17bbee When displaying interface statistics with -i show a '-' for any
values that aren't updated for a particular network-layer address.
2001-03-04 22:25:05 +00:00
Bill Fumerola
f5db5b7fcd BDECFLAGS.
while I'm here, fix bitrotted debug code generating template.
2001-03-04 12:28:57 +00:00
Andrey A. Chernov
2742fc8eb2 Preserve comma as separator when it is not equal to radix character 2001-03-03 16:47:07 +00:00
Andrey A. Chernov
e25fd27cd1 Don't use "," as load avg. separator because it can be precision point in some
locales, so leads to confusion
2001-03-03 01:32:46 +00:00
Andrey A. Chernov
5f2de0a78a Oops, remove tabs sneaked in wrong place 2001-03-02 23:49:07 +00:00
Andrey A. Chernov
000346454c Use AM/PM time only when available in locale 2001-03-02 23:11:38 +00:00
Warner Losh
003ff9433b Add -g group to usage message.
Don't treat pointer as a boolean, but instead test it against NULL.
Add warning for groups that don't exist

Submitted by: ru
2001-03-02 07:30:37 +00:00
Warner Losh
e829cbf262 Include -DDEFSHELL=1 in Makefile.dist so people boostrapping will
have a sane default.

Also add $FreeBSD$ while I'm here.

Pointed out by: bde
2001-03-01 06:26:32 +00:00
Warner Losh
20b367cea1 MAXPATHLEN includes the trailing NUL.
Correct array sizes to reflect this.
Correct NUL termination after strncpy.

# Didn't to strncpy -> strlcpy change.
2001-03-01 06:03:17 +00:00
Warner Losh
77892acd6a MAXPATHLEN contains the trailing NUL. 2001-03-01 06:00:22 +00:00
Warner Losh
167ea27b4f MAXPATHLEN is enough.
Also, snprinf is guaranteed by the new ansi standard to NUL terminate the
string, so we don't need to do that ourselves.
2001-03-01 05:52:38 +00:00
Daniel C. Sobral
5bf6254172 All temperature scales are centigrades. Use "Celsius" instead. 2001-03-01 05:51:46 +00:00
Warner Losh
470b24b584 MAXPATHLEN already accounts for the trailing NUL, so no need to add one in.
In addition, since we pass readlink MAXPATHLEN - 1, we would have never have
used that extra byte anyway.
2001-03-01 05:49:36 +00:00
Warner Losh
55ff3bf4be MAXPATHLEN includes the trailing NUL character, so there's no need to add 1
to it for the size of path.
2001-03-01 05:47:28 +00:00
Warner Losh
78de666777 Remove redundant declaration of optind. It has been declared in unistd.h
for ages.
2001-03-01 05:46:03 +00:00
Warner Losh
6a20d55a59 o Add support for wall -g. This will send a message to all members of
a given group.
o Minor code style cleanups while I'm here

Reviewed by: bde, kris, markm, audit@
2001-03-01 05:43:12 +00:00
John Hay
b88a90fd4c The secure temporary directory is always created, so always remove it. 2001-02-28 19:21:44 +00:00
Ruslan Ermilov
c2d03ea879 Eliminate mdocNG warnings caused by misplaced or extraneous macro calls. 2001-02-28 17:38:53 +00:00
Jonathan Lemon
6029e6933c Use EV_SET() macro to initialize kevent structure. 2001-02-28 16:16:31 +00:00
David Malone
357c2d78c4 Add missing prefix for nano, I presume this was missing 'cos of the
prefix recusrion bug. Remove units which can be derived using prefixes
and other units.

Add new prefixes for 2^10, 2^20, etc...
2001-02-28 16:00:32 +00:00
David Malone
17ad860f81 Give units a bit of a cleanup:
1) Fix a bug where the recursion on prefixes where if recusrion failed
	then the next attempt started too far along the string.
2) Up some internal limits that we were about to hit off.
3) Change the constness and signedness of some things and complete missing
	prototypes.
4) Remove the readerror function 'cos it could print out the wrong
	wrong file name. Replace it with more useful error messages.
5) Use sizeof when passing buffers to fgets.
6) Warn about empty prefix definitions.

Reviewed by:	iedowse
2001-02-28 15:57:38 +00:00
David E. O'Brien
bc321b0e44 Update HISTORY. 2001-02-28 03:33:44 +00:00
David E. O'Brien
52608c9fbf Fix indent endless on garbage input (i.e., if it encountered EOF while
waiting for a '}' nesting terminator)

Obtained from:	OpenBSD rev 1.8
2001-02-27 20:50:34 +00:00
Andrew Gallatin
98e53e5bfb - An array of 4 32-bit ints for avenrun doesn't work on the alpha because
fscale is a (64-bit) long.  So just use a struct loadavg.
This fixes the recent failure of top on alphas:
	top: sysctl(vm.loadavg...) failed: Cannot allocate memory

- use size_t for sizeof() so as to fix a few int/long warnings on alpha

Reviewed by: Thomas Moestl <tmoestl@gmx.net>
2001-02-27 17:11:19 +00:00
Ruslan Ermilov
f51cb008b7 mdoc(7) police: utilize .St macro. 2001-02-26 15:55:52 +00:00
Ruslan Ermilov
94ad6032c5 mdoc(7) police: restore correct order of references in the SEE ALSO. 2001-02-24 10:30:27 +00:00
Robert Watson
0ce14ceb84 Remove directive to install top as group kmem. Remove directive to
install top with setgid bit.
2001-02-23 18:55:43 +00:00
Robert Watson
39d513ecdd Adapt the top utility to not use kmem_read to retrieve variables now
available via sysctl().  As a result, top should now be able to run without
setgid kmem.

Submitted by:	Thomas Moestl <tmoestl@gmx.net>
Reviewed by:	freebsd-audit
2001-02-23 18:52:37 +00:00
Akinori MUSHA
7c1d4b3ae9 Implement the following options and primaries:
-E      Interpret regular expressions followed by -regex and -iregex op-
             tions as extended (modern) regular expressions rather than basic
             regular expressions (BRE's).  The re_format(7) manual page fully
             describes both formats.

     -iname pattern
             Like -name, but the match is case insensitive.

     -ipath pattern
             Like -path, but the match is case insensitive.

     -regex pattern
             True if the whole path of the file matches pattern using regular
             expression.  To match a file named ``./foo/xyzzy'', you can use
             the regular expression ``.*/[xyz]*'' or ``.*/foo/.*'', but not
             ``xyzzy'' or ``/foo/''.

     -iregex pattern
             Like -regex, but the match is case insensitive.

These are meant to be compatible with other find(1) implementations
such as GNU's or NetBSD's except regexp library differences.

Reviewed by:	sobomax, dcs, and some other people on -current
2001-02-23 16:20:55 +00:00
Alfred Perlstein
3cf714fef8 fix usage statement (add missing [-n devs] option)
Submitted by: Maxim Konovalov <maxim@macomnet.ru>

Silence a warning by renaming the 'pgtok' #define to 'vmstat_pgtok' so
as not to conflict with the 'pgtok' #define in sys/param.h
2001-02-22 13:55:12 +00:00
Garrett Wollman
d75f6037c8 Reword the description a little bit more for parallel construction. 2001-02-21 19:33:38 +00:00
Garrett Wollman
046627251a Destroy the evidence of my misunderstanding of the specification.
Also fix up the phrasing in the man page a bit.
2001-02-21 19:31:53 +00:00
Kris Kennaway
0937df81ca Introduce support for using OpenSSL ASM optimizations. This is done
through the use of a new build directive, MACHINE_CPU, which contains a
list of the CPU generations/features for which optimizations are desired.
This feature will be extended to cover the ports tree in the future.

Currently OpenSSL provides optimizations for i386, i586 and i686-class
CPUs. Currently it has not been tested on an i386 or i486.

Teach make(1) to provide sensible defaults for MACHINE_CPU if it is not
defined (namely, the lowest common denominator CPU we support for each
architecture).  Currently this is i386 for the i386 architecture and ev4
for the alpha.  sys.mk also sets the variable as a last resort for
consistency with MACHINE_ARCH and bootstrapping from very old versions of
make.

Benchmarks show a significant speed increase even in the i386 case, with
additional improvements for i586 and i686 systems.  For maximum performance
define MACHINE_CPU=i686 i586 i386 in /etc/make.conf.

Based on a patch submitted by:  Mike Silbersack <silby@silby.com>
Reviewed by:    current
2001-02-19 03:59:05 +00:00
Peter Wemm
8d03543c79 Have yacc use a prototype for yygrowstack(void) on ANSI compilers.
This fixes a gcc warning with -Wmissing-prototypes.
2001-02-19 01:10:01 +00:00
Mark Murray
a28d666c49 Adjust columns for wide nicenesses in 'top -S'. 2001-02-18 11:08:47 +00:00
Jeroen Ruigrok van der Werven
d1d2ed0e78 Preceed/preceeding are not english words. Use precede and preceding.
Add $FreeBSD$.
2001-02-18 10:44:00 +00:00
Jeroen Ruigrok van der Werven
d7d97eb0aa Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
Luigi Rizzo
60846af2e6 Do not compile INET6 support if RELEASE_CRUNCH is defined
(used by install floppy/picobsd)
2001-02-18 07:28:31 +00:00
Bruce Evans
8b72aacc66 Fixed some style bugs (bogus cloned Id, null overrides of defaults, and
the usual style bugs for DPADD/LDADD).
2001-02-17 06:20:14 +00:00
Bruce Evans
58445af0f8 Removed some garbage (genassym(8) and its infrastructure). 2001-02-17 06:06:14 +00:00
Ian Dowse
b654e1067b Fix `fstat -m' (show memory-mapped files), which was broken by
revision 1.25. When evaluating the termination condition for the
iteration over all map entries, we must take care to use the kernel
versions of all pointers. The code was comparing a kernel pointer
to a pointer within a local variable, so the loop never terminated.
2001-02-15 22:42:44 +00:00
Peter Wemm
69179c1439 Work around the p_comm[] size limit. If the user supplies more than
16 characters, only check the first 16 since that is all the kernel
records.  This isn't ideal, but it is probably the best we can do.
Otherwise, "killall communicator-linux-4.76.bin" will not match
the process as the kernel only records "communicator-lin".
2001-02-14 21:56:03 +00:00
Ruslan Ermilov
2855fa0467 mdoc(7) police: replace -hang list with the -tag list,
add missing .Xo/.Xc to the tags.  This only worked due
to the off-by-one bug in the -hang lists, which I will
hopefully backport from the mdocNG shortly.
2001-02-14 10:14:35 +00:00
Ruslan Ermilov
47dec78170 mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00
Jake Burkholder
4c85452ba9 Catch up to new priority interface. 2001-02-12 00:21:38 +00:00
David Malone
d3d8587299 Uname is in section 3 of the manual pages.
PR:		25008
Submitted by:	fullermd@over-yonder.net
2001-02-11 21:19:31 +00:00
Andrey A. Chernov
124d32d6a9 Change localizing to LC_ALL 2001-02-10 23:25:09 +00:00
Andrey A. Chernov
e1fc0c16f0 Localize it (LC_NUMERIC) 2001-02-10 22:46:47 +00:00
Ruslan Ermilov
429d919c70 mdoc(7) police: mark LC_NUMERIC with .Dv. 2001-02-10 10:26:52 +00:00
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