Commit Graph

5006 Commits

Author SHA1 Message Date
Brooks Davis
3d0181db3f When we fail to aquire a lease, our lease expires without a sucessful
renewal, or we lose link, be more forceful about clearing interface
state so another interface that connects to the same network has a
chance of working.  This doesn't address attemping to connect to both at
once, but appears to allow unplugging from a wired interface and then
inserting a wireless card that associates with an AP bridged to the same
LAN.
2005-09-08 22:15:19 +00:00
Gary W. Swearingen
e17c0e3256 Moved descriptions of securelevels from init(7) to security(7).
Files used both "securelevel" and either "secure level" or
"security level"; all are now "security level".

PR:             docs/84266
Submitted by:   garys
Approved by:    keramida
MFC after:      3 days
2005-09-03 17:16:00 +00:00
Brooks Davis
40767e22ea When we supersed the subnet-mask, write the forced value to the lease
file.  This is what the ISC client does.

Submitted by:	Rostislav Krasny <rosti dot bsd at gmail dot com>
2005-09-02 17:35:35 +00:00
Marcel Moolenaar
5201042924 Add support for setting GPT partition labels. The partitions to be
labeled are selected in the same way as with the remove command.
Update the manpage to have the selection options described for the
label command and referenced to it from the remove command.
The label can be specified on the command line with the -l option
or read from a file with the -f option. In both cases, the label
is assumed to be encoded in UTF-8.

PR: ia64/83124
MFC after: 1 week
2005-09-01 02:49:20 +00:00
Marcel Moolenaar
376e47e284 Dot the i's: multiple devices can be specified, so the usage should
have ellipsis following the device.
2005-09-01 02:42:52 +00:00
Marcel Moolenaar
bdcb67f435 Add a comment before the statement that is responsible for the
removal of the GPT entry. There's a bit of code around that one
statement that it's good to have it stand out a bit more.
2005-09-01 01:15:22 +00:00
Marcel Moolenaar
6918ad7096 Document the -l and -u options of the show command. 2005-08-31 05:56:21 +00:00
Marcel Moolenaar
06185c565b o Replace unicode16() by utf8_to_utf16().
o  Introduce utf16_to_utf8().
o  Add option -l to the show command to display the GPT label instead
   of the friendly partition type.
o  Add option -u to the show command to suppress the friendly output
   and print th raw UUIDs instead.
