Commit Graph

4420 Commits

Author SHA1 Message Date
phk
704b01603a Give natd multi-instance capabilities.
This makes it possible to do load-sharing on two xDSL lines etc.
2004-07-04 12:53:54 +00:00
ru
bc58a1e574 One more hard sentence break. 2004-07-03 23:01:44 +00:00
pjd
fba777f30c Grammar nits.
Submitted by:	David Magda <dmagda@ee.ryerson.ca>
2004-07-03 08:36:09 +00:00
ru
d9e4eb9285 Deal with double whitespace. 2004-07-03 00:13:43 +00:00
ru
46fddaa54b Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
pjd
7f4ea6942f Introduce GEOM_LABEL class.
This class is used for detecting volume labels on file systems:
UFS, MSDOSFS (FAT12, FAT16, FAT32) and ISO9660.
It also provide native labelization (there is no need for file system).

g_label_ufs.c is based on geom_vol_ffs from Gordon Tetlow.
g_label_msdos.c and g_label_iso9660.c are probably hacks, I just found
where volume labels are stored and I use those offsets here,
but with this class it should be easy to do it as it should be done by
someone who know how.
Implementing volume labels detection for other file systems also should
be trivial.

New providers are created in those directories:
/dev/ufs/ (UFS1, UFS2)
/dev/msdosfs/ (FAT12, FAT16, FAT32)
/dev/iso9660/ (ISO9660)
/dev/label/ (native labels, configured with glabel(8))

Manual page cleanups and some comments inside were submitted by
Simon L. Nielsen, who was, as always, very helpful. Thanks!
2004-07-02 19:40:36 +00:00
arun
c0b5079fea Bump up the date and add spaces around commas. Thanks to ru@ for noticing. 2004-07-02 18:39:15 +00:00
ru
08228faf09 Deal with harmful leading whitespace. 2004-07-02 18:37:52 +00:00
arun
dce79fc81a Added the ability to create and display Linux/Windows GPT partitions to gpt(8). 2004-07-01 22:27:12 +00:00
imp
3c5c35a72b Create a unix domain socket and write to it all the events that come
in over the socket.
2004-07-01 07:24:18 +00:00
sobomax
8ce714e6e3 o Fix semantics of comparison function for qsort(3). According to qsort(3)
manpage:

     The comparison function must return an integer less than, equal to, or
     greater than zero if the first argument is considered to be respectively
     less than, equal to, or greater than the second.

  Therefore, simply returning "arg1 > arg2" is incorrect. Actually it works
  but for the number of items to be sorted less than 7 due to special case
  handling in qsort(3);

o add missing '\n' to one of usage() calls.

Approved by:	phk
2004-06-25 13:04:49 +00:00
eik
65e528a8ff fix handling of an unknown progeam name
Noticed by:	Joshua Goodall <joshua@roughtrade.net>
Approved by:	ru
2004-06-22 09:18:50 +00:00
pjd
df25a03253 Print mediasize in human readable form as well. 2004-06-21 09:20:06 +00:00
iedowse
516e3c359b Print the `99.99% done, finished soon' message only as often as the
normal status messages. Previously a large number of these new
messages could be spewed out towards the end of a dump.

Reviewed by:	imp
2004-06-19 22:41:18 +00:00
green
0ff326a04e Note that conscontrol set and unset are an interface for TIOCCONS. 2004-06-18 20:06:04 +00:00
joerg
792b42bf42 Fix indentation of continuation lines to (hopefully) comply with
style(9).

Reminded by:	bde
2004-06-18 15:08:08 +00:00
green
0202a06259 Add to conscontrol(8) "set" and "unset" commands which modify the
virtual console set-up.  Specifically, "conscontrol unset" will cause
printf(9) output to start going to the console again.
2004-06-18 06:33:44 +00:00
pjd
74169a273f Add missing newlines. 2004-06-17 06:04:14 +00:00
mlaier
f60cf9b58b Commit userland part of pf version 3.5 from OpenBSD (OPENBSD_3_5_BASE). 2004-06-16 23:39:33 +00:00
pjd
089ffc2ca6 Implement 3 new functions:
- g_lcm() - calculates Least Common Multiple of two given values,
		it is helpful when we need to find sector size for provider
		which is based on disks with different sector size;
	- g_get_mediasize() - returns media size of given provider;
	- g_get_sectorsize() - returns sector size of given provider;
Those function aren't used now, but are used by geom_mirror which will be
committed soon.
2004-06-16 10:44:26 +00:00
bms
5bae048b01 When parsing an argument as an address in getaddr(), heed the -host option
in all cases.  The failure mode in the PR is easily reproducible without
this patch.

PR:		bin/43139
2004-06-16 06:29:41 +00:00
bms
84b5fefda5 Turn on RFC 1724 compliant behaviour with regards to IP_ADD_MEMBERSHIP;
routed should be able to specify multicast memberships to be added by
interface index. This should fix the unnumbered / point-to-point case
for RIPv2.

PR:		bin/51927
Requested by:	Eugene Grosbein
2004-06-16 05:08:57 +00:00
pjd
baa68ba11e Connect geom(8) to the build.
Reminded by:	des
2004-06-15 17:31:35 +00:00
bms
ca5dd87a5d Ignore kernel routes with the RTF_WASCLONED flag set. This is a slight
modification of a patch which was already applied for BSD/OS in the
Rhyolite.com sources; this file is already off the vendor branch.

PR:		bin/57484
Submitted by:	Richard Perini
2004-06-15 00:23:26 +00:00
bms
7f82e9bad3 mdoc(7) police
Submitted by:	ru
2004-06-14 19:31:10 +00:00
bms
c8b9db3b58 Wordsmith the BUGS section re: IPv6 link-local addresses.
PR:		docs/66541
Submitted by:	Michel Lavondes (with some cleanups/additions)
2004-06-14 16:04:59 +00:00
phk
354d52981a Make fdisk initialize the first instead of the last slice by default. 2004-06-14 07:21:19 +00:00
le
74769ce0e6 Add gvinum, the geom_vinum userland tool. 2004-06-12 21:22:47 +00:00
eik
6ce46a0816 Add sha1 and rmd160 checksum tools.
Since the algorithms are already supported in libmd,
the size increase is small when a dynamic root is used.

Approved by:	joerg, ru
MFC after:	2 weeks
2004-06-11 16:07:02 +00:00
joerg
24688fcbd1 Cast the arguments to make_h_number() to uintmax_t before multiplying
them...  Otherwise the result will be truncated anyway.
2004-06-11 11:41:33 +00:00
ru
08b51f3241 Fixed a bug spotted by compiling with -Wall. 2004-06-10 07:51:11 +00:00
ru
27bed143c8 Introduce a new feature to IPFW2: lookup tables. These are useful
for handling large sparse address sets.  Initial implementation by
Vsevolod Lobko <seva@ip.net.ua>, refined by me.

MFC after:	1 week
2004-06-09 20:10:38 +00:00
ru
e42a7fd928 Reapply traditionally lost fixes, fixed some more.
This manpage needs an English clenup.
2004-06-05 20:22:15 +00:00
stefanf
2e7a36072a Typedefing an array of incomplete structs is non-standard C code.
Approved by:	das (mentor)
2004-06-02 23:02:31 +00:00
pjd
f53d93d179 Remove extra semicolon.
Inspired by:	fjoe
2004-06-02 21:21:10 +00:00
csjp
77c46c25ea o Move NEED1 macro to the top of the source file.
o Add sanity checking to the firewall delete operation
  which tells the user that a firewall rule
  specification is required.

The previous behaviour was to exit without reporting any
errors to the user.

Approved by:	bmilekic (mentor)
2004-06-02 21:12:55 +00:00
joerg
47c3b63625 ru's mdoc(7) style police was here.
Submitted by:	ru
2004-06-02 20:21:28 +00:00
joerg
3c677f61f4 Major overhaul of sunlabel(8).
. Implement option -c, all partition sizes will be calculated
  in cylinders as opposed to sectors.  Since the Sun label is
  inherently cylinder-based, this makes the job a little easier.

. Implement option -h, print the label in `human readable'
  size/offset format.

