Commit graph

2812 commits

Author SHA1 Message Date
Peter Wemm 67ad5f5700 Repo copied contents of src/sbin/i386 to src/sbin and set specific
SUBDIR lists there.  Some of these are used on other platforms.
2001-11-03 07:31:21 +00:00
Peter Wemm f24c53d3ef Move i386/{fdisk,cxconfig,nextboot} to src/sbin. Eliminate the i386
subdir.  Add fdisk to ia64 SUBDIR list.  Add all the previous occupants
of the i386 subdir to the i386 SUBDIR list.
2001-11-03 07:30:14 +00:00
Poul-Henning Kamp bfd1f63d44 style(9) cleanup.
Submitted by:	j mckitrick <jcm@freebsd-uk.eu.org>
Reviewed by:	phk, /sbin/md5
2001-11-02 09:23:34 +00:00
Yaroslav Tykhiy f23badd91d Cosmetic: Don't output a blank line if a driver provides
no media status.

PR:		bin/30587
Submitted by:	Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
MFC after:	1 week
2001-11-02 02:20:21 +00:00
Luigi Rizzo d32ab253ae Fix a typo in a format string, and fix error checking for missing
masks in "limit" rules.
2001-11-01 08:45:02 +00:00
Poul-Henning Kamp 84ef95bd6e Do not uselessly whine in syslog about packets denied by ipfw rules.
Set 'log_ipfw_denied' option if you want the old behaviour.

PR:	30255
Submitted by:	Flemming "F3" Jacobsen <fj@batmule.dk>
Reviewed by:	phk
MFC after:	4 weeks
2001-10-31 16:08:49 +00:00
Anton Berezin 28dc1d2377 Replace =' with more correct `.Ql =''.
Mdoc-policed by:	ru
2001-10-31 15:57:55 +00:00
Anton Berezin d0b8aabb19 Implement -e option. It modifies the output produced by sysctl(8) in
such a way that the name and the value of the variable(s) are separated
with `=' instead of the usual `: '.  This is useful for producing output
that can be fed back to the sysctl utility (pasted to sysctl.conf, for
example).

Reviewed by:	rwatson
Approved by:	markm
MFC after:	2 weeks
2001-10-30 20:15:32 +00:00
Anton Berezin 646d372751 Fix a bug where restore(8) segfaults while trying to restore on a
read-only FS.

Reviewed by:	audit silence
Approved by:	markm
MFC after:	2 weeks
2001-10-30 20:06:59 +00:00
Josef Karthauser b404d15b59 More white space changes. 2001-10-29 03:46:28 +00:00
Josef Karthauser 285e176b66 More stylistic tidying. 2001-10-29 03:25:49 +00:00
Josef Karthauser a87d240115 Remove training white spaces, and some other style violations. 2001-10-29 00:37:24 +00:00
Matthew Dillon 9ef76b94a7 Properly convert long to time_t 2001-10-28 20:19:14 +00:00
Matthew Dillon 5b3817c60b Make the protocol/dumprestore.h header match restore's idea of the dump
header for the case where sizeof(time_t) != sizeof(int).  dumprestore.h
was embedding time_t when it should have been embedding int32_t.

Use time_to_time32() and time32_to_time() to convert between the
protocoll/file-format time and time_t.
2001-10-28 20:01:38 +00:00
Nick Hibma 76c83512ef Typo. 2001-10-28 16:47:06 +00:00
Nick Hibma e2fb2db567 Add a Xref to dumpon. 2001-10-28 16:41:56 +00:00
Matthew Dillon 788bbd2d61 deltat declared time_t, msg("") call used %d (assumed time_t == int).
Changed deltat to be an int (result of delta time calculation).

