Commit Graph

4815 Commits

Author SHA1 Message Date
ru
6117baacde MFC: 1.8: Fix malloc size. 2005-11-16 08:08:48 +00:00
ru
5ea8a2c406 MFC: 1.26: err() -> errx() where appropriate. 2005-11-16 08:08:07 +00:00
ru
5d8ba22e49 MFC: Simplified markup. 2005-11-16 08:06:23 +00:00
iedowse
877d481a1c MFC 1.111: 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.
2005-11-10 09:52:56 +00:00
rse
8845971810 MFC:
| Fix parsing of mdmfs(8) option "-w <user>:<group>" in case <user> or
| <group> is a numeric user/group ID instead of a user/group name (as
| explicitly intended to be allowed by both the manual page and the
| implementation).
|
| Before this fix, mdmfs(8) aborted:
|
| | # mdmfs -s 32m -w 0:0 md /var/tmp/foo
| | Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555.
| | Abort trap (core dumped)
|
| The "mi_have_[ug]id" fields were only set in case a name lookup was
| successful. Instead they also have to be set in case the string to
| integer conversion was successful.
|
| Additionally, as a result of this fix, two assertions at the end of
| the function are now always true and hence can be just be removed. It
| is guarrantied that both the UID and the GID are set when the function
| returns regularily, else it would have been already bailed out with
| usage()/exit(3) or errx(3) before.
|
| Spotted by:     Christoph Schug <chris@schug.net>
2005-11-04 19:37:14 +00:00
csjp
b559f044a4 MFC notes about ucred based rules and debug.mpsafenet requirements.
Approved by:	re (scottl)
2005-10-26 21:58:42 +00:00
imp
3315386261 MFC: 1.26 remove 'string' to avoid shadowing a variable we want to change.
Approved by: re@ (scottl)
2005-10-25 19:59:22 +00:00
glebius
dc34959a86 Merge the 'kldstat -q' functionality, that is required for proper
operation of the /etc/rc.d/pfsync script, that was merged before
the RELENG_6_0 has been forked.

Approved by:	re (kensmith)
2005-10-14 14:02:25 +00:00
cvs2svn
769ea47baf This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-10-13 18:12:47 +00:00
cvs2svn
8494e77c0e This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-10-13 17:57:35 +00:00
delphij
4e1ef01420 MFC (by dds)
| 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
|
| Revision  Changes    Path
| 1.18      +7 -1      src/sbin/restore/interactive.c

Approved by:	re (scottl)
2005-10-09 03:50:30 +00:00
delphij
7c007a1069 MFC (by stefanf):
| The libedit update made a const cast necessary.
|
| Revision  Changes    Path
| 1.30      +1 -1      src/sbin/fsdb/fsdb.c

Approved by:	re (scottl)
2005-10-09 03:45:28 +00:00
thompsa
34f6f0204d MFC r1.2
Display the status of the spanning tree for each port.

        member: xl0 flags=7<LEARNING,DISCOVER,STP>
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
 to:
        member: xl0 flags=7<LEARNING,DISCOVER,STP>
                port 3 priority 128 path cost 55 forwarding
        member: gem0 flags=7<LEARNING,DISCOVER,STP>
                port 1 priority 128 path cost 55 learning

Approved by:	re (scottl)
2005-10-08 21:19:15 +00:00
maxim
2d97b0f05a MFC rev. 1.77: restore kerneldumpheader.architectureversion bytes
swopping.

Approved by:	re (kensmith)
2005-10-08 17:57:15 +00:00
glebius
97d261903e Big overall MFC of polling(4) cleanup:
o First attempt on removing Giant from polling. Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-September/051848.html
o Second attempt, and big polling cleanup including:
  - Functinal approach to turning polling on/off
  - Deprecating of poll_in_trap
  - Removal of ifnet knowledge from kern_poll.c
  Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053267.html
o Improved checking of user configurable sysctls. Details:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053351.html
o Moving DEVICE_POLLING from opt_global.h to opt_device_polling.h:
  http://lists.freebsd.org/pipermail/cvs-src/2005-October/053479.html

o All related documentation fixes.