. Implement SVR4-compatible VTOC-style elements.  They are
  fully optional, defaulting to the current behaviour where no
  VTOC-style table will be written to disk.  However, if
  desired, the full functionality of the partitioning menu of
  Solaris' format(1m) is now offered (and even more).

. When editing the label, do not loop around edit_label() where
  a new template file is generated for each turn, this used to
  be annoying in that any possible syntax error caused a
  complaint, but then the template was created anew, so the
  user had to perform all their editing again.  Rather loop
  inside edit_label(), similar to bsdlabel(8), so in case of
  errors, the user will be presented their previous template
  file again.

. If VTOC-style elements are present, the overlap checks are
  made less stringent.  Overlaps will still be warned about,
  but overlaps of `unmountable' partitions against other ones
  are no longer fatal.  That way, e. g. VxVM encapsulated
  disk labels can be fully edited in FreeBSD (but not in
  Solaris ;-).

. In print_label(), generate the editing hints only if the -e
  flag is in effect.  Additionally, print a hint about the
  total number of sectors in the (hardware) medium.

. When editing a label, allow for changing the geometry
  emulation (and textual name) by modifying the "text:" line
  on top.  That way, a more effective emulation can be
  chosen.

. When editing/reading a label, additionally allow for the
  suffixes `s' (512-byte sectors), and `c' (cylinders) in the
  partition size field.

. Finally, turn the stub man page into something that really
  explains the entire thing.
2004-06-01 20:32:36 +00:00
le
6428c20edb Fix typo. 2004-05-30 17:40:39 +00:00
dwmalone
6671fde294 Use a better way to calculate POINTER_WIDTH suggested by pjd@. 2004-05-30 10:10:41 +00:00
dwmalone
49950e70c8 Decide how much space we need to print a pointer using
sizeof(void *) rather than if __alpha__ is defined.
2004-05-28 21:16:44 +00:00
pjd
a040fe460a Fix order. 2004-05-26 17:51:53 +00:00
pjd
069fe3e9ef Print provider's size in human-readable form as well. 2004-05-26 11:08:35 +00:00
le
ad65278a44 'ld' lists drives, not volumes. 2004-05-25 20:08:50 +00:00
pjd
5388d45e09 - Add a cross-reference to geom(8).
- Add missing 'a'.
2004-05-24 23:05:21 +00:00
pjd
9dfa070a47 Add manual page for geom(8) utility.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-24 23:03:29 +00:00
stefanf
5857c0ba2a Use the correct types for the functions rst_opendir(), glob_readdir() and
rst_closedir() which are called by glob().