MFC after:	1 day
2001-10-28 06:13:47 +00:00
Josef Karthauser 6e97e2e10f Remove some extraneous spaces from the usage message. 2001-10-28 02:10:40 +00:00
Matthew Dillon 484a709abe Add missing cast for improper time_t use in computation. 2001-10-28 00:01:58 +00:00
Ruslan Ermilov dd1eb0f437 Put WARNS into the right place. 2001-10-25 17:09:37 +00:00
Jonathan Lemon 068c21c653 Style and WARNS cleanups.
Submitted by: ru
2001-10-25 16:41:38 +00:00
Ruslan Ermilov bd1a63798a The directory of the makefile that's including the file is tried first.
See section 3.2 of "PMake - A Tutorial" in /usr/share/doc/psd/12.make.
2001-10-25 08:37:12 +00:00
Ruslan Ermilov 907d70d6de Sort SUBDIR. 2001-10-25 07:55:43 +00:00
Jonathan Lemon 06279b5357 Mdoc fixes and clarification.
Submitted by: sheldonh
2001-10-25 05:53:11 +00:00
Jonathan Lemon 64ce1efcd1 Add a manual page. 2001-10-23 22:13:34 +00:00
Jonathan Lemon 093a27108a Hook up conscontrol to the build. 2001-10-23 20:37:07 +00:00
Jonathan Lemon e4a604093c Add conscontrol, a front end interface for manipulating consoles. 2001-10-23 20:36:43 +00:00
Ruslan Ermilov d973561313 Connect cxconfig(8) to build.
PR:		30447
2001-10-23 09:24:49 +00:00
Ruslan Ermilov 3407bd2bce WARNSify. 2001-10-23 09:23:17 +00:00
Darren Reed d70e094301 include ipfs in subdirs
PR:		27063
2001-10-20 04:27:45 +00:00
Darren Reed 0186482566 build ipfs for -current
PR:		27063
2001-10-20 04:27:05 +00:00
Ollivier Robert 4f63c70a2b Fix diskless clients by removing the code for calculating the minimum
value for cpg. The change was bogus.

Submitted by:	bde
MFC after:	2 days
2001-10-18 09:48:28 +00:00
Jonathan Lemon 1643c8f3eb When specifying an interface to ifconfig, first look up the interface
index, then retrieve statistics for that index, rather than retrieving
all interfaces and then looking for a matching name.  This allows the
user to refer to an interface via an alias name.

While I'm here, also perform a few assorted cleanups.
2001-10-17 18:30:13 +00:00
Ruslan Ermilov 5acabd8cdd Bring in latest CSRG revisions to this file. 2001-10-17 09:11:23 +00:00
Ian Dowse fef7dd5a5f When nfsd was started with only UDP servers, the master nfsd would
spin in a loop eating CPU time. This bug has existed since the
TI-RPC import. The problem is that we should only enter the select
loop if at least one TCP server was started.  Fix this by having
the master nfsd become a UDP server itself if there are no TCP
servers.

Also improve/correct the code for cleaning up slave nfsd processes
and unregistering with rpcbind when the master nfsd exits.

One issue that remains open is that if a slave nfsd dies, then all
nfsds will shut down. This is because nfssvc() in the master nfsd
returns 0 when the master nfsd receives a SIGCHLD.

Submitted by:	tmm
2001-10-16 21:55:53 +00:00
Bruce Evans 2175f5f1b9 Fixed spelling error in previous commit. 2001-10-16 10:52:12 +00:00
Doug Barton eb9d1d2716 Document the optimal block:fragment ratio, per discussion
on -arch and cvs-all.