Approved by:	re (kensmith)
Thanks to:	everyone, who helped with testing
2005-10-07 14:00:06 +00:00
imp
6e436f7dec MFC: if no device-name, look at subsystem
Approved by: re@ (scottl)
2005-10-06 23:12:05 +00:00
pjd
2602cc468e MFC: sbin/geom/class/mirror/gmirror.8 1.17
Add a note in example as well, that last sector is used for metadata,
so it don't provoke confusions.

Noticed by:	Victor Sudakov <sudakov@sibptus.tomsk.ru>
Approved by:	re (scottl)
2005-10-06 18:19:13 +00:00
yar
70ec80eace MFC:
ifconfig.c 1.116

	For the sake of consistency and easier typing,
	introduce "-tunnel" as an alias for "deletetunnel".
	The latter is overly long and prone to typos,  but
	keep it for POLA since it costs nothing.

    ifvlan.c 1.8

	Deprecate the useless argument to -vlandev.

    ifconfig.8 1.102-1.105

	Document the above changes.
	Logically group vlan- and tunnel-related parameters.

Approved by:	re (scottl)
2005-10-06 15:01:56 +00:00
rodrigc
7d90e26485 MFC 1.81
Call gctl_free() to free resource allocated with gctl_get_handle().

PR:		bin/84664
Submitted by:	Daan Vreeken <Danovitsch at Vitsch dot net>
Approved by:	re (scottl)
2005-10-05 01:16:39 +00:00
rse
6635211f80 MFC to RELENG_6:
| Fix system shutdown timeout handling by again supporting longer running
| shutdown procedures (which have a duration of more than 120 seconds).
|
| We have two user-space affecting shutdown timeouts: a "soft" one in
| /etc/rc.shutdown and a "hard" one in init(8). The first one can be
| configured via /etc/rc.conf variable "rcshutdown_timeout" and defaults
| to 30 seconds. The second one was originally (in 1998) intended to be
| configured via sysctl(8) variable "kern.shutdown_timeout" and defaults
| to 120 seconds.
|
| Unfortunately, the "kern.shutdown_timeout" was declared "unused" in 1999
| (as it obviously is actually not used within the kernel itself) and
| hence was intentionally but misleadingly removed in revision 1.107 from
| init_main.c. Kernel sysctl(8) variables are certainly a wrong way to
| control user-space processes in general, but in this particular case the
| sysctl(8) variable should have remained as it supports init(8), which
| isn't passed command line flags (which in turn could have been set via
| /etc/rc.conf), etc.
|
| As there is already a similar "kern.init_path" sysctl(8) variable which
| directly affects init(8), resurrect the init(8) shutdown timeout under
| sysctl(8) variable "kern.init_shutdown_timeout". But this time document
| it as being intentionally unused within the kernel and used by init(8).
| Also document it in the manpages init(8) and rc.conf(5).
|
| Reviewed by: phk
| MFC after: 2 weeks
|
| Revision  Changes    Path
| 1.48      +7 -1      src/sbin/init/init.8
| 1.61      +1 -1      src/sbin/init/init.c
| 1.264     +16 -1     src/share/man/man5/rc.conf.5
| 1.257     +11 -0     src/sys/kern/init_main.c

Approved by: re (scottl)
2005-10-04 17:29:00 +00:00
ru
6efd618657 MFC: 1.46: Document that -q also affects "route change".
Approved by:	re (hrs)
2005-10-02 13:44:05 +00:00
nyan
9fa3c16a94 MFC: Call gctl_free() to free resource allocated with gctl_get_handle().
Approved by:	re (kensmith)
2005-09-30 13:09:01 +00:00
glebius
5dcd652b76 MFC 1.80:
- Understand EADDRINUSE, and forget EDQUOT. [1]
  - Add description for EEXIST.
  - Change description for ENOBUFS. Routing socket can return
    this error for many different reasons, including general
    memory shortage, mbuf memory shortage and rtentry zone.

  PR:	kern/64090 [1]

Approved by:	re (scottl)
2005-09-26 15:00:34 +00:00
keramida
754be4de67 MFC: a lot of manpage fixes from HEAD.
Approved by:	re (hrs)
2005-09-24 01:59:40 +00:00
rwatson
80b8ca94f5 Merge sysctl.8:1.59, sysctl.c:1.68 from HEAD to RELENG_6:
Add "-q" argument to sysctl(8), which suppresses a limited set of
  warnings/ errors generated.  In particular, it suppresses "unknown oid"
  when attempting to get or set a sysctl not present in the kernel.