Reviewed by:	md5
Approved by:	das (mentor)
2004-05-24 16:24:26 +00:00
stefanf
2edc0418f9 Include <timeconv.h> for time conversion functions.
Approved by:	das (mentor)
2004-05-24 16:10:57 +00:00
stefanf
f88a9f423c Include <sys/linker.h> for kldload().
Approved by:	das (mentor)
2004-05-24 13:39:06 +00:00
maxim
2b2f469df0 o Fix usage example.
PR:		docs/67065
Submitted by:	David Syphers
2004-05-23 19:05:59 +00:00
brueffer
6c819c3288 Fix typo
Submitted by:	edwin
2004-05-23 08:40:52 +00:00
pjd
b0a9931e9a Add standard command "help" to print usage. 2004-05-22 16:57:39 +00:00
pjd
ef31e6c3b5 Actually we are also able to list only choosen providers. 2004-05-22 16:17:57 +00:00
pjd
c75ca6dc1d Be more precise. 2004-05-22 10:53:06 +00:00
pjd
8ed5f6a137 style.Makefile(5). 2004-05-22 10:33:18 +00:00
pjd
50df38a36c Remove gconcat(8) utility. It was replaced by geom(8). 2004-05-21 22:38:49 +00:00
pjd
f1f2f04c6e - More clear example description.
- Fix copy&paste bug.
2004-05-21 22:35:18 +00:00
pjd
79048abe02 Add manual pages for gconcat(8), gstripe(8) and gnop(8) utilities.
Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-21 22:12:24 +00:00
imp
00e1e7a066 Enter the 1990's and assume that the computer knows what time it is.
Print the ETA of dump being finished, rather than a cryptic delta
time.  Also, if we have written more blocks than the tapesize, assume
that we are 99.99% done and that we'll be finished 'soon'.
2004-05-21 20:13:33 +00:00
pjd
b400b04c05 - Change command name from 'config' to 'configure'.
- Bump version number.
2004-05-21 15:23:48 +00:00
pjd
ccdf5be9ce Various style.Makefile(5) improvements.
Inspired by:	ru
2004-05-20 20:12:17 +00:00
pjd
ad72c978da Various style.Makefile(5) improvements.
Provoked by:	ru
2004-05-20 20:05:05 +00:00
ru
fb7ca181a0 Clean up language.
Reviewed by:	rik
2004-05-20 16:40:06 +00:00
des
9d30610b24 Whitespace cleanup. 2004-05-20 15:01:26 +00:00
pjd
8bae9ba9b3 Fix supposed compilation problem, using LIBDIR here can confuse core/
compilation.
2004-05-20 14:59:41 +00:00
pjd
3e714a6487 - Connect geom(8) and its libraries to the build.
- Connect geom_stripe and geom_nop modules to the build.
- Connect STRIPE and NOP classes to the LINT build.
- Disconnect gconcat(8) from the build.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:37:13 +00:00
pjd
2d3c7f90d7 Introduce geom(8)-specific shared libraries for CONCAT, STRIPE and NOP
GEOM classes. CONCAT should be 100% compatible with existing gconcat(8)
utility, which is going to be removed.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:24:23 +00:00
pjd
b6dce981e7 Bring in geom(8) utility. It is an universal utility for operating on
GEOM classes. It works by loading a shared library via dlopen(3) mechanism
with class-specific code, it is also responsible for communicating with
GEOM via libgeom(3).
Per-class shared libraries are going to be stored in /lib/geom/ directory.
It provides also few standard commands like 'list', 'load' and 'unload'
for existing classes which aren't aware of geom(8).
More info will be send on freebsd-current@ mailing list.

Supported by:	Wheel - Open Technologies - http://www.wheel.pl
2004-05-20 10:09:56 +00:00
scottl
fe4d2929f5 Improve the delay algorithm used in bgfsck. From the author:
shuffles the timing and sleep calls in bgfsck from:

 sleep timer_on io timer_off io io io io io io io
   to
 sleep io io io io io io io timer_on io timer_off

 The original method basically guaranteed that the timed I/O included a
 disk seek every time, which made bgfsck sleep for much longer than
 necessary.

Submitted by:   Dan Nelson
Reviewed by:    kirk
2004-05-18 19:51:41 +00:00
stefanf
5aa1920310 Remove spurious semicolons.
Approved by:	das (mentor)
Reviewed by:	ipfw@
2004-05-18 13:57:37 +00:00
ru
4e45410d6e Markup overhaul. 2004-05-18 07:23:37 +00:00
ru
479e3fd631 Markup nits. 2004-05-17 21:24:06 +00:00
ru
5299a4a0f7 Correct existing usage lines, add two more. 2004-05-17 21:11:35 +00:00
ru
72b515d266 Markup nits. 2004-05-17 21:05:39 +00:00
ru
d93de8e986 Markup and grammar nits. 2004-05-17 20:58:42 +00:00
ru
826e635fc0 Markup overhaul. 2004-05-17 20:45:21 +00:00
ru
f6aa4621fd Assorted markup, grammar, and spelling fixes. 2004-05-17 08:35:43 +00:00
ru
d268c01ce2 Reapply local changes that got simply axed by the latest KAME merge.
Fixed some more markup.
2004-05-17 08:25:15 +00:00
ru
9c53502419 Added -l to usage(). 2004-05-17 07:07:20 +00:00
cognet
797424d85b Use WARNS?=3 for these in the arm case for now, due to toolchain issues. 2004-05-14 13:31:21 +00:00
ume
e439e07721 check if the null encryption is supported or not.
Requested by:	bms
Obtained from:	KAME
2004-05-13 15:46:28 +00:00
ru
ddc2fcfc4f Polish the mdoc(7) markup. 2004-05-12 07:34:05 +00:00
hmp
b8388ce606 Use strlcpy(3) instead of strcpy(3).
PR:          	46761

Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
2004-05-10 22:33:12 +00:00
csjp
02de288baa Remove redundant sanity check before add_mac() when adding
mac ipfw rules. The exact same sanity check is performed as
the first operation of add_mac(), so there is no sense
in doing it twice.