2005-08-31 05:40:41 +00:00
Marcel Moolenaar
27e701229c /* -> /*- for license. 2005-08-31 01:47:19 +00:00
Brooks Davis
f954ec0bcf Introduce a new helper function check_search() derived for res_hnok to
check the domain-name parameter according to the rules for "search"
strings as documented in resolv.conf(5).  Specifically, the string must
be no more than 256 bytes long and contain no more than six valid domain
names separated by white space.

The previous unchecked values could result in a mangled resolv.conf
file which could effectively deny access to local sites.  This is not
a security issue as rogue dhcp servers could already do this without
sending invalid strings.

Reviewed by:	cperciva
MFC After:	3 days
2005-08-30 18:20:46 +00:00
Christian S.J. Peron
c313f09bfb When using files as backing stores for devices, and the user has requested the
device be created read+write, check to see if the backing store is read only
through the use of the access(2) system call. If this check fails returning
EACCES, EPERM or EROFS then gracefully downgrade the access to read only. Also
print a warning message to stderr, informing the user that the access mode
they requested is not available.

This behavior used to be handled by md(4) but was changed in revision 1.154

Discussed with:	pjd, phk, Dario Freni <saturnero at freesbie dot org>
Reviewed by:	phk
2005-08-30 16:45:32 +00:00
Marcel Moolenaar
4a8718928d This script was helpful during development, but has no reason to
be kept alive. Removal is long overdue as it is.
2005-08-30 06:20:20 +00:00
Marcel Moolenaar
14cbcc591c Don't print the total number of partitions removed now that we print
the name of the partitions that we remove. A summary is unnecessary
and even makes parsing of the output more difficult.

MFC after: 1 week
2005-08-30 06:16:31 +00:00
Maxim Sobolev
db45c56d7d Extend utility to allow recovering single file from the deffective
media.

MFC after:      2 weeks
2005-08-29 23:08:01 +00:00
Giorgos Keramidas
fc3643bb24 Make it clear that the .ko extention of a module to be loaded
is optional.

PR:		docs/85356
Submitted by:	Julien Gabel <jpeg@thilelli.net>
MFC after:	3 days
2005-08-27 22:25:51 +00:00
Marius Strobl
52a7b796a4 As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

MFC after:	1 week
2005-08-27 20:51:12 +00:00
Brooks Davis
001f040a03 The $medium string often contains quoted values with spaces in them (ssids,
for example).  Follow the example of the ISC script and wrap ifconfig
calls using $medium in eval "..." so this works.

Reported by:	iedowse
2005-08-26 20:31:04 +00:00
Takanori Watanabe
cf5a7ef8d1 Update Document. 2005-08-26 11:39:38 +00:00
Brooks Davis
753d6c0327 In read_string(), when the last character was a backslash, unincrement
the output index instead of keeping what ever trash was in the buffer.

Reported by:	iedowse
2005-08-26 01:25:59 +00:00
Brooks Davis
6ae27cb6ce Use a more robust, grep-free command to get the interface of the current
default route.

Submitted by:	Rostislav Krasny <rosti dot bsd at gmail dot com>
2005-08-26 01:07:51 +00:00
Brooks Davis
7e82455ea8 Don't and/remove a route to our assigned IP through 127.0.0.1. It
serves no apparent purpose (we commented this out ages ago in the ISC
scripts) and cases problems with some ADSL setups.

Reported by:	Rostislav Krasny <rosti dot bsd at gmail dot com>
2005-08-26 01:02:38 +00:00
Brooks Davis
1469b42c7d MFOpenBSD rev 1.9: fix a buffer overflow when processing config file
lines that are exactly 81 characters in length.

Obtained from:	OpenBSD
MFC After:	3 days
2005-08-24 00:05:04 +00:00
Brooks Davis
8794fdbb48 Add __FBSDID to all .c files in dhclient to aid in determining file
versions when dealing with user problems.
2005-08-23 23:59:55 +00:00
Christian S.J. Peron
4d3d08301e FreeBSD unconditionally supports write filters now. 2005-08-23 01:35:38 +00:00
Pawel Jakub Dawidek
dd549194ae By default, when doing crypto work in software, start as many threads
as we have active CPUs and bind each thread to its own CPU.

MFC after:	3 days
2005-08-21 18:12:51 +00:00
Simon L. B. Nielsen
b92f49fa86 Remove reference to raid(4), the RAIDframe manual page, which was
deleted a while ago.

PR:		docs/85142
Submitted by:	Jeremy Chadwick <freebsd@jdc.parodius.com>
MFC after:	3 days
2005-08-20 09:10:31 +00:00
Pawel Jakub Dawidek
7a5c26fcbd Allow to change number of iterations for PKCS#5v2. It can only be used
when there is only one key set.

MFC after:	3 days
2005-08-19 22:19:25 +00:00
Pawel Jakub Dawidek
829781048d Move function for calculating number of bits into more central place.
I want to use it so more.

MFC after:	3 days
2005-08-19 22:13:09 +00:00
Ian Dowse
a00a259113 Add the ability to specify the boot2 serial console speed in
/boot.config or on the "boot:" prompt line via a "-S<speed>" flag,
e.g. "-h -S19200". This adds about 50 bytes to the size of boot2
and required a few other small changes to limit the size impact.
This changes only affects boot2; there are further loader changes
to follow.
2005-08-18 00:42:45 +00:00
Pawel Jakub Dawidek
4cb6ca7622 Update manual page (now dedicated kernel thread is always started).
MFC after:	3 days
2005-08-17 15:27:23 +00:00
Christian Brueffer
8d8b579597 Clarify how the 'channel' argument should look like and add an
example on how to obtain information on devices on an ata channel.

PR:		84676
Submitted by:	Kevin Oberman <oberman@es.net>
		Jeremie Le Hen <jeremie@le-hen.org>
MFC after:	3 days
2005-08-16 21:14:25 +00:00
Gleb Smirnoff
9ff95228e8 Implement a new feature for ping(8) - sweeping pings. In a sweeping
ping ICMP payload of packets being sent is increased with given step.
Sweeping pings are useful for testing problematic channels, MTU
issues or traffic policing functions in networks.

PR:		bin/82625
Submitted by:	Chris Hellberg <chellberg juniper.net> (with some cleanups)
2005-08-15 14:15:37 +00:00
Ian Dowse
3b89beb171 Attempt to improve the logic for automatically sizing partitions
to take into account the new default of starting the first partition
after the boot blocks instead of at sector 0. If you used automatic
sizing when the first partition did not start at 0, you would get
an error that the automatically sized partition extended beyond the
end of the disk.

Note that there are probably still many more complex cases where
automatic sizing and placement will not work (e.g. non-contiguous
or out of order partitions).
2005-08-14 22:46:50 +00:00
Pawel Jakub Dawidek
a73148d28d Unfortunately dlerror(3) returns string, so there is no clean way to
ignore "no such file" errors only, which I wanted to do.
Because of this I ignored all other errors on dlopen(3) failure as well,
which isn't good.
Fix this situation by calling access(2) on library file first and ignore
only ENOENT error. This allows to report all the rest of dlopen(3) errors.

MFC after:	3 days
2005-08-14 21:55:18 +00:00
Ian Dowse
9405aea2e2 Don't treat failure to find the operator GID as a fatal error; this
made it impossible to use newfs (and mdmfs) when /etc/group is
missing and /etc is read-only.
2005-08-14 17:07:04 +00:00
Pawel Jakub Dawidek
5b5a030fa4 When keys were configured without passphrase, number of iterations in
metadata is equal to -1. if we then wanted to attach provider (or change
keys) and forget about '-p' flag it failed on assertion (quite ok, without
assertion it could call PKCS#5v2 with 4294967295 iterations).

Instead of failing on assertion, remind about '-p' flag.

MFC after:	3 days
2005-08-14 14:13:07 +00:00
Andrew Thompson
db7d6dc145 Document two missed if_bridge commands 'addr' and 'static'.
Noticed by:	Michal Mertl
Approved by:	mlaier (mentor)
MFC after:	3 days
2005-08-14 03:28:08 +00:00
Sam Leffler
29f0e92957 add list mac and mac:kick support
Submitted by:	Michal Mertl (original version)
MFC after:	2 weeks
2005-08-13 17:38:09 +00:00
Bjoern A. Zeeb
9066356ba1 * Add dynamic sysctl for net.inet6.ip6.fw.
* Correct handling of IPv6 Extension Headers.
* Add unreach6 code.
* Add logging for IPv6.

Submitted by:	sysctl handling derived from patch from ume needed for ip6fw
Obtained from:	is_icmp6_query and send_reject6 derived from similar
		functions of netinet6,ip6fw
Reviewed by:	ume, gnn; silence on ipfw@
Test setup provided by: CK Software GmbH
MFC after:	6 days
2005-08-13 11:02:34 +00:00
Pawel Jakub Dawidek
325319eb3d GELI doesn't need cryptodev.
MFC after:	2 days
2005-08-12 07:44:42 +00:00
Pawel Jakub Dawidek
9417a618d1 Add code for Ext2FS and ReiserFS labels recognition.
Submitted by:	Stanislav Sedov <stas@310.ru>
PR:		kern/84638
MFC after:	1 week
2005-08-12 00:27:45 +00:00
Stefan Farfeleder
515faf2fbe The libedit update made a const cast necessary. 2005-08-07 20:53:33 +00:00
Søren Schmidt
3ea7aedd41 Fix status to report status from the given array. 2005-08-05 13:08:02 +00:00
Stefan Farfeleder
a3ae5e4ede Use socklen_t where appropriate. 2005-08-05 09:58:49 +00:00
Stefan Farfeleder
d414fcbc3e Garbage collect useless variables. 2005-08-05 07:39:39 +00:00
Stefan Farfeleder
435071dff3 Use the C99 syntax for designated initialisers. 2005-08-05 07:33:50 +00:00
Stefan Farfeleder
70382d5abe Fix commen typos. 2005-08-03 20:57:33 +00:00
Ruslan Ermilov
a5de1230a9 Add missing check for the NO_CRYPT build option.
Reported by:	Alexander Polakov
2005-08-02 20:12:30 +00:00
Sam Leffler
aeffcba3c1 Wireless suport fixups: add a bunch of stuff that's been in the
code but not documented (e.g. wme, mac acl) and correct some
information, etc.

Reviewed by:	brueffer
2005-08-02 19:13:13 +00:00
Sam Leffler
7c0cbd3bfa acm and ack are specified per-ac
MFC after:	3 days
2005-08-01 16:34:41 +00:00
Ceri Davies
b1f1271f26 Correct the description of the TAPE environment variable.
Based on:

PR:		docs/84200
Submitted by:	Gary W. Swearingen <garys at opusnet dot com>
MFC after:	1 week
2005-07-31 13:56:19 +00:00
Christian Brueffer
acc79971c2 Misc cleanup (spelling, grammar, mdoc, style, cut >80 char lines). 2005-07-30 13:27:15 +00:00
Sam Leffler
0c36e9bb67 oops, revert previous change 2005-07-30 03:30:29 +00:00
Sam Leffler
4e5771359e MFC: add fragthreshold parameter and accept - (or any) for rtsthreshold
Approved by:	re (kensmith)
2005-07-30 03:28:41 +00:00
Pawel Jakub Dawidek
16a563e2b4 Update manual page after ggate rewrite.
MFC after:	1 day
2005-07-29 11:22:13 +00:00
Pawel Jakub Dawidek
fd833a6a19 I actually do need libmd. 2005-07-29 10:06:57 +00:00
Brooks Davis
289d89d80f Further fix receive_packet() by using BPF_WORDALIGN to insure the offset
is properly aligned when we move to the next packet.

Obtained from:	ISC dhclient via krw at OpenBSD
2005-07-28 15:30:19 +00:00
Giorgos Keramidas
497dd0f938 Spell "partition" correctly.
PR:		docs/84198
Submitted by:	Gary W. Swearingen
MFC after:	3 days
2005-07-28 10:48:07 +00:00
Brooks Davis
acccb9aa83 Don't reject packets with server names containing characters that are
not allowed in domain names.  RFC 2132 does not list valid or invalid
characters and the ISC client accepts anything here.

Reported by:	ps
2005-07-28 00:24:39 +00:00
Pawel Jakub Dawidek
a05fe8d0e5 I think I found the problem, reconnect geli to the build. 2005-07-27 23:56:32 +00:00
Pawel Jakub Dawidek
0ee6653d31 - Reduce WARNS level to 3, so it will be compilabe on alpha.
- Don't link libmd, it is not needed.
- Connect manual page to the build.

MFC after:	1 week
2005-07-27 23:56:01 +00:00
Pawel Jakub Dawidek
f90af958e4 Disconnect geli from the build for now.
I need to find out first what is the cause of sha2.c compilation problem
on alpha.
2005-07-27 23:30:50 +00:00
Pawel Jakub Dawidek
5ca1fcfe06 Connect GEOM_ELI class to the build.
MFC after:	1 week
2005-07-27 21:47:55 +00:00
Pawel Jakub Dawidek
c58794debd Add GEOM_ELI class which provides GEOM providers encryption.
For features list and usage see manual page: geli(8).

Sponsored by:	Wheel Sp. z o.o.
		http://www.wheel.pl
MFC after:	1 week
2005-07-27 21:43:37 +00:00
Brooks Davis
4eae015de1 Fix a bug in the handling of cases where we got a short (or zero)
capture.  Zero length captures caused an infinte loop and short captures
probably caused memory corruption and a crash.

Reported by:	many
MFC After:	3 days
2005-07-27 19:25:46 +00:00
Brooks Davis
3c0898098e s/if_defaulroute/if_defaultroute/
We may now handle route updates better.
2005-07-26 18:27:37 +00:00
Sam Leffler
ad60ee418a o add fragthreshold support now that the ioctl exists
o accept rtsthreshold - (or any) as a shorthand for rtsthreshold 2346

MFC after:	3 days
2005-07-26 06:00:33 +00:00
Brooks Davis
a65d8df916 Change host-name from type "X" to type "t". This allows the client to
accept NUL-terminated strings as required by RFC 2132.

This solution is not perfect as it removes the ability to send
NUL-terminated host-name options which may be required by some broken
servers.  Given the current lack of an existance proof of such servers
and the fact that servers that send NUL-terminated domain names do
exist, this seems like an acceptable compromise.  A discussion of these
issues can be found at:

http://marc.theaimsgroup.com/?l=dhcp-client&m=96837107208382&w=2

PR:		bin/83468
Reported by:	Sean Winn <sean at gothic dot net dot au>
MFC-after:	3 days
2005-07-25 22:19:09 +00:00
Sam Leffler
b35f2511fa treat REASSOC events just like ASSOC
MFC after:	3 days
2005-07-25 04:32:40 +00:00
Diomidis Spinellis
153fdc98cf Interpret correctly the glob(3) return value.
Previously, interactive commands specifying a non-existent file or
directory used to display an "out of memory error".

MFC after:	2 weeks
2005-07-21 16:12:35 +00:00
Mark Santcroos
ac0ba90dc8 Bump document date.
Reminded by:	ru
2005-07-20 23:12:54 +00:00
Mark Santcroos
6214c00201 Document -b flag of dhclient.
Reviewed by:	ru
MFC after:	3 days
2005-07-20 22:35:44 +00:00
Yoshihiro Takahashi
543f81fa1a Merged from src/sbin/fdisk.
- Attempt gctl verb "write MBR" when updating.
2005-07-15 15:31:19 +00:00
Poul-Henning Kamp
de78c288db Attempt gctl verb "write MBR" when updating.
This should solve the problem of modifying a busy MBR.
2005-07-15 08:02:51 +00:00
Christian Brueffer
f0ea72a038 - Remove MLINKS to nonexistant manpages
- Change some section numbers to match reality
- For MLINKS to manpages from ports, mention which port installs them

MFC after:	3 days
2005-07-14 20:29:08 +00:00
Robert Watson
b7eb47e290 Add a new flag '-k' to ifconfig(8), indicating that it is alright to
print potentially sensitive keying material to stdout.  With the new
802.11 support, ifconfig(8) is now capable of printing 802.11 keys,
and did by default for the root user, which is undesirable in some
environments.  Now it will not print keying material unless requested
(and available to the user).

MFC after:	1 week
2005-07-14 18:33:21 +00:00
Yaroslav Tykhiy
2eb9396fb7 Add symbolic names for the IFF_PPROMISC and IFF_NEEDSGIANT flags
so that ifconfig(8) can print them.

MFC after:	5 days
2005-07-13 21:23:40 +00:00
Joe Marcus Clarke
e60fa01486 * Open permissions on /var/run/devd.pipe so that any user can read devd events
from this socket
* Enable non-blocking I/O on devd.pipe to keep clients from wedging devd.
  If a write(2) on devd.pipe would block, the client in question will be
  removed [1]

Requested by:	rwatson [1]
Approved by:	imp
2005-07-13 17:28:11 +00:00
Joe Marcus Clarke
8381892977 Replace fch{mod,own} with straight ch{mod,own} as the former cannot be used
on socket file descriptors.

Reviewed by:	secteam (cperciva)
Approved by:	imp
2005-07-13 17:10:47 +00:00
Christian Brueffer
ef95d02dd0 mdoc cleanup and whitespace removal after the last commit.
Submitted by:	ru
2005-07-13 09:35:35 +00:00
Pawel Jakub Dawidek
436b93a0dd Don't forget to initialize 'id' field.
MFC after:	3 days
2005-07-13 07:46:55 +00:00
Christian Brueffer
1a44eb0750 Information about the capability flags in 'ifconfig foo0 scan' output.
Most content by:	avatar
Reviewed by:		sam
Approved by:		re (hrs)
MFC after:		3 days
2005-07-12 06:22:02 +00:00
Pawel Jakub Dawidek
c68cb3f674 Don't compile ggatec/ggated in NO_LIBPTHREAD case.
Reported by:	Andrea Campi <andrea+freebsd_cvs_all@webcom.it>
Approved by:	re (scottl)
2005-07-10 15:16:49 +00:00
Warner Losh
cd70782b39 Add the ability to match the on a media type of the device in question.
Submitted by: sam
Approved by: re (scottl)
2005-07-10 03:37:15 +00:00
Pawel Jakub Dawidek
15e088eeb2 Sync which ggate changes.
Approved by:	re (scottl)
2005-07-08 21:29:17 +00:00
Pawel Jakub Dawidek
7be67fe3d1 Reimplement ggatec/ggated applications.
Change communication protocol to be much more resistant on network
problems and to allow for much better performance.

Better performance is achieved by creating two connections between
ggatec and ggated one for sending the data and one for receiving it.
Every connection is handled by separeted thread, so there is no more
synchronous data flow (send and wait for response), now one threads
sends all requests and another receives the data.

Use two threads in ggatec(8):
- sendtd, which takes I/O requests from the kernel and sends them to the
  ggated daemon on the other end;
- recvtd, which waits for ggated responses and forwards them to the kernel.

Use three threads in ggated(8):
- recvtd, which waits for I/O requests and puts them onto incoming queue;
- disktd, which takes requests from the incoming queue, does disk operations
  and puts finished requests onto outgoing queue;
- sendtd, which takes finished requests from the outgoing queue and sends
  responses back to ggatec.

Because there were major changes in communication protocol, there is no
backward compatibility, from now on, both client and server has to run
on 5.x or 6.x (or at least ggated should be from the same FreeBSD version
on which ggatec is running).

For Gbit networks some buffers need to be increased. I use those settings:
kern.ipc.maxsockbuf=16777216
net.inet.tcp.sendspace=8388608
net.inet.tcp.recvspace=8388608
and I use '-S 4194304 -R 4194304' options for both, ggatec and ggated.

Approved by:	re (scottl)
2005-07-08 21:28:26 +00:00
Sam Leffler
fa56f74570 add pureg/-pureg parameter for controlling pureg ap mode support
Reviewed by:	avatar
Approved by:	re (scottl)
2005-07-06 15:39:11 +00:00
Colin Percival
e5610d524c Bump document date. Remove EOL whitespace introduced in previous
commit.  Start new line at sentence break in previous commit.

Approved by:	re (implicit, fixing a commit made 5 minutes ago)
2005-07-01 10:04:33 +00:00
Colin Percival
4beacf6666 Document some limitations of uid/gid rules.
Approved by:	re (rwatson)
MFC after:	3 days
2005-07-01 09:51:10 +00:00
Brooks Davis
a36c0b6b78 Don't complain when we receive smtp, pop, nntp, www, finger, and irc
server options.

Reported by:	Max Boyarov <max_b at tut dot by>
Approved by:	re (dhclient blanket)
2005-06-30 05:50:52 +00:00
Brooks Davis
b388f1cb10 People like to do RFC violating things with the domain-name option and
include a space seperated list of domains instead of the domain of the
host.  This is supported on too many platforms to break for now so,
remove validation of this option for the moment.

The correct solution longer term is to implement RFC 3397 support and
then treat domain-name options containing space seperated lists of
domains as domain-search options for backwards compatability.

Approved by:	re (dhclient blanket)
2005-06-30 05:32:42 +00:00
Ruslan Ermilov
f9ba39e985 Install the dhcp-options.5 manpage.
Timeout from:	brooks
Approved by:	re (blanket manpages)
2005-06-25 11:03:06 +00:00
Ruslan Ermilov
5c52b5abbc Tidy up the markup.
Approved by:	re (blanket)
2005-06-24 10:57:53 +00:00
Ruslan Ermilov
9a7feaa13c Line up the markup.
Approved by:	re (blanket)
2005-06-22 14:55:59 +00:00
Jean-Sébastien Pédron
b6c9debcf0 Build mount_reiserfs on every platforms, not only i386 and pc98.
Reviewed by:	mux (mentor)
Approved by:	re (dougb)
2005-06-21 13:02:45 +00:00
Doug White
9520784e29 Don't bump bounds every time savecore(8) is run.
Submitted by:	Ed Maste <emaste@sandvine.com>
Approved by:	re
2005-06-20 20:01:29 +00:00
Tai-hwa Liang
ecc1960073 Appending "..." to a SSID which contains unprintable characters only when
necessary.

Submitted by:	sam
Approved by:	re (scottl)
2005-06-20 02:33:02 +00:00
Christian Brueffer
e16a2150d3 Remove Xref to mount_hpfs(8), it's not hooked up to the build.
Approved by:	re (blanket)
MFC after:	3 days
2005-06-16 21:35:33 +00:00
Hajimu UMEMOTO
73bbc449db only show a tunnel information of an adequate address family.
Approved by:	re (dwhite)
2005-06-16 19:37:09 +00:00
Ruslan Ermilov
55c82bf0d4 Markup fixes.
Approved by:	re (blanket)
2005-06-14 11:24:56 +00:00
Brooks Davis
59eac186e2 Avoid a null pointer dereference by not expiring our lease if we don't
have an active one.

Submitted by:	sam
Reported by:	James Snow <snow at teardrop dot org>
Approved by:	re (dhclient blanket)
2005-06-13 23:43:08 +00:00
Christian Brueffer
e7951bdf02 It's spelled 'preceded' of course.
Submitted by:	David Adam <zanchey@ucc.gu.uwa.edu.au>
Pointy hat to:	brueffer
2005-06-13 15:49:59 +00:00
Christian Brueffer
3e3a17bb92 Hex strings are _pre_ceeded by 0x, not _pro_ceeded.
PR:		82187
Submitted by:	Anthony Rogers <anthony.j.rogers@gmail.com>
Approved by:	re (blanket)
MFC after:	3 days
2005-06-13 07:55:15 +00:00
Xin LI
46b7a14ba4 Use MOPT_END in favor of MOPT_NULL, which better describes the purporse
of the macro.
2005-06-10 09:51:43 +00:00
Brooks Davis
d5fedb6e96 Add support for /etc/dhclient-enter-hooks to match /etc/dhclient-exit-hooks. 2005-06-10 03:41:18 +00:00
Brooks Davis
d6790d5a5c Add support for /etc/dhclient-exit-hooks file.
Tested by:	Max Boyarov <max_b at tut dot by>
2005-06-08 18:21:56 +00:00
Brooks Davis
9c13d9cd98 Fix build on 64-bit platforms where time_t is 64 bit. Since where
talking about time related to leases, it should be OK to cast these to
(int)s rather than using intmax_t.

Submitted by:	ru
Pointy hat:	brooks
2005-06-07 14:47:54 +00:00
Max Laier
b730879ffa add_proto() now fills proto for us so stop to 'guess' the protocol from the
command and rather trust the value add_proto filled in.  While here, fix an
oversight in the pretty printing of ip6/4 options.
2005-06-07 14:11:17 +00:00
Ruslan Ermilov
c55cd9092d - Remove OpenBSD'ism (bsd.own.mk).
- Remove redundant and harmful -Wall from CFLAGS.
2005-06-07 09:32:23 +00:00
Brooks Davis
1afa6b2c0a Now that dhclient builds and /etc/support has been committed, reconnect
dhclient to the build.
2005-06-07 04:49:37 +00:00
Brooks Davis
43c56a9bd9 Use SCRIPTS to install dhclient-script instead of rolling our own. 2005-06-07 04:35:48 +00:00
Brooks Davis
8750adaf5a FreeBSDize the dhclient-script.
Submitted by:	sam
2005-06-07 04:32:29 +00:00
Brooks Davis
2b19b6fca1 Define _PATH_VAREMPTY.
Add a -b option to background immediatly.

Add support for 802.11 routing messages to "instantly" renegotiate
at lease when we associate with a new network.

Submitted by:	sam
2005-06-07 04:26:14 +00:00
Brooks Davis
b5be635a44 NULL is not a valid time_t.
Submitted by:	sam
2005-06-07 04:14:54 +00:00
Brooks Davis
1b3bb962f9 We don't support BPF write filters at this time.
Submitted by:	sam
2005-06-07 04:13:52 +00:00
Brooks Davis
955cf67bf4 Take the OpenBSD version of the Makefile to resolve conflicts as the old
one is irrelevent.  Add $FreeBSD.
2005-06-07 04:08:50 +00:00
Brooks Davis
24bd614bbd This commit was generated by cvs2svn to compensate for changes in r147072,
which included commits to RCS files with non-trunk default branches.
2005-06-07 04:05:09 +00:00
Brooks Davis
47c0859616 Import the OpenBSD dhclient as shipped with OpenBSD-3.7 (the tag
OPENBSD_3_7).
2005-06-07 04:05:09 +00:00
Brooks Davis
981e23b873 Remove the bits to build the isc-dhclient. 2005-06-07 04:02:10 +00:00
Brooks Davis
12bc1dc061 Temporarily disconnect dhclient from the build while I import the
OpenBSD version.
2005-06-07 03:59:26 +00:00
Søren Schmidt
265fa8db1d Open devices RDONLY for ioctls. That makes it work on open devices to which
GEOM doesn't allow WR access.
2005-06-06 20:46:51 +00:00
Philip Paeps
ff869641ae Fix a silly little typo I just spotted. 2005-06-06 06:47:33 +00:00
Andrew Thompson
7afc53b8df Connect if_bridge to the build.
Approved by:	mlaier (mentor)
2005-06-05 03:32:53 +00:00
Andrew Thompson
31997bf223 Add if_bridge, which provides more advanced Ethernet bridging and 802.1d
spanning tree support.

Based on Jason Wright's bridge driver from OpenBSD, and modified by Jason R.
Thorpe in NetBSD.

Reviewed by:	mlaier, bms, green
Silence from:	-net
Approved by:	mlaier (mentor)
Obtained from:	NetBSD
2005-06-05 02:59:26 +00:00
Brian Feldman
5278d40bcc Better explain, then actually implement the IPFW ALTQ-rule first-match
policy.  It may be used to provide more detailed classification of
traffic without actually having to decide its fate at the time of
classification.

MFC after:	1 week
2005-06-04 19:04:31 +00:00
Warner Losh
5493b334cc Revert last. It was the result of mismerges from cvs not an actual
need.  _sconfig already was there in the correct place.

Noticed by: ru@
2005-06-03 15:53:37 +00:00
Warner Losh
b93c319255 Build sconfig on i386 to match where drivers are made it configures 2005-06-03 15:38:39 +00:00
Max Laier
57cd6d263b Add support for IPv4 only rules to IPFW2 now that it supports IPv6 as well.
This is the last requirement before we can retire ip6fw.

Reviewed by:	dwhite, brooks(earlier version)
Submitted by:	dwhite (manpage)
Silence from:	-ipfw
2005-06-03 01:10:28 +00:00
John Baldwin
d14c0c076e Fix some warnings on 64-bit archs.
Reviewed by:	sam
2005-06-01 14:55:45 +00:00
Xin LI
73ac45052f Add a handy macro to represent null mount option, MOPT_NULL, and make
use of the macro in sbin/mount*'s, by replacing:

	mopts[] = {
	    MOPT_STDOPTS,
	    { NULL }
	}

With:
	mopts[] = {
	    MOPT_STDOPTS,
	    MOPT_NULL
	}

This change will help to reduce the situation that we don't explicitly
initialize "struct mntopt"'s.  It should not contribute to any
functional/logical changes as far as I can tell.
2005-06-01 09:39:36 +00:00
Stefan Farfeleder
92e7a424c5 Remove #ident directives, they don't exist on the vendor branch anymore. 2005-05-31 20:28:49 +00:00
Xin LI
466e103c7d Constify savedir pointer, and remove an accompaning strdup() call. 2005-05-29 16:28:07 +00:00
Philippe Charnier
8a1dff0c73 Give variable an initial value. Use errx() instead of fprintf(). 2005-05-29 16:07:10 +00:00
Philippe Charnier
35a974fdb8 rscid -> __FBSDID. Mark parameter as __unused when necessary. 2005-05-29 15:57:00 +00:00
Ruslan Ermilov
522c85f5ba Fix order (I introduced some time ago) broken in previous revision. 2005-05-25 07:31:05 +00:00
Maxime Henrion
ab19e37ab0 Only build mount_reiserfs(8) on i386, it exists only there for now.
Spotted by:	ru
2005-05-24 23:06:10 +00:00
Jean-Sébastien Pédron
8fe7998342 Connect mount_reiserfs(8) to the build.
Approved by:	mux (mentor)
2005-05-24 12:37:18 +00:00
Jean-Sébastien Pédron
61a34594b1 Import of mount_reiserfs(8), used to mount a ReiserFS filesystem.
Approved by:	mux (mentor)
2005-05-24 12:34:45 +00:00
Hajimu UMEMOTO
c60a8b32a2 - do DNS lookup for symbolic names specified for a destination
or gateway.
- improves error reporting using gai_strerror(3) instead of
  printing "bad value".
- remove "0" for servname argument for getaddrinfo(3).

Submitted by:	Andreas Kohn <andreas __at__ syndrom23.de>
MFC after:	1 week
2005-05-23 14:12:32 +00:00
Ruslan Ermilov
9b3eb50354 Synchronize program's usage() with manpage's SYNOPSIS. 2005-05-21 07:08:32 +00:00
Max Laier
ffa4a5867a Unbreak handling of "ip[v]6" protocol and option flag. No more segfaults
and not every protocol is IPv6.
2005-05-21 03:27:33 +00:00
Søren Schmidt
06b97dbc13 Print the rigth argv string on error (too much c&p).. 2005-05-20 06:23:40 +00:00
Sam Leffler
eb2a391f14 guard against bogus address data
Submitted by:	Bakul Shah
2005-05-20 03:58:53 +00:00
Ruslan Ermilov
95f55a632e Fix the contents of the underneath .depend files and "make checkdpadd". 2005-05-17 14:29:06 +00:00
Warner Losh
f32a7686ec Ignore sigpipe so we can properly detach clients to the pipe.
Submitted by: Fredrik Lindberg
2005-05-16 20:51:46 +00:00
Darren Reed
051adc35a2 Enable building /sbin/ipf (but not the rescue version) with the ability to
parse bpf strings for filter rules in ipf.conf
2005-05-16 16:22:55 +00:00
Ruslan Ermilov
4a73995979 Fixed markup from the previous revision. 2005-05-16 15:09:13 +00:00
Søren Schmidt
cc6bea0ed8 Reflect the new usage. 2005-05-16 13:32:23 +00:00
Søren Schmidt
6667b30d15 Change the way ioctls are issue to ATA.
The most prominent part is that its now possible to issue ata_requests
directly to say acd0, instead of going through the cumbersome /dev/ata
device.
2005-05-16 13:07:27 +00:00
Hajimu UMEMOTO
4f10131848 NI_WITHSCOPEID cleanup. Neither RFC 2553 nor RFC 3493 defines
NI_WITHSCOPEID, and our getaddrinfo(3) does nothing special
for it, now.
2005-05-13 16:31:11 +00:00
Gleb Smirnoff
0c0e9713a6 'ngtee' also depends on net.inet.ip.fw.one_pass. 2005-05-11 12:58:15 +00:00
Juli Mallett
b894acfb2a shutdown(2)'s how argument as 0 is nowhere near as cool as SHUT_RD 2005-05-11 02:50:41 +00:00
Gleb Smirnoff
0af8180f8c IPFW version 2 is the only option now in HEAD. Do not confuse
users of future releases with instructions about building IPFW2
on RELENG_4.
2005-05-04 13:14:57 +00:00
Max Khon
5d6d6d382f Add -m option (find module using modfind() and stat it). 2005-05-04 12:46:43 +00:00
Max Laier
10a51bf5a1 Update ifconfig's pfsync module for 3.7 pfsync(4) 2005-05-03 16:59:14 +00:00
Max Laier
a8a770634f Adapt Makefiles for pfctl(8) and authpf(8) to 3.7 sources. 2005-05-03 16:57:38 +00:00
Xin LI
d2b67fd0e8 Cleanups for gcc4:
- Use socklen_t for socket functions
 - Remove an unnecessary extern
 - Signed/unsigned cleanups

Reviewed by:	harti
2005-05-02 10:31:27 +00:00
Xin LI
48ce8ca1aa WARNS=6 and gcc4 cleanup:
- Use const where necessary
	- Use __unused where applicable
	- Rename variables that is conflicit with global definations
2005-05-02 10:13:38 +00:00
Xin LI
263d6a7ece include stdarg.h for va_list 2005-05-02 10:04:16 +00:00
Xin LI
0c40596cc0 Make gcc4 happy by making consistent signedness. 2005-05-02 10:00:39 +00:00
Yoshihiro Takahashi
cdb5312231 - Merged some missing changes from fdisk/fdisk.c.
- Remove ifdef PC98.
- Make WARN=4 clean.
2005-05-01 10:08:35 +00:00
Yoshihiro Takahashi
7fa181d423 cosmetic changes. 2005-05-01 09:50:02 +00:00
Yoshihiro Takahashi
7422f40538 Merged more changes from fdisk/fdisk.c. 2005-05-01 05:04:05 +00:00
Yoshihiro Takahashi
61456bbd76 Use NDOSPART macro instead of a magic number. 2005-05-01 05:01:55 +00:00
Yoshihiro Takahashi
cbf1a58f6c Merged from src/sbin/fdisk/fdisk.c revision 1.77. 2005-05-01 04:14:01 +00:00
Poul-Henning Kamp
ca4cc47388 If we resort to opening a slice instead of the base device, do so with
the correct mode for our arguments.
2005-04-29 21:24:27 +00:00
Pawel Jakub Dawidek
760fde0677 Remove trailing spaces. 2005-04-29 07:57:50 +00:00
Darren Reed
cf4ee2c933 Patches from Ruslam Ermilov to remove NetBSD bits from Makefiles and cleanup
build problems with rescue.
2005-04-28 16:26:35 +00:00
Brooks Davis
d360073b23 Fix a the previous commit. I wanted to remove the if and always run the
body not remove both.

Reported by:	ceri
Pointy hat:	brooks
2005-04-26 20:22:31 +00:00
Brooks Davis
38aede1cce Don't force IPv6 proto to be printed numericaly.
Noticed by:	ceri
2005-04-26 20:00:07 +00:00
Darren Reed
ab99011993 Not looking for ipfilter source files in the right place 2005-04-26 15:35:50 +00:00
Pawel Jakub Dawidek
0080ee9897 Fix stripe size in example.
Found by:	kris
MFC after:	3 days
2005-04-26 09:23:21 +00:00
Darren Reed
9eee1413e7 remove old directories used to build ipfilter tools 2005-04-25 18:59:29 +00:00
Darren Reed
dfce72524f There's only one ipfilter directory now 2005-04-25 18:56:42 +00:00
Darren Reed
f81bd860b1 create a new build heirarchy for ipfilter tools 2005-04-25 18:55:52 +00:00
Dag-Erling Smørgrav
8a399540fa - distinguish between the device name (what the user called it on the
command line) and the device path (what we passed to open()).  Use
  the former in diagnostics.
- when adding or removing partitions, print a single line to stdout for
  each partition that was added or removed, indicating its name.
- add an -a option to 'gpt remove' which must be explicitly specified
  to remove all partitions.

Approved by:	marcel (in prinicple)
MFC after:	2 weeks
2005-04-24 20:08:29 +00:00
Pawel Jakub Dawidek
8bdc733007 Remove duplicated description of 'clear' subcommand.
Pointed out by:	marck
X-MFC-after:	few seconds
2005-04-23 12:17:21 +00:00
Jesus R. Camou
6b23be5f70 Use .Pa instead of .Xr to follow mdoc(7)
specifications.

Noticed by:	trhodes
Approved by:	trhodes (mentor)
MFC after:	1 day
2005-04-20 01:56:33 +00:00
Brooks Davis
8195404bed Add IPv6 support to IPFW and Dummynet.
Submitted by:	Mariano Tortoriello and Raffaele De Lorenzo (via luigi)
2005-04-18 18:35:05 +00:00
Warner Losh
f8aa7a835c 'r' disk devices no longer exist, so don't try to create a pathname
that has an 'r' in it.

This also eliminates a bogus use of strlcat.
PR: 80064
2005-04-18 15:08:29 +00:00
Warner Losh
528d3f7955 Fix parsing of nomatch events.
minor debug fix.
2005-04-18 02:54:07 +00:00
Pawel Jakub Dawidek
d37ed29c98 Document 'clear' and 'dump' subcommands.
MFC after:	1 week
2005-04-15 23:51:20 +00:00
Jim Rees
76b5c0aa50 Remove dead code.
PR:		bin/78125
Submitted by:	Gavin Atkinson <gavin.atkinson@ury.york.ac.uk>
Approved by:	alfred
2005-04-14 20:27:30 +00:00
Matthew N. Dodd
b2680e2048 Show descriptions for type CTLTYPE_NODES. 2005-04-13 06:59:07 +00:00
Matthew N. Dodd
9f98e452c3 Zero buffers. Seatbelt against sysctl(3) returning non-NUL terminated
string data.
2005-04-13 06:56:31 +00:00
Stefan Farfeleder
c508bf7a54 ISO C does not allow unnamed union members. 2005-04-08 21:37:41 +00:00
Stefan Farfeleder
77a9f6dd96 Fix typo in comment. 2005-04-08 21:31:20 +00:00
Ceri Davies
a5640f3d54 Grammatical improvement. 2005-04-08 10:32:22 +00:00
Brooks Davis
3994793281 When accessing the sysctl vfs.nfs.iodmax, don't report errors as being
from accessing vfs.nfs.iodmin.
2005-04-07 20:37:04 +00:00
Pawel Jakub Dawidek
220bc2ffc1 Allow classes to specify local source files.
MFC after:	3 weeks
2005-04-07 15:57:38 +00:00
Pawel Jakub Dawidek
53767efdce Empty error buffer is not an error.
MFC after:	3 weeks
2005-04-07 06:46:11 +00:00
Jesus R. Camou
eebe15298d Document the configuration files used.
PR:		docs/79572
Submitted by:	Josh Paetzel <josh@tcbug.org>
Approved by: 	trhodes (mentor)
2005-04-05 22:29:47 +00:00
Brooks Davis
776c10059d Be more specific when complaining about bit masks. 2005-04-05 22:26:02 +00:00
Warner Losh
371c9f9384 Remove debug from last commit 2005-04-03 16:35:58 +00:00
Warner Losh
64a96794b7 /*- 2005-04-03 05:18:28 +00:00
Robert Watson
6fe62276be Don't define FS_DEBUG by default, as this causes growfs to write debugging
information to /tmp/growfs.debug, which is a world-writable directory.

MFC after:	3 days
Reported by:	Jon Passki <cykyc@yahoo.com>
2005-03-31 04:10:31 +00:00
Robert Watson
c4b2cc12ae Don't default to '/var/tmp/ffsinfo' for the output of ffsinfo(8), since
/var/tmp is a world-writable directory.

MFC after:	3 days
Reported by:	Jon Passki <cykyc@yahoo.com>
2005-03-31 04:05:17 +00:00
Joerg Wunsch
6fb1610fa3 Fix grammar error caused by my previous edit.
While being here, also update the copyright year.

Submitted by:	ru
2005-03-30 18:54:41 +00:00
Søren Schmidt
8ca4df3299 This is the much rumoured ATA mkIII update that I've been working on.
o       ATA is now fully newbus'd and split into modules.
        This means that on a modern system you just load "atapci and ata"
        to get the base support, and then one or more of the device
        subdrivers "atadisk atapicd atapifd atapist ataraid".
        All can be loaded/unloaded anytime, but for obvious reasons you
        dont want to unload atadisk when you have mounted filesystems.

o       The device identify part of the probe has been rewritten to fix
        the problems with odd devices the old had, and to try to remove
        so of the long delays some HW could provoke. Also probing is done
	without the need for interrupts, making earlier probing possible.

o       SATA devices can be hot inserted/removed and devices will be created/
        removed in /dev accordingly.
	NOTE: only supported on controllers that has this feature:
	Promise and Silicon Image for now.
	On other controllers the usual atacontrol detach/attach dance is
	still needed.

o	Support for "atomic" composite ATA requests used for RAID.

o       ATA RAID support has been rewritten and and now supports these
        metadata formats:
                 "Adaptec HostRAID"
                 "Highpoint V2 RocketRAID"
                 "Highpoint V3 RocketRAID"
                 "Intel MatrixRAID"
                 "Integrated Technology Express"
                 "LSILogic V2 MegaRAID"
                 "LSILogic V3 MegaRAID"
                 "Promise FastTrak"
                 "Silicon Image Medley"
		 "FreeBSD PseudoRAID"

o       Update the ioctl API to match new RAID levels etc.

o       Update atacontrol to know about the new RAID levels etc
        NOTE: you need to recompile atacontrol with the new sys/ata.h,
        make world will take care of that.
	NOTE2: that rebuild is done differently from the old system as
	the rebuild is now done piggybacked on read requests to the
	array, so atacontrol simply starts a background "dd" to rebuild
	the array.

o       The reinit code has been worked over to be much more robust.

o       The timeout code has been overhauled for races.

o	Support of new chipsets.

o       Lots of fixes for bugs found while doing the modulerization and
        reviewing the old code.

Missing or changed features from current ATA:

o       atapi-cd no longer has support for ATAPI changers. Todays its
        much cheaper and alot faster to copy those CD images to disk
        and serve them from there. Besides they dont seem to be made
        anymore, maybe for that exact reason.

o       ATA RAID can only read metadata from all the above metadata formats,
	not write all of them (Promise and Highpoint V2 so far). This means
	that arrays can be picked up from the BIOS, but they cannot be
	created from FreeBSD. There is more to it than just the missing
	write metadata support, those formats are not unique to a given
	controller like Promise and Highpoint formats, instead they exist
	for several types, and even worse, some controllers can have
	different formats and its impossible to tell which one.
	The outcome is that we cannot reliably create the metadata of those
	formats and be sure the controller BIOS will understand it.
	However write support is needed to update/fail/rebuild the arrays
	properly so it sits fairly high on the TODO list.

o       So far atapicam is not supported with these changes. When/if this
	will change is up to the maintainer of atapi-cam so go there for
	questions.

HW donated by:  Webveveriet AS
HW donated by:  Frode Nordahl
HW donated by:  Yahoo!
HW donated by:  Sentex
Patience by:	Vife and my boys (and even the cats)
2005-03-30 12:03:40 +00:00
Joerg Wunsch
3328bbeef2 Support VTOC volume names. This can be useful to distinguish multiple
disks in a system.  Solaris' format(1m) displays the volume names in
the disk overview.

MFC after:	1 month
2005-03-30 09:33:10 +00:00
Alexander Kabaev
0c775f53a7 Initialize iovlen variable to 0 before passing it by reference to the
build_iovec function.

Tripped over by:	Craig  Rodrigues
2005-03-28 22:21:45 +00:00
Kenneth D. Merry
e9e4d3e4d4 Add "report only" functionality to 'camcontrol format', so users can get a
report on the status of a format already running on a drive.

Fix status reporting for 'camcontrol format'.  This was broken in rev 1.34
of camcontrol.c, almost 4 years ago!

Submitted by:	joerg (most of the reportonly changes)
MFC after:	3 days
2005-03-26 05:34:54 +00:00
Colin Percival
6e34b4796d When executing mount_foo, pass "mount_foo" as argv[0] instead of "foo".
This unbreaks "/rescue/mount -t foo" -- previously it was necessary to
explicitly call "/rescue/mount_foo".

Hints from:	gordon
X-MFC after:	3 days (if approved by re@)
2005-03-26 04:45:53 +00:00
Brooks Davis
6c6faad6dd Remove bogus (but harmless) -I.. from CFLAGS. It makes no difference to
.depends other then the commant line.

Also remove -g from CFLAGS.  The user should add it to CFLAGS if they
desire debug support.

Reviewed by:	ru (in concept)
MFC After:	7 days
2005-03-25 22:08:59 +00:00
Warner Losh
aad0ac34fe Revert bogus += -g change. I needed it to debug the problem.
Noticed by: njl, Andrej Tobola
2005-03-25 17:30:20 +00:00
Warner Losh
66b4217151 Restore the ability to read FreeBSD 1 tapes (and I think any net2
based tapes, but I'm not sure where NFS_MAGIC was introduced after
4.3).  When support for the pre-4.4 format was removed (the ability to
read 4.2 and 4.3 BSD tapes), the old format inode conversion was
junked as well.  However, FreeBSD 1 dump tapes use the NFS_MAGIC
format, but have this inode format.  Before, restore would fail
complaining that '.' wasn't found and the root directory wasn't on
this tape.  Since the conversion from the not so old format is
relatively trivial, restore the code to make that conversion.

FreeBSD 1 dumps are once again readable.

MFC After: a few days
2005-03-25 07:35:59 +00:00
Warner Losh
a2c0855654 dcvt is unused since the support for converting pre-4.4 tapes was
removed.  Go ahead and remove it and struct odirent since it too is
unused.

# FreeBSD 1.1.5 tapes are still unreadable, but 2.0 and newer work.
2005-03-25 06:57:50 +00:00
Warner Losh
84c248f850 c_tapea and c_firstrec are used for TS_TAPE blocks, so convert them
for the old (4.4-lite through FreeBSD 4.x and *BSD) format.  It looks
like they aren't used for TS_INODE, but conversion costs so little
there that I've not removed them there (in case my grep was wrong).

This makes at least some of the tapes work for me again.  Now, to
regresion test all my dusty tapes...
2005-03-25 06:03:11 +00:00
Colin Percival
18a3dd1e34 Add verbiage to the description of the noexec mount option clarifying
that it really wasn't intended as a security feature.

Wording mostly by: simon
Discussed with:	secteam
2005-03-23 04:17:48 +00:00
Pawel Jakub Dawidek
1bcfab7f56 Fix use of uninitialized buf[0].
Reported by:	stefanf
MFC after:	3 days
2005-03-22 22:05:44 +00:00
Pawel Jakub Dawidek
3edf7a78b7 Truncate nextboot.conf file on creation, so existing garbage will be removed.
Submitted by:	Gary Allan <dragonfly@gallan.plus.com>
Obtained from:	DragonFlyBSD
MFC after:	3 days
2005-03-21 23:44:04 +00:00
Christian Brueffer
4029efa504 Xref carp(4) and polling(4).
MFC after:	3 days
2005-03-19 16:14:31 +00:00
Warner Losh
372e256ad0 In order to print out the dump dates correctly, the date and ddate fields
also need to be convereted for old tapes for records of type TAPE.
2005-03-18 21:06:54 +00:00
Poul-Henning Kamp
55f776914c Typo.
Submitted by:	Hiroharu Tamaru <tamaru@myn.rcast.u-tokyo.ac.jp>
2005-03-18 20:21:46 +00:00
Warner Losh
ecdd99f852 Sync usage and man page with reality. There's no '-c' command line
flag today.  Maybe we should still retain it, but I'll let others fight
that windmill.
2005-03-18 17:49:08 +00:00
Hartmut Brandt
291aa5d7f7 Forgot to change the pointer to the snmp_atm sources after repo-copy.
Correct this by pointing to the new location.

Pointy hat to:	harti

Submitted by:	keramida
2005-03-15 07:38:15 +00:00
Pawel Jakub Dawidek
ee602fbb50 Be sure that class name storaed in 'class_name' is lower case.
MFC after:	1 week
2005-03-14 15:00:51 +00:00
Pawel Jakub Dawidek
e10c321f69 Define subcommands' usage inside g_command structure.
MFC after:	1 week
2005-03-14 14:25:47 +00:00
Pawel Jakub Dawidek
c979e2069c - Add gc_usage field to g_command structure. This will allow to define
usage for a subcommand, so no 'usage' function has to be implemented
  in class library.
- Bump version number as it breaks ABI, but don't provide backward
  compatibility, because there are probably no external consumers of this
  geom(8).
This allows to print more precise usage for standard commands and simplify
class libraries a bit.

MFC after:	1 week
2005-03-14 14:24:46 +00:00
Pawel Jakub Dawidek
650a08d046 Instead of documenting every standard subcommand's argument everywhere,
just leave reference to geom(8).

MFC after:	1 week
2005-03-14 13:14:04 +00:00
Pawel Jakub Dawidek
adc8d20d9c Document subcommands' arguments.
MFC after:	1 week
2005-03-14 13:06:09 +00:00
Pawel Jakub Dawidek
ccc0c8978c Document '-s' option of 'status' subcommand.
MFC after:	1 week
2005-03-14 12:37:55 +00:00
Pawel Jakub Dawidek
ba6821f0d0 Add '-s' option to 'status' subcommand. It produces script-friendly output:
# gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
                       ad2s1a
mirror/data  DEGRADED  da0
                       da1 (76%)
                       da2
# gmirror status -s
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
mirror/root  COMPLETE  ad2s1a
mirror/data  DEGRADED  da0
mirror/data  DEGRADED  da1 (76%)
mirror/data  DEGRADED  da2

MFC after:	1 week
2005-03-14 12:33:19 +00:00
Pawel Jakub Dawidek
da80913d35 Use int instead of size_t (%*s needs int).
MFC after:	1 week
2005-03-14 08:34:02 +00:00
Xin LI
257eeb8e0b printf(3) expects that %*s having an int parameter, which generates
warning on 64-bit platforms.  Explicitly cast these values to int
to work around this issue, as these values are tend to be small.

Spotted by:	ia64 tinderbox
2005-03-14 04:33:13 +00:00
Pawel Jakub Dawidek
85e9dc7d1b - Document 'status' subcommand.
- Update copyrights.

MFC after:	1 week
2005-03-13 19:38:12 +00:00
Pawel Jakub Dawidek
18ee884076 Add 'status' command which prints general information about devices.
For example:

# gmirror status
       Name    Status  Components
mirror/root  COMPLETE  ad0s1a
                       ad2s1a
mirror/data  DEGRADED  da0
                       da1 (76%)
                       da2

MFC after:	1 week
2005-03-13 19:34:27 +00:00
Pawel Jakub Dawidek
c88a220206 Update copyrights. 2005-03-13 19:11:57 +00:00
Pawel Jakub Dawidek
2d76e2db38 Change function names related to 'list' command from 'show_one_*' to
'list_one_*'.

MFC after:	1 week
2005-03-13 19:10:13 +00:00
Pawel Jakub Dawidek
5fd66a44d8 When listing all devices (geoms) from the given class, skip geoms without
providers.
This prevents from listing geoms like <name>.sync which can be confusing.
It still allows to show details about it by giving its name when listing.

MFC after:	1 week
2005-03-13 16:45:41 +00:00
Hajimu UMEMOTO
ff079c93f7 gbde(8) is also rejndael user.
Reported by:	phk
2005-03-11 22:07:04 +00:00
Colin Percival
2fc230e298 Belatedly update the md5(1) man page to reflect the addition of sha256. 2005-03-10 09:56:39 +00:00
Colin Percival
186c183c23 In light of the recent 2^69 operation collision-finding attack on SHA1,
add support for SHA256.

Tested on:	i386, sparc64
Tested using:	NIST test vectors, built-in tests
X-MFC-after:	5.4-RELEASE
2005-03-09 19:23:04 +00:00
Stefan Farfeleder
4eb55c7adc Prefer the __printflike() macro to GCC's __attribute__ stuff. 2005-03-09 10:10:51 +00:00
Xin LI
c0ed8991fb Make background fsck based summary adjustments actually work by
initializing the sysctl mibs data before actually using them.

The original patchset (which is the actual version that is running
on my testboxes) have checked whether all of these sysctls and
refuses to do background fsck if we don't have them.  Kirk has
pointed out that refusing running fsck on old kernels is pointless,
as old kernels will recompute the summary at mount time, so I
have removed these checks.

Unfortunatelly, as the checks will initialize the mib values of
those sysctl's, and which are vital for the runtime summary
adjustment to work, we can not simply remove the check, which
will lead to problem when running background fsck over a dirty
volume.  Add these checks in a different way: give a warning rather
than refusing to work, and complain if the functionality is not
available when adjustments are necessary.

Noticed by:	A power failure at my lab
Pointy hat:	me
MFC After:	3 days
2005-03-07 08:42:49 +00:00
Ian Dowse
890005bf8a Use a signal-safe type for two variables that are used to synchronise
with a signal handler. This fixes a race condition introduced by
compiler reordering that caused dump to sometimes get stuck,
especially while dumping large filesystems.
2005-03-02 02:30:08 +00:00
Pawel Jakub Dawidek
5d19b2f993 We can specify device size in bytes. Document this in usage. 2005-03-01 14:56:49 +00:00
Christian Brueffer
7b3512daac Typos and grammar fixes, wordsmithing 2005-02-28 01:33:10 +00:00
Pawel Jakub Dawidek
e68909854c - Add md_provsize field to metadata, which will help with
shared-last-sector problem.
  After this change, even if there is more than one provider with the same
  last sector, the proper one will be chosen based on its size.
  It still doesn't fix the 'c' partition problem (when da0s1 can be confused
  with da0s1c) and situation when 'a' partition starts at offset 0
  (then da0s1a can be confused with da0s1 and da0s1c). One can use '-h'
  option there, when creating device or avoid sharing last sector.
  Actually, when providers share the same last sector and their size is equal,
  they provide exactly the same data, so the name (da0s1, da0s1a, da0s1c)
  isn't important at all.
- Provide backward compatibility.
- Update copyright's year.

MFC after:	1 week
2005-02-27 23:07:47 +00:00
Pawel Jakub Dawidek
3bad06e9ba - Add GEOM_LIBRARY_PATH environment variable which allows to specify an
alternative to /lib/geom/ path where shared libraries are stored.
- Improve debugging.

MFC after:	3 days
2005-02-27 21:14:58 +00:00
Pawel Jakub Dawidek
f71186982c Add SHSEC class to the list of geom(8)-aware classes.
MFC after:	3 days
2005-02-27 17:56:59 +00:00
Poul-Henning Kamp
1964f79ab3 Remove filtering on major device number. These are assigned randomly
these days so filtering on them makes no sense other than as a foot-shooting
device.
2005-02-27 17:22:36 +00:00
David E. O'Brien
ecb90dcc75 style(9). 2005-02-26 01:19:21 +00:00
Pawel Jakub Dawidek
4a06539f21 Add a missing comma. 2005-02-25 17:22:23 +00:00
David E. O'Brien
5fb7027c82 Allow a forced dump even if the dump header information is inconsistent.
Output more verbosity with additional -v's.

Submitted by:	seanc
2005-02-24 02:45:10 +00:00
Tom Rhodes
087f49016f Fix a couple of grammar nits.
PR:		77437
Submitted by:	Paul A. Hoadley <paulh@logicsquad.net> (original version)
2005-02-24 01:00:09 +00:00
Andre Oppermann
099dd0430b Bring back the full packet destination manipulation for 'ipfw fwd'
with the kernel compile time option:

 options IPFIREWALL_FORWARD_EXTENDED

This option has to be specified in addition to IPFIRWALL_FORWARD.

With this option even packets targeted for an IP address local
to the host can be redirected.  All restrictions to ensure proper
behaviour for locally generated packets are turned off.  Firewall
rules have to be carefully crafted to make sure that things like
PMTU discovery do not break.

Document the two kernel options.

PR:		kern/71910
PR:		kern/73129
MFC after:	1 week
2005-02-22 17:40:40 +00:00
Gleb Smirnoff
ef3abbe88a Use afswch->af_other_status for carp_status() and pfsync_status().
Sponsored by:	Rambler
2005-02-22 14:07:47 +00:00
Gleb Smirnoff
a97719482d Add CARP (Common Address Redundancy Protocol), which allows multiple
hosts to share an IP address, providing high availability and load
balancing.

Original work on CARP done by Michael Shalayeff, with many
additions by Marco Pfatschbacher and Ryan McBride.

FreeBSD port done solely by Max Laier.

Patch by:	mlaier
Obtained from:	OpenBSD (mickey, mcbride)
2005-02-22 13:04:05 +00:00
Michael Reifenberger
d111a5c972 Document the terabyte "-s" parameter in the usage string.
Split the usage line to not exceed 80 chars.
2005-02-21 09:09:07 +00:00