Approved by:	re (kensmith)
2005-09-22 15:30:21 +00:00
rwatson
390cc7eacc Merge savecore.c:1.76 from HEAD to RELENG_6:
Don't consider being unable to open the bounds file worthy of printing
  at LOG_WARNING by default; instead, consider it something to be printed
  to the tty when 'verbose' mode is set.  This avoids printing out extra
  lines at every boot on a system with crash dumps enabled, but that has
  not yet had to generate a crashdump.

Approved by:	re (kensmith)
2005-09-20 13:29:37 +00:00
rodrigc
c5e33d3c5e MFC: 1.61
Clarify wording for -m flag.

PR:     docs/84704
Approved by:	re (hrs)
2005-09-20 00:34:54 +00:00
marcus
534fb07b6c MFC:
Correct a mis-merge from HEAD, and make sure the socket permissions are set
to 0666.

Reported by:	delphij via rwatson
Approved by:	re (scottl)
2005-09-19 21:50:31 +00:00
pjd
1bd06e2421 MFC: sbin/geom/class/eli/geom_eli.c 1.4
Even if there are no valid keys in metadata, but provider is attached
we can still use setkey subcommand.

Found by:	regression tests
Approved by:	re (scottl)
2005-09-15 14:12:54 +00:00
marius
965ad6c04f MFC: 1.10
As with NO_CRYPT, don't try to compile geli(8) when NO_OPENSSL is defined
either.