Approved by:	bmilekic (mentor)
PR:		bin/55981
2004-05-09 01:53:31 +00:00
csjp
60a433f4c8 Teach route(8) how to deal with root being in a prison. If prison
root is allowed to create raw sockets, then they will be able to create
routing sockets, too.  However prison-root is not able to manipulate
routing tables.  So when route(8) attempts to write to a routing
socket and recieves EPERM from the kernel, exit rather than moving
on with execution.

Approved by:    bmilekic (mentor)
2004-05-07 15:33:17 +00:00
joerg
cfc5073355 When editing a Sun label, make the search for a valid partition line
violate POLA a little less by not requiring exactly two spaces in front
of the entry (and silently discarding any non-matching entry).  We now
recognize anything starting with a letter followed by a colon as the
first non-space chars as a partition entry.
2004-05-04 09:50:41 +00:00
bde
fff477ffd4 Include <sys/time.h> for the declaration of struct bintime instead of
depending on namespace pollution in <sys/stat.h>.  struct bintime is
only needed to satisfy leakage of kernel interfaces to userland and
namespace bugs in those interfaces...
2004-05-04 07:08:04 +00:00
pjd
8e85a8db26 Add missing command. 2004-05-03 21:31:19 +00:00
pjd
c1a10eac03 Add missing commands. 2004-05-03 21:29:22 +00:00
pjd
364696c35d Connect ggatec(8), ggated(8) and ggatel(8) to the build. 2004-05-03 21:14:03 +00:00
pjd
9a8678bb77 Don't repeat handshake.
This little thing can cause a deadlock, because taste mechanism start
to work after creation of ggate provider and I/O requests are sent from
other classes from the g_event thread, so number of pending events isn't 0.
Now ggatec(8) start second handshake and ggated(8) is trying to open
GEOM provider (for example md(4)) and it can't, because it hangs on
g_waitidle() in g_dev_open(). g_waitidle() cannot finish because
there is a pending read on event queue, and this read can't be
finished, because ggated(8) can't open target device.
GEOM Gate will recover from this deadlock, because requests will
timeout, but it of course isn't the best solution and I don't know
better one for now, so we should avoid opening GEOM providers while
there are pending requests in event queue.
2004-05-03 18:24:41 +00:00
andre
5ecba3f8bc Link state change notification of ethernet media to the routing socket.
o Print the link state for interface messages in monitor mode.

No objections by:	sam, wpaul, ru, bms
Brucification by:	bde
2004-05-03 16:30:32 +00:00
pjd
ffd473d54b Paths correction.
Pointed out by:	ache, make buildworld
2004-05-03 07:21:59 +00:00
pjd
7e21b7fd59 We don't need this any more, while we have /usr/include/geom/concat/. 2004-05-03 07:20:27 +00:00
pjd
1867695ee6 Fix compiling on 64-bit architectures. 2004-05-02 17:59:49 +00:00
marcel
7e187e2ba9 Build gpt(8) on all platforms, except sparc64. Currently gpt(8) is
not endian agnostic and thus will create big-endian GPTs on sparc64.
This we don't support. So, before gpt(8) can be used on a big-endian
machine, it has to deal with the endianness.
2004-05-01 18:17:23 +00:00
ambrisko
8abe6632d3 For both ifconfig and route if we didn't get enough memory from the
prior sysctl due to the structure growing between calls try again.

Also try again for deleting routes if things fail.  We've seen
route -f fail this way which does not actually flush all routes.
This fixes it.  It will whine but it will do the work.

PR:		56732
Obtained from:	IronPort
2004-04-30 22:34:12 +00:00
pjd
71ff258eed GEOM Gate network daemon. 2004-04-30 16:19:50 +00:00
pjd
68969eb22f GEOM Gate network client and control utility. 2004-04-30 16:18:01 +00:00
pjd
bbe94a6e43 GEOM Gate local control utility. 2004-04-30 16:15:13 +00:00
pjd
b0399e5dba Stuff shared between ggate utilities. 2004-04-30 16:13:45 +00:00
pjd
dbf20e6f7f Makefile for building ggate utilities: ggatel(8), ggatec(8), ggated(8). 2004-04-30 16:12:20 +00:00
ghelmer
3739062957 Invoke tzset(3) within the main loop to catch changes to /etc/localtime
when running as a daemon in the hope that it will fix situations
where the CMOS clock was apparently set using the stale TZ offset.
2004-04-27 14:43:03 +00:00
bmilekic
788a94ec83 The previous change to mount(8) to report ufs or ufs2 used
libufs, which only works for Charlie root.

This change reverts the introduction of libufs and moves the
check into the kernel.  Since the f_fstypename is the same
for both ufs and ufs2, we check fs_magic for presence of
ufs2 and copy "ufs2" explicitly instead.

Submitted by: Christian S.J. Peron <maneo@bsdpro.com>
2004-04-26 15:13:46 +00:00
andre
d4f49f008f Add the option versrcreach to verify that a valid route to the
source address of a packet exists in the routing table.  The
default route is ignored because it would match everything and
render the check pointless.

This option is very useful for routers with a complete view of
the Internet (BGP) in the routing table to reject packets with
spoofed or unrouteable source addresses.

Example:

 ipfw add 1000 deny ip from any to any not versrcreach

also known in Cisco-speak as:

  ip verify unicast source reachable-via any

Reviewed by:	luigi
2004-04-23 14:28:38 +00:00
tjr
86f07d4f93 Only compare the interesting part of the bootblock with its backup.
Allow check to proceed with bad backup boot block if we're doing a
readonly check. Various typos in comments.