Reviewed by:	dillon
2001-10-15 22:47:55 +00:00
Dag-Erling Smørgrav 6e8ff8b760 Allow reboot during runcom.
PR:		bin/28116
Submitted by:	Valentin Nechayev <netch@netch.kiev.ua>
MFC in:		1 week
2001-10-15 20:34:43 +00:00
Peter Wemm a528d3185a Add 0xEE (EFI GPT) and 0xEF (EFI System Partition) 2001-10-15 07:21:32 +00:00
Greg Lehey ff433237bd Reinstate VINUMDEBUG. Removing it also removes some diagnostic commands.
I should reconsider whether I just leave them in without #ifdef VINUMDEBUG.
2001-10-15 01:32:48 +00:00
Dima Dorfman 075908f115 Repair typo.
PR:		31262
Submitted by:	<swear@blarg.net>
2001-10-14 22:46:05 +00:00
Ian Dowse 21eff82f63 Oops, fix a missing condition that broke umount's `-h' option. I
had somehow removed an error check in revision 1.26, causing errx()
to be called unconditionally in the -h case.
2001-10-13 02:04:54 +00:00
Ruslan Ermilov 6686600758 -r is implied with -B. 2001-10-10 16:26:56 +00:00
Søren Schmidt b508ad43c6 Update to reflect the change in ata.h
Forgotten by: sos
2001-10-07 07:48:12 +00:00
Peter Wemm 9ee1532786 Remove some bogus "(off_t)(dumplo + value)" and "(off_t)dumplo" casts,
since dumplo is now an off_t.  Scratch a couple of other itches as well.
s/L_SET/SEEK_SET/
2001-10-05 03:13:13 +00:00
Peter Wemm 1ade1386ba Argh. Fix another >2GB savecore problem.
Reported by:   mki@mozone.net
2001-10-05 03:06:35 +00:00
David Malone 2bc21ed985 Hopefully improve control message passing over Unix domain sockets.
1) Allow the sending of more than one control message at a time
over a unix domain socket. This should cover the PR 29499.

2) This requires that unp_{ex,in}ternalize and unp_scan understand
mbufs with more than one control message at a time.

3) Internalize and externalize used to work on the mbuf in-place.
This made life quite complicated and the code for sizeof(int) <
sizeof(file *) could end up doing the wrong thing. The patch always
create a new mbuf/cluster now. This resulted in the change of the
prototype for the domain externalise function.

4) You can now send SCM_TIMESTAMP messages.

5) Always use CMSG_DATA(cm) to determine the start where the data
in unp_{ex,in}ternalize. It was using ((struct cmsghdr *)cm + 1)
in some places, which gives the wrong alignment on the alpha.
(NetBSD made this fix some time ago).

This results in an ABI change for discriptor passing and creds
passing on the alpha. (Probably on the IA64 and Spare ports too).

6) Fix userland programs to use CMSG_* macros too.

7) Be more careful about freeing mbufs containing (file *)s.
This is made possible by the prototype change of externalise.

PR:		29499
MFC after:	6 weeks
2001-10-04 13:11:48 +00:00
Ruslan Ermilov 15821eba77 <mntopts.h> -> "mntopts.h" in SYNOPSIS.
Submitted by:	bde
2001-10-04 13:11:11 +00:00
Ollivier Robert 08870345f5 Following the discussion in -arch and the submission of a patch by bde, here
it is. I added the manpage change.

Submitted by:	bde
MFC after:	1 week
2001-10-04 12:15:50 +00:00
Crist J. Clark a17d5ec55d Documentation fixes:
- The '-d' option was not documented on the manpage or in the
    usage message.

  - The '-N' option was not included in the usage.
2001-10-02 08:24:37 +00:00
Ruslan Ermilov 32eef9aeb1 mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
Ruslan Ermilov 4ae29521b3 mdoc(7) police: fix markup. 2001-10-01 14:13:36 +00:00
David E. O'Brien 757eeda04b *** empty log message *** 2001-10-01 08:43:58 +00:00
Ian Dowse 2dc4ac06ce Enable bug-for-bug compatibility with mount_mfs when the program
name is "mount_mfs" or "mfs". Previously, the condition was that
the program name must start with "mount_", but this both missed
the case where mount(8) invokes mdmfs with argv[0] = "mfs", and it
included cases such as "mount_md" where compatibility is not
required.

Reviewed by:	dd
2001-09-30 15:14:16 +00:00
Ian Dowse 47f07d95ba Don't require that the special/filesystem argument translates into
a block or character device; the rest of tunefs works just fine on
filesystem images in regular files. Instead, if getfsfile() failed
and if the specified filesystem is a directory then print a more
useful "unknown file system" error.