Approved by:	re (scottl)
2005-09-14 21:21:45 +00:00
brooks
95d5cce419 Sync dhclient with HEAD with exception of bpf.c:1.5.
sbin/dhclient/*.c:
 - add __FBSDID
sbin/dhclient/conflex.c: 1.3-1.4
 - fix a minor buffer overflow in config parsing
 - actually support backslash escaping in config files
bin/dhclient/dhclient-script: 1.6-1.10
 - don't create or remove routes to our address through 127.0.0.1
 - improved detection of the interface of the default route
 - support quotes in the medium string
 - clear interface state more effectively on failure
 - don't update resolv.conf when unchanged
bin/dhclient/dhclient.c: 1.10-1.11
 - validate domain-name (used as resolv.conf search string)
 - handle superseded subnet-mask correctly

Approved by:	re (scottl)
2005-09-10 17:01:16 +00:00
csjp
af543027a3 MFC md.c rev 1.154
MFC mdconfig.c rev 1.44

Dont allow read only backing stores to be modified

PR:		kern/84635
Approved by:	re (kensmith)
2005-09-09 21:39:47 +00:00
marcel
fe61c11618 Sync with HEAD:
Makefile: 1.7
	add.c: 1.12, 1.23
	create.c: 1.11
	destroy.c: 1.6
	gpt.8: 1.14, 1.15
	gpt.c: 1.11, 1.12, 1.13
	gpt.h: 1.8, 1.9, 1.10
	label.c: 1.1
	map.c: 1.6
	map.h: 1.6
	migrate.c: 1.14, 1.15, 1.16
	recover.c: 1.8
	remove.c: 1.5, 1.6, 1.7, 1.8
	show.c: 1.12, 1.13
o  New -l and -u options to the show command,
o  New label command to support GPT labels,
o  The remove command doesn't print the total partitions removed,
   as it prints each partition it removes by name already,
o  Added ellipsis to most usage messages.

PR: ia64/83124
Approved by: re (scottl)
2005-09-06 23:59:01 +00:00
sam
b9f7746f1f sync with HEAD for net80211 changes:
o list mac support
o update manual page

Approved by:	re (scottl)
2005-09-03 22:47:47 +00:00
cvs2svn
fa22dafdfa This commit was manufactured by cvs2svn to create branch 'RELENG_6'. 2005-09-03 06:59:35 +00:00
keramida
3ff9d1b73b MFC 1.23:
Make it clear that the .ko extention of a module to be loaded
is optional.

Approved by:	re (hrs)
2005-08-31 13:57:37 +00:00
pjd
38a6d09956 MFC: sys/geom/eli/g_eli.c 1.6-11
sys/geom/eli/g_eli.h	1.3-4
	sys/geom/eli/g_eli_ctl.c	1.2
	sbin/geom/class/eli/geli.8	1.4-6
	sbin/geom/class/eli/geom_eli.c	1.3

Sync with HEAD:
- We don't need to clear allocated memory. This will speed-up things a bit.
- Even if crypto_dispatch() return an error, request is not canceled and
  our callback will still be called, just to tell us that requested
  failed...
- Always run dedicated kernel thread (even when we have hardware support).
  There is no performance impact, but allows to allocate memory with
  M_WAITOK flag.
  As a side effect this simplify code a bit.
- Allow to change number of iterations for PKCS#5v2. It can only be used
  when there is only one key set.
- Add a __packed keyword to g_eli_metadata struct definition, so
  sizeof(struct g_eli_metadata) will return the exact number of bytes needed
  for storing it on the disk.
  Without this change GELI was unusable on amd64 (and probably other 64-bit
  archs), because sizeof(struct g_eli_metadata) was greater than 512 bytes
  and geli(8) was failing on assertion.

Approved by:	re (scottl)
2005-08-30 15:27:30 +00:00
pjd
aa0b63102c MFC: sbin/class/raid3/geom_raid3.c 1.13
sbin/misc/subr.c	1.4
	sbin/misc/subr.h	1.4

Move function for calculating number of bits into more central place.

Approved by:	re (scottl)
2005-08-30 15:09:06 +00:00
keramida
8081c1d979 MFC 1.34: Spell "partition" correctly.
Reminded by:	simon
Approved by:	re (scottl)
2005-08-24 15:42:12 +00:00
simon
f1b084d403 MFC rev 1.35:
Remove reference to raid(4), the RAIDframe manual page, which was
  deleted a while ago.

Approved by:	re (scottl)
2005-08-24 08:07:29 +00:00
bz
bf3595b8d8 MFC:
rev. 1.108, 1.109 src/sys/netinet/ip_fw2.c
rev. 1.101        src/sys/netinet/ip_fw.h
rev. 1.77         src/sbin/ipfw/ipfw2.c
rev. 1.176        src/sbin/ipfw/ipfw.8

* Add dynamic sysctl for net.inet6.ip6.fw.
* Correct handling of IPv6 Extension Headers.
* Add unreach6 code.
* Add logging for IPv6.
* Fix build without INET6 and IPFIREWALL compiled into kernel.[1]

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@
Spotted and tested by:  Michal Mertl <mime at traveller.cz>[1]
Approved by:    re (kensmith)
2005-08-20 08:36:57 +00:00
brueffer
3f7188ceb3 MFC: rev. 1.27
Clarify how the 'channel' argument should look like and add an
example on how to obtain information on devices on an ata channel.

Approved by:	re (hrs)
2005-08-19 15:54:42 +00:00
nyan
ebca1aed62 MFC: Attempt g_ctl for metadata modification.
Approved by:	re (kensmith)
2005-08-19 12:43:55 +00:00
glebius
10a0fa240e MFC:
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)

Approved by:	re (kensmith)
2005-08-19 09:29:25 +00:00
thompsa
3dfb8775ca MFC: ifconfig.8, r1.101
> Document two missed if_bridge commands 'addr' and 'static'.

Approved by:	re (hrs), mlaier (mentor)
2005-08-17 02:27:08 +00:00
phk
abc7f53327 MFC: use g_ctl for metadata modification if possible.
Approved by:	re@
2005-08-16 22:46:05 +00:00
pjd
b432c993ef MFC: sbin/geom/class/eli/geom_eli.c 1.2
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.

Approved by:	re (kensmith)
2005-08-16 09:02:22 +00:00
pjd
80716b8623 MFC: sbin/geom/class/eli/geli.8 1.3
sys/geom/eli/g_eli.c		1.4,1.5

- GELI doesn't need cryptodev.
- Because code paths for I/O requests are quite complex, add comments above
  the functions which participate in I/O paths.

Approved by:	re (kensmith)
2005-08-16 08:58:33 +00:00
pjd
c385fd9b5d MFC: sbin/geom/core/geom.c 1.23
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.

Approved by:	re (kensmith)
2005-08-16 08:45:11 +00:00
pjd
ea84465e92 MFC:
- Add code for Ext2FS and ReiserFS labels recognition.
- Avoid creating directories in devfs by changing all '/' in labels to '_'.

Submitted by:	Stanislav Sedov <stas@310.ru>
PR:		kern/84638
Approved by:	re (kensmith)
2005-08-16 08:20:48 +00:00