Obtained from:	NetBSD
2004-04-20 11:41:57 +00:00
rees
cc363f9f35 use %zu instead of %zd
Requested by:	Bruce Evans
2004-04-15 16:12:12 +00:00
luigi
ce58934c26 Replace ROUNDUP/ADVANCE with SA_SIZE 2004-04-13 11:24:43 +00:00
green
581462d465 Add -P arguments for dump(8) and restore(8) which allow the user to
use backup methods other than files and tapes.  The -P argument is
a normal sh(1) pipeline with either $DUMP_VOLUME or $RESTORE_VOLUME
defined in the environment, respectively.

For example, I can back up my home to three DVD+R[W]s as so:
Filesystem  1K-blocks     Used    Avail Capacity  Mounted on
/dev/ad0s2e  40028550 10093140 26733126    27%    /home
green# dump -0 -L -C16 -B4589840 -P 'growisofs -Z /dev/cd0=/dev/fd/0' /home
2004-04-13 02:58:06 +00:00
green
92223ccc32 Improve the warnings for dump -L and do not bother doing the snapshot if
it is specified for read-only filesystems.

Submitted by:   Jason Young <jyoung8607@hotmail.com>
PR:     46672
2004-04-12 20:19:32 +00:00
ru
04fb5a0de8 Document that -m also causes the capability list to be displayed. 2004-04-11 13:44:57 +00:00
ru
dd9ed98446 Added the new interface capability option for drivers that implement
user-configurable polling(4) support.  Make ifconfig(8) aware of it.

Suggested by:	luigi
2004-04-11 13:36:52 +00:00
bde
5a496233ec Fixed unformatting of copyright clause 4 in previous commit. 2004-04-10 02:22:35 +00:00
markm
90f91e7879 Remove advertising clause from University of California Regent's license,
per letter dated July 22, 1999.

Approved by: core, imp
2004-04-09 19:58:40 +00:00
maxim
7c2d493645 o Fix an incorrect parsing of 0.0.0.0/0 expression.
PR:		kern/64778
MFC after:	6 weeks
2004-04-09 17:26:01 +00:00
iedowse
e5237a493b Don't turn off the regular SIGINFO status information. The use of
the NOKERNINFO flag only marginally de-clutters the output and
has a number of unwanted side effects:
  o The kernel info might be what you want to see
  o ^T is left non-functional if ping is killed non-cleanly
  o "ping -q foo &" gets suspended on tty output

Encouraged by:	bde
2004-04-07 18:48:11 +00:00
pjd
28ff3ddda6 Add a workaround.
Now, if we have for example: ad0s1 ad0s1c ad2s1 ad2s1c and we will try
to do: gconcat label foo /dev/ad0s1 /dev/ad2s1 we'll get a panic:
panic: spoiled but dcr = 1
for inside of geom_slice class, backtrace shows:
g_access()
g_slice_access()
g_access()
g_concat_read_metadata()
We need to get a proper fix for this race before geom(8) will be committed.
2004-04-04 13:32:00 +00:00
phk
206a45d61b Fix an off-by-one error in the function used to input the ascii/hex strings.
Be a little bit more helpful in error messages.
2004-04-04 07:28:58 +00:00
bde
c807fa08f5 Include <time.h> instead of depending on namespace pollution in <sys/stat.h>
for the declaration of time().
2004-04-04 04:17:07 +00:00
mux
a69a7e8d18 It seems growfs(8) is now WARNS?=6 safe.
Tested on:	alpha, i386, ia64, sparc64
2004-04-03 23:56:24 +00:00
mux
3ceb770141 Fix the remaining warnings of growfs(8) on my sparc64 box with
WARNS=6.  I don't change the WARNS level in the Makefile because I
didn't tested this on other archs.

The fs.h fix was suggested by:	marcel
Reviewed by:	md5(1)
2004-04-03 23:30:59 +00:00
mux
6ecbf96a8e - Don't abuse caddr_t when what we really want is a void *.
- Use the %jd format and a cast to intmax_t to print an int64_t.
- The return type of getopt() is an int, not a char.

This fixes some warnings but there's still much more work to do here.
2004-04-03 22:56:54 +00:00
le
7ffed5b360 Temporarily go back to WARNS=0 until I can figure out what's breaking
the {powerpc, sparc64, ia64} tinderboxes.