Also, _PATH_DEV already contains a trailing slash, so don't add
another one when constructing a device path, and use errx() instead
of err() in a case where errno is meangingless.
2001-09-30 14:57:08 +00:00
Bill Fumerola b53adbbf93 now that jlemon has added a hash table to lookup locally configured ip
addresses (and the macros that ipfw(4) use to lookup data for the 'me'
keyword have been converted) remove a comment about using 'me' being a
"computationally expensive" operation.

while I'm here, change two instances of "IP number" to "IP address"
2001-09-29 06:33:42 +00:00
Luigi Rizzo 830cc17841 Two main changes here:
+ implement "limit" rules, which permit to limit the number of sessions
   between certain host pairs (according to masks). These are a special
   type of stateful rules, which might be of interest in some cases.
   See the ipfw manpage for details.

 + merge the list pointers and ipfw rule descriptors in the kernel, so
   the code is smaller, faster and more readable. This patch basically
   consists in replacing "foo->rule->bar" with "rule->bar" all over
   the place.
   I have been willing to do this for ages!

MFC after: 1 week
2001-09-27 23:44:27 +00:00
Ian Dowse 2510719736 The -A option (beep when packets are dropped) didn't work quite
right; after a single packet was dropped it beeped after every
transmission.

Change its implementation to only output a bell when there is an
increase in the maximum value of the number of packets that were
sent but not yet received. This has the benefit that even for very
long round-trip times, ping -A will do roughly the right thing
after a few inital false-positives.

Reviewed by:	ru
2001-09-25 20:22:33 +00:00
Robert Watson 2d742f7bbc o Reduce userland inclusion of kernel headers -- remove unneeded include
of <sys/mbuf.h>.

Reviewed by:	jlemon
2001-09-24 15:00:16 +00:00
Luigi Rizzo 32f967a3c0 A bunch of minor changes to the code (see below) for readability, code size
and speed. No new functionality added (yet) apart from a bugfix.
MFC will occur in due time and probably in stages.

BUGFIX: fix a problem in old code which prevented reallocation of
the hash table for dynamic rules (there is a PR on this).

OTHER CHANGES: minor changes to the internal struct for static and dynamic rules.
Requires rebuild of ipfw binary.