Sorry for the noise. :-(
2004-04-03 22:26:43 +00:00
le
9b622e32d9 Make growfs WARNS=6 clean.
Approved by:	grog (mentor)
2004-04-03 17:40:19 +00:00
johan
30a416556d Remove these MAINTAINER lines since the maintainers has had their
commit bits retired for safe keeping.
2004-04-01 20:31:49 +00:00
bms
37a21337e3 Fix regression in setkey whereby parser would fail to recognise tcp as
both a security protocol and an upper level protocol for encapsulation.

PR:		bin/63616
Submitted by:	ume@
2004-03-31 18:38:02 +00:00
luigi
7d2b7cf0e9 Implement a '-f' flag to teach bsdlabel to work on files instead of
disk partitions.
2004-03-30 23:15:03 +00:00
sam
0242ed134b add support for setting 802.11 rtsthreshold, transmit power,
and 11g protection mode

Reviewed by:	imp (just code)
2004-03-30 22:59:22 +00:00
dwmalone
8432facd78 Remove a stray \n from a setproctitle.
Submitted by:	Niki Denev <nike_d@cytexbg.com>
2004-03-30 20:01:25 +00:00
ceri
77f01944ce Backout revision 1.140; it seems that the previous version is clear
enough.

Requested by:	ru
2004-03-27 14:13:53 +00:00
le
8deb46de83 Don't read an inode which isn't used to avoid problems on UFS2 where not
all inodes are initialized when running newfs.

Approved by:    grog (mentor)
2004-03-26 23:42:32 +00:00
rees
d5e8f62700 fix for 64-bit arch:
use %zd to print size_t types and sizeof()

Approved by:	alfred
Tested on:	sparc64, amd64
2004-03-26 22:44:59 +00:00
maxim
b44c8fb7c5 o The lenght of the port list is limited to 30 entries in ipfw2 not to 15.
PR:		docs/64534
Submitted by:	Dmitry Cherkasov
MFC after:	1 week
2004-03-26 19:09:22 +00:00
bde
f32b255d3a Fixed some style bugs in the residue of rev.1.14 (mainly initialization in
declarations, uncuddled elses and excessive braces).
2004-03-26 16:11:13 +00:00
ru
74e1fa6daf Not too much point specifying -N but not specifying -M. 2004-03-26 09:24:45 +00:00
bde
1c06796286 Fixed some style bugs in or related to rev.1.13 (mainly misindentation of
the getopt() case statement).
2004-03-26 08:39:36 +00:00
rwatson
b7e237c3e1 Correct the definition of the multilabel flag: it enables multilabel
MAC support on the file system, if supported, which causes MAC to treat
each object as having its own label, rather than using a single label
for all objects on the file system.  This doesn't have to be used in
combination with the tunefs/newfs flags -- it's an alternative.
2004-03-26 03:26:15 +00:00
cperciva
6ebcbbb486 Final step of the sbin -> usr.sbin move: cvs rm src/sbin/nologin/*
I meant to do this a week ago, but I forgot.
2004-03-25 14:53:53 +00:00
ceri
4eac8b9f7d Clarify the description of the "established" option.
PR:		docs/50391
Submitted by:	root@edcsm.jussieu.fr
MFC after:	1 week
2004-03-22 21:24:38 +00:00
obrien
1741d64025 Share the i386 boot manual page. 2004-03-22 00:52:27 +00:00
peter
ccd389b7a3 Add initial support for compiling a special 32 bit version of
ld-elf.so.1 on 64 bit systems.  Most of this involves using alternate
paths, environment variables and diagnostic messages.

The build glue is seperate.
2004-03-21 01:21:26 +00:00
ru
11511b476d NULL -> 0. 2004-03-17 20:50:25 +00:00
scottl
57374797f1 Remove the RAIDframe userland tool. 2004-03-16 12:28:40 +00:00
jhb
5670428480 When installing boot blocks into an Alpha BSD label, setup the location,
length, and flags fields at the end of the SRM boot sector so that SRM can
find the bootstrap code.  This fixes bsdlabel -m alpha to generate bootable
disklabels.

Reviewed by:	phk
2004-03-15 23:10:34 +00:00
sos
127008a266 Add printing of relevant SATA info where approbiate. 2004-03-15 13:21:41 +00:00
jmallett
c228ea938a Validate argument to -i. 2004-03-15 03:41:07 +00:00
cperciva
c990ac0757 Don peril-sensitive glasses and throw the switch to move nologin(8) from
/sbin to /usr/sbin.  A symlink from /sbin/nologin -> /usr/sbin/nologin
is created for compatibility purposes.

This will probably not cause any problems, but anyone who is doing
anything particularly unusual with nologin(8) or shells in general might
be well advised to check that everything still works.

Bikesheds on:	cvs-all, current
2004-03-13 11:02:37 +00:00
cperciva
e1627f9ca5 Fix 10 year old size-of-bcopy bug.
PR:		bin/43930
Submitted by:	Alan Barrett
Approved by:	rwatson (mentor)
MFNetBSD:	revision 1.35
MFC after:	3 days
2004-03-13 00:11:05 +00:00
ru
f2b9d84260 The print mask's first part is the base, not the total number of bit
identifiers.
2004-03-12 23:52:32 +00:00
ru
1579b4cc4f Show the polling(4) flag on the interface. 2004-03-12 23:43:40 +00:00
bde
be31ea68bb Fixed mispellings of '\0' as NULL. 2004-03-11 11:41:54 +00:00
bde
1b963c9bef Fixed misspellings of 0 as NULL. 2004-03-11 10:01:12 +00:00
phk
0f56e66e2f Fix a long-standing deadlock issue with vnode backed md(4) devices:
On vnode backed md(4) devices over a certain, currently undetermined
size relative to the buffer cache our "lemming-syncer" can provoke
a buffer starvation which puts the md thread to sleep on wdrain.

This generally tends to grind the entire system to a stop because the
event that is supposed to wake up the thread will not happen until a fair
bit of the piled up I/O requests in the system finish, and since a lot
of those are on a md(4) vnode backed device which is currently waiting
on wdrain until a fair amount of the piled up ... you get the picture.

The cure is to issue all VOP_WRITES on the vnode backing the device
with IO_SYNC.

In addition to more closely emulating a real disk device with a
non-lying write-cache, this makes the writes exempt from rate-limited
(there to avoid starving the buffer cache) and consequently prevents
the deadlock.

Unfortunately performance takes a hit.

Add "async" option to give people who know what they are doing the
old behaviour.
2004-03-10 20:41:09 +00:00
bde
7432091236 Fixed a misspelling of 0 as NULL. 2004-03-10 08:46:39 +00:00
jhb
01eed200f9 Make libgeom usable by C++ programs:
- Add DECL wrappers to libgeom.h.
- Rename structure members in libgeom.h to use a lg_ prefix for member
  names.  This is required because a few structures had members named
  'class' which made g++ very unhappy.
- Catch gstat(8) and gconcat(8) up to these API changes.

Reviewed by:	phk
2004-03-09 21:14:18 +00:00
mlaier
6be47b725d Link pf to the build and install:
This adds the former ports registered groups: proxy and authpf as well as
the proxy user. Make sure to run mergemaster -p in oder to complete make
installworld without errors.

This also provides the passive OS fingerprints from OpenBSD (pf.os) and an
example pf.conf.

For those who want to go without pf; it provides a NO_PF knob to make.conf.

__FreeBSD_version will be bumped soon to reflect this and to be able to
change ports accordingly.

Approved by:	bms(mentor)
2004-03-08 22:03:29 +00:00
markm
0b0ae8e16e Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).

There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.

Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".

Tested on: i386 sparc64
2004-03-05 08:10:19 +00:00
brueffer
ccdcd4491d s/considred/considered/ 2004-03-04 00:52:16 +00:00
johan
eda438f852 Make this WARNS=2 clean by:
- including <timeconv.h> to get _long_to_time prototype
	- removing an unused variable

Bump WARNS to it keep clean.

Approved by:	ume on ipfw@
2004-03-03 20:21:15 +00:00
ken
ad706f7e3d Fix a couple of camcontrol issues that popped up on sparc64:
- bzero the CCB header in getdevtree() and set the path properly, to
   avoid having random garbage in the CCB header.
 - if the lun isn't specified in a device specifier, it should default to
   0, not whatever random data happens to be in the lun variable.
 - move the prototype for getdevtree() out from under #ifndef MINIMALISTIC,
   since it is used in both cases.

Submitted by:	Marius Strobl <marius@alchemy.franken.de> (mostly)
MFC After:	2 weeks
2004-03-03 01:51:24 +00:00
dd
ae9f26fffc Add CTLTYPE_QUAD to the list of types for which we don't want an empty
value.  All the other numeric types are doing it . . .
2004-03-02 05:42:52 +00:00
mlaier
54bb06645b Add skeleton build dirs for pf userland:
libexec/ftp-proxy	- ftp proxy for pf
 sbin/pfctl		- equivalent to sbin/ipf
 sbin/pflogd		- deamon logging packets via if_pflog in pcap format
 usr.sbin/authpf	- authentification shell to modify pf rulesets

Bring along some altq headers used to satisfy pfctl/authpf compile. This
helps to keep the diff down and will make it easy to have a altq-patchset
use the full powers of pf.

Also make sure that the pf headers are installed.

This does not link anything to the build. There will be a NO_PF switch for
make.conf once pf userland is linked.

Approved by:	bms(mentor)
2004-02-28 21:50:50 +00:00
maxim
c842ac8be9 o Remove obsoleted '-N' and '-d' flags. 2004-02-28 10:42:27 +00:00
maxim
ea5698cae7 o Sync usage() with reality: add 'z' flag.
MFC after:	1 week
2004-02-28 10:22:17 +00:00
scottl
d9a0004b62 In the case of a background fsck, periodically update the process title
with a progress update.
2004-02-28 07:50:42 +00:00
kan
75985f5938 Look for both name and if_<name> strings in module metadata. Pseudo-devices
like tun are naming their modules using the 'if_; prefix and previous version of
the code failed to detect their presence in the kernel, resulting in the same
module being loaded twice.
2004-02-27 06:43:14 +00:00
rwatson
2a43e75b09 Add a "-l" parameter to mdmfs so that memory file systems can be
created with the multilabel flag from inception.  This simply
passes the "-l" flag on to newfs(8).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:15:47 +00:00
rwatson
f0df387d84 Add a "-l" flag to newfs, which sets the FS_MULTILABEL flag. This
permits users of newfs to set the multilabel flag on UFS1 and UFS2
file systems from inception without using tunefs.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, McAfee Research
2004-02-26 01:14:27 +00:00
bms
d21d623f8e Sync HEAD sources to vendor branch import of routed v2.27 from rhyolite.com.
Update <protocols/routed.h> for the MD5 changes requested in bin/35843.
Preserve local changes.

Education by:	obrien, markm, pointy-stick
PR:		bin/35843 (and doubtless others)
2004-02-25 23:45:57 +00:00
bde
1c1e2e0d79 Fixed missing libraries. This unbreaks the -DNO_DYNAMIC_ROOT and
-DNOSHARED=yes cases.
2004-02-24 03:46:12 +00:00
johan
31854a224a style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
pjd
ccf29051b1 Connect gconcat(8) to the build.
Approved by:	scottl (mentor)
2004-02-23 20:06:56 +00:00
pjd
7da34efb47 - Connect manual page for gconcat utility to the build.
- Fix usage.

Approved by:	scottl (mentor) (implicity)
2004-02-23 20:06:21 +00:00
pjd
7918b291da Added manual page for gconcat utility.
Approved by:	scottl (mentor) (implicity)
Reviewed by:	simon
2004-02-23 12:44:08 +00:00
cperciva
fb7918f5d7 Report login attempts to syslog. Due to the statically-linked nature of
nologin(8), this causes a considerable (100K) increase in the binary size,
so I've added a NO_LOGIN_LOG option which disables this.

While I'm here, s/sizeof(MESSAGE)/sizeof(MESSAGE) - 1/, in order to
avoid writing the string-terminating zero byte.

No complaints from: -current
Approved by:	rwatson (mentor)
2004-02-22 10:03:24 +00:00
rees
d68e8ba04c change baduser and badgroup from -2 to 65534, 65533
these should probably be looked up instead, but this is better than before
also minor format changes for style(9)
2004-02-21 21:02:59 +00:00
yar
44ed42c915 We can cross-reference to vlan(4) as long as
the corresponding manpage has been committed.
The rest of "vlan" words, which are refering
to the technology itself, should be capitalized.

MFC after:	1 week
2004-02-21 14:21:18 +00:00
yar
2fbac50c91 The hardware tagging capability is set on the physical
interface that is parent to a vlan(4) interface,
not on the vlan(4) interface itself.
2004-02-21 14:11:57 +00:00
mux
14d69ee306 Mention that securelevel 1 also blocks access to /dev/io if it
exists (not all platforms have it).
2004-02-20 21:38:23 +00:00
tjr
7d791a5bef Merge from RELENG_4 1.28.2.13: Fix saving system crash dumps larger than
2 GB by using fseeko() instead of fseek().
2004-02-20 12:22:52 +00:00
phk
35bd1c71de s/bytes/byte/ 2004-02-19 19:53:07 +00:00
pjd
e035c01b86 Add control utility for disk concatenation (GEOM_CONCAT class).
Reviewed by:	phk, scottl
Approved by:	scottl (mentor)
2004-02-19 16:02:08 +00:00
dwmalone
4a80a9f041 Add a -n option that stops ip6fw making any changes to the rules
in the kernel.

Submitted by:	Orla McGann <orly@redbrick.dcu.ie>
MFC after:	3 weeks
2004-02-18 15:56:53 +00:00
rees
9a383d1448 remove dead code
Approved by:	alfred
2004-02-17 22:28:26 +00:00
grog
55590093d9 Report the difference between ufs and ufs2.
Submitted by:	"Christian S.J. Peron" <maneo@bsdpro.com>
2004-02-17 08:43:05 +00:00
grog
d2b4a8b498 Explain what console names are valid. 2004-02-17 04:53:47 +00:00
grog
431761e4b8 Recognize if the user supplies the full pathname to /dev/console and friends,
and DTRT.

Explain if he supplies a pathname that is not in /dev.
2004-02-17 04:51:06 +00:00
tjr
6ddcc8e1b3 Remove unnecessary newlines from errx() arguments. 2004-02-17 02:02:18 +00:00
le
3865a73090 Also remove "makedev" from the online help. 2004-02-16 23:04:52 +00:00
le
3d4d791def Since DEVFS is mandatory, remove all instances to make_dev*. Keep the
"makedev" command for backwards compatibility, but just print out an
informational message (this was the current behaviour, anyway) and remove
it from the documentation.

Approved by:     grog (mentor)
2004-02-16 09:23:59 +00:00
bde
e85c2c0c75 Support mounting ext2fs file systems with -async to the small extent
that ext2fs in the kernel supports async mounts.  ext2fs used to
effectively force the -async flag on.  -async for ext2fs only gives
async (more precisely, delayed) writes for inode updates, so it is
barely worth using even when it is safe.
2004-02-15 06:31:26 +00:00
le
54a86bd2b3 Remove unused variable and related bogus checks.
Approved by:    grog (mentor)
2004-02-14 01:13:41 +00:00
bms
9ce9891eda Initial import of RFC 2385 (TCP-MD5) digest support.
This is the second of two commits; bring in the userland support to finish.

Teach libipsec and setkey about the tcp-md5 class of security associations,
thus allowing administrators to add per-host keys to the SADB for use by
the tcpsignature_compute() function.

Document that a single SPI must be used until such time as the code which
adds support to the SPD to specify flows for tcp-md5 treatment is suitable
for production.

Sponsored by:	sentex.net
2004-02-11 04:34:34 +00:00
cperciva
788d9119de style cleanup: Remove duplicate $FreeBSD$ tags.
These files had tags after the copyright notice,
inside the comment block (incorrect, removed),
and outside the comment block (correct).

Approved by:	rwatson (mentor)
2004-02-10 20:48:08 +00:00
cperciva
d3296afe56 style cleanup: Remove duplicate $FreeBSD$ tags.
These files had tags at the start of the file
(incorrect, removed), and after the copyright
notices (correct).

Approved by:	rwatson (mentor)
2004-02-10 20:40:17 +00:00
trhodes
f4961068e0 Reorder Xrefs in SEE ALSO. 2004-02-10 06:44:41 +00:00
trhodes
0b5bed49c2 Update to inform users of acls and multilabel options. Add Xrefs to the
more relevant manual pages.

PR:		62394
Submitted by:	Marc Silver <marcs@draenor.org>
2004-02-10 06:33:29 +00:00
iedowse
5d8376d847 Further simplify the code for printing the message buffer:
- Ensure that the buffer ends with "\n\0" to avoid special cases
   and allow the use of strtol().
 - Use strvisx() on each complete line instead of character by
   character.

Submitted by:	bde
MFC after:	1 week
2004-02-08 23:08:53 +00:00
iedowse
05e08e2967 Certain ICMP error replies cause ping to perform a reverse DNS
lookup on an IP address from the packet (such as the IP that sent
a TTL exceeded error). If the DNS lookup takes a long time, ^C will
appear to be ineffective since the SIGINT handler just sets a flag
and returns. Work around this by exiting immediately on receipt of
a second SIGINT when DNS lookups are enabled.

PR:		bin/4696
MFC after:	1 week
2004-02-08 21:59:17 +00:00
phk
6c8d799cb9 Fix the last and most important bit of the test case to test the same
binary as the rest of it.

Add MD5 check that the md(4) device gets set up correctly.
2004-02-07 22:58:39 +00:00