Add comments to show how data structures are linked together.
(It probably makes no sense to keep the chain pointers separate
from actual rule descriptors. They will be hopefully merged soon.

keep a (sysctl-readable) counter for the number of static rules,
to speed up IP_FW_GET operations

initial support for a "grace time" for expired connections, so we
can set timeouts for closing connections to much shorter times.

merge zero_entry() and resetlog_entry(), they use basically the
same code.

clean up and reduce replication of code for removing rules,
both for readability and code size.

introduce a separate lifetime for dynamic UDP rules.

fix a problem in old code which prevented reallocation of
the hash table for dynamic rules (PR ...)

restructure dynamic rule descriptors

introduce some local variables to avoid multiple dereferencing of
pointer chains (reduces code size and hopefully increases speed).
2001-09-20 13:52:49 +00:00
Peter Wemm 12f8604fde Deal with nfs server module changes for autoloading. 2001-09-20 02:18:06 +00:00
Peter Wemm 4a0785aaff Deal with module name changes and autoloading. 2001-09-20 02:15:17 +00:00
Ruslan Ermilov 4387c7c2af Non-decimal ``skipto'' rule numbers are meaningless.
Noticed by:	"Marc G. Fournier" <scrappy@hub.org>
MFC after:	3 days
2001-09-19 15:12:14 +00:00
Peter Wemm 9119623471 Userland part of nfs client/server split and cleanup. 2001-09-18 23:34:44 +00:00
Jonathan Lemon 5fc10eaf8e Split hwcsum into rxcsum and txcsum components. 2001-09-18 20:13:48 +00:00
Jonathan Lemon f35b9d165f Teach ifconfig about the new interface capability words. 2001-09-18 17:43:30 +00:00
Andrew Gallatin c97e08fb94 fix savecore so that it works on the alpha after the size change
of dumpmag from an int to a u_long in rev 1.41 -- without this
change, savecore will always fail like this:

#savecore -v /var/crash
dumplo = 874356736 (1707728 * 512)
savecore: magic number mismatch (8fca0101 != 8fca0101)
savecore: no core dump
2001-09-13 21:19:13 +00:00
Ruslan Ermilov cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
Ruslan Ermilov 69f568ec4d Use ${MACHINE}, it works with cross-builds. 2001-09-12 12:21:08 +00:00
Ruslan Ermilov 8083488514 mdoc(7) police: restore fix in rev. 1.52; .Dt should be in CAPITALS. 2001-09-11 10:00:48 +00:00
Ruslan Ermilov e8ae41c3db mdoc(7) police: restore the correct sorting of SEE ALSO. 2001-09-11 09:58:34 +00:00
Ruslan Ermilov 35ef781131 mdoc(7) police: markup nits, improve -W option text,
mount_msdos(8) is called mount_msdosfs(8) nowadays.
2001-09-11 09:57:31 +00:00
Ruslan Ermilov 5788dd0ee8 Removed -M and -N from getopt(3) call as well. 2001-09-11 09:49:36 +00:00
Greg Lehey 65aeaec006 Use a better stripe size in the examples.
Noted by:	Sean Eric Fagan <sef@kithrup.com>
2001-09-09 02:23:06 +00:00
Semen Ustimenko cc6b9b02be Stole unicode translation table from mount_msdos. Add kernel code
to support this translation.

MFC after:	2 weeks
2001-09-08 23:03:52 +00:00
Kris Kennaway dff462c363 * Switch from doing compress(1)ed crashdumps with the -z flag to using
gzip(1).  gdb doesn't understand these, but then again it didn't
  understand compressed crashdumps either.
* Change a stray lseek() into a Lseek()
* Remove the extraneous prototype for log() which has apparently never
  existed in FreeBSD's sources

Obtained from:  NetBSD (partially)
MFC after:      2 weeks
2001-09-06 09:30:09 +00:00
Dima Dorfman f328d583a2 Use CFLAGS, not COPTS, in the Makefile. bsd.prog.mk conveniently adds
COPTS towards the end of final CFLAGS so that it can be used to
override Makefile and other defaults.  Using it in Makefiles risks
having options set using it clobbered when somebody uses it on the
command line.

Approved by:	bde
2001-09-05 20:10:59 +00:00
Ruslan Ermilov 4a315a9af3 SECURITY.
Notify operators using wall(1)'s -g option.
Drop ``setgid tty'' privilege.

Obtained from:	OpenBSD
MFC after:	1 month
2001-09-05 15:37:01 +00:00
Ruslan Ermilov 857dcea0fe The defaults for bsize and fsize were interchanged.
PR:		docs/30330
2001-09-05 08:51:21 +00:00
Ruslan Ermilov d6669bbcc2 Don't reinvent the wheel; use strptime(3).
MFC after:	2 weeks
2001-09-04 16:17:17 +00:00
Ruslan Ermilov ee355dcb9e mdoc(7) police: removed hard sentence breaks. 2001-09-04 09:28:48 +00:00
Poul-Henning Kamp ae919cce4a Duh! forgot this bit of the NCCD patch.
Submitted by:	sobomax
Reviewed by:	phk
2001-09-04 09:19:48 +00:00
Murray Stokely cc2a5b08a7 Mention collision attacks on MD5. From the md5(3) man page.
PR:		docs/14158
Reviewed by:	kris
Submitted by:	Eric Frias <efrias@sg505.net>
2001-09-04 01:01:07 +00:00
Jonathan Lemon 050783e980 IPFilter source code in contrib/ipfilter apparently can't make up its mind
where the headers should live, as the code references both "ip_fil.h" and
"netinet/ip_fil.h" (among others).  As a consequence, put both
sys/contrib/ipfilter and sys/contrib/ipfilter/netinet to the include path
so either variant works.

PR: 29384
Pointed out by: Thomas.Quinot@Cuivre.FR.EU.ORG
2001-09-03 16:37:16 +00:00
Ruslan Ermilov 3b7e5ccc6a SECURITY: Drop `setgid kmem' bit as early as possible. 2001-08-31 16:26:37 +00:00
Ruslan Ermilov 162c0b2eff Synch with NetBSD and OpenBSD.
Allow non-superuser to open, listen to, and send safe commands on the
routing socket.  Superuser priviledge is required for all commands
but RTM_GET.

Lose `setuid root' bit of route(8).

Reviewed by:	wollman, dd
2001-08-31 12:31:09 +00:00
Ruslan Ermilov 860ca8fd85 restore(8) doesn't need to be setgid `tty', and never did.
At the times, restore(8) and rrestore(8) were the different
utilities.  rrestore(8) was installed setuid `root', while
restore(8) with usual ownership and privileges.  Later on,
on August 28, 1991 (what a coincidence!), rrestore(8) code
was merged with restore(8).  The setgid `tty' bit then was
accidentally put.
2001-08-30 09:18:55 +00:00
Peter Wemm 241ca2287a Banish hard-coded KERNBASE references from savecore. Dynamically
adjust to whatever kernbase is in the kernel that we are dumping.
2001-08-24 09:26:17 +00:00
Yaroslav Tykhiy b8a7fd3f3f `create'' and `destroy'' are command modifiers (.Cm), not flags (.Fl). 2001-08-22 18:37:47 +00:00
Ruslan Ermilov 265c01df49 mdoc(7) police: Fixed broken xrefs. 2001-08-22 14:16:31 +00:00
Brian Somers 9cfe90fe1f Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 14:53:05 +00:00
Brian Somers 327e849ae1 Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 12:56:45 +00:00
Dima Dorfman a5ef8459cc Fix grammar. 2001-08-20 02:16:41 +00:00
Dima Dorfman b9595aa55f Respect the -N flag when changing directory attributes in setdirmode).
PR:		29671
Submitted by:	Sascha Blank <sblank@addcom.de>
2001-08-20 02:15:22 +00:00
Kris Kennaway 5979df34a6 Silence non-constant format string warnings by marking functions
as __printflike()/__printf0like(), adding const, or adding missing "%s"
format strings, as appropriate.

MFC after:	2 weeks
2001-08-19 08:19:37 +00:00
Brooks Davis 1ce95f7862 Actuall make plumb work in addition to create as per the manpage.
PR:		bin/29812
Submitted by:	Joao Carlos Mendes Luis <jonny@eng05.embratel.net.br>
2001-08-17 22:16:11 +00:00
Ruslan Ermilov f1845f5ba8 mdoc(7) police: restore markup bit that got accidentally lost in rev. 1.44. 2001-08-16 11:31:18 +00:00
Ruslan Ermilov 9916c5d299 mdoc(7) police: replace \*(Ba' with a simple |', it's handled specially. 2001-08-16 11:09:00 +00:00
Ruslan Ermilov 6a68a83e56 mdoc(7) police: Section cross-references are marked with .Sx.
-compat is not a valid keyword.
2001-08-16 07:43:16 +00:00
Dima Dorfman f7acb7e404 Implement a better compatibility mode with mount_mfs. It is the
default if the executable is named (called as) "mount_*", or can be
enabled with the -C option.  This allows users to leave their old
fstab entires unchanged (modulo symlink'ing mdmfs to mount(md|mfs))
and have things behave the way they should (by emulating mount_mfs
silliness), while still allowing mdmfs to be used as a generic
make-an-md-and-mount-it type thing.

Right now, the only effects of this option is to set the mount-point
mode to 01777 as if "-p 1777" was given, and to complain about getting
command-line options that mount_mfs didn't take (e.g., -X, -L, et al).
The latter is mostly to try to catch operator errors.

Also implement -U, which turns on soft-updates.  It's redundant (since
softdep is the default), but implement it anyway for compatibility.
2001-08-16 02:40:29 +00:00