Commit Graph

4652 Commits

Author SHA1 Message Date
elad 3ea3b1e63e Scripts don't have to be *shell* scripts. 2006-09-16 17:17:23 +00:00
elad 172a3fa471 Remove securelevel-related text from init(8) man-page as they're now in
secmodel_bsd44(9).

I'm not sure I agree with the BUGS section, but for now move it to
secmodel_bsd44(9) as well.
2006-09-15 20:20:06 +00:00
wiz d4ee8b696e Bump date for previous. 2006-09-15 20:11:13 +00:00
elad 56b99b4fca Remove sentence no longer true. 2006-09-15 14:41:57 +00:00
wiz 49751ff510 Sort options in usage and SYNOPSIS. 2006-09-10 20:28:52 +00:00
xtraeme a0a2046917 - Change the cast of st_size to uint64_t to avoid future problems
with large files.
- u_uintXX_t -> uintXX_t
2006-09-08 12:38:32 +00:00
riz 7bbc0ebe95 include <bsd.own.mk>. From Geoff Wing on source-changes. 2006-09-07 23:53:41 +00:00
dogcow f2d329dca0 remove more vestiges of CCITT, LLC, HDLC, NS, and NSIP. 2006-09-07 02:40:31 +00:00
xtraeme 96734c01d1 Change -f to -F, per mrg's suggestion. 2006-09-07 02:24:51 +00:00
xtraeme 7aa92d971b Add -f file support. Useful to search for partitions on disk images. 2006-09-07 00:48:21 +00:00
riz d28b2bee5d Deal with wedges and the new disk geometry structures, instead of using
struct disklabel.  (Shrinking a file system still seems to have problems,
though, independent of this change)
2006-09-05 19:46:14 +00:00
riz 3d1e464b85 Deal with wedges and the new disk geometry structures, instead of using
struct disklabel.  From Christos Zoulas.
2006-09-05 19:44:44 +00:00
elad 95ed982c27 Fix two horrible bugs found during a routine audit session with Brett Lymn.
First one was incorrectly loading entries -- we were treating each file as
a mount, which resulted in huge mess. I have no excuse for how I didn't
catch this earlier.

Second, use the table name we create for the Veriexec sysctl node and not
the fixed "table0".

Both are fileassoc(9) integration fallout.
2006-09-05 13:02:16 +00:00
rpaulo 2fb2ae3251 Import of TCP ECN algorithm for congestion control.
Both available for IPv4 and IPv6.
Basic implementation test results are available at
http://netbsd-soc.sourceforge.net/projects/ecn/testresults.html.

Work sponsored by the Google Summer of Code project 2006.
Special thanks to Kentaro Kurahone, Allen Briggs and Matt Thomas for their
help, comments and support during the project.
2006-09-05 00:29:35 +00:00
liamjfoy 2e60755ac8 add net.inet.ip.maxflows. Bump date. 2006-09-04 23:40:18 +00:00
wiz fa959b48e1 Bump date for previous. 2006-09-04 18:34:42 +00:00
wiz 9f28457331 errx() provides a newline on its own, so remove the one from the error string. 2006-09-04 18:34:22 +00:00
riz 16da560700 Correct usage: "-s" is the flag for the new size of the LFS, not "-n". 2006-09-04 15:45:29 +00:00
simonb ea0fd530d1 One "const" is enough... 2006-09-04 01:20:44 +00:00
simonb f87636ddd9 Const poisoning. 2006-09-04 01:20:14 +00:00
wiz 84f9a9145e Sort sections. Fix typo. Start sentence with upper-case letter. 2006-09-02 23:58:41 +00:00
uwe cc439cea4f New NetBSD/landisk port uses MBR too. 2006-09-01 21:44:02 +00:00
perseant cb2499ac6e Several fixes to improve the reliability of the roll-forward agent.
Also, note "properly orphaned" files as distinct from corrupted files.
2006-09-01 19:52:48 +00:00
dyoung 47be766fd3 Add a mode to gre(4) that sends GRE tunnel packets in UDP datagrams.
Fix MOBILE encapsulation.  Add many debugging printfs (mainly
concerning UDP mode).  Clean up the gre(4) code a bit.  Add the
capability to setup UDP tunnels to ifconfig.  Update documentation.

In UDP mode, gre(4) puts a GRE header onto transmitted packets,
and hands them to a UDP socket for transmission.  That is, the
encapsulation looks like this: IP+UDP+GRE+encapsulated packet.

There are two ways to set up a UDP tunnel.  One way is to tell the
source and destination IP+port to gre(4), and let gre(4) create
the socket.  The other way to create a UDP tunnel is for userland
to "delegate" a UDP socket to the kernel.
2006-08-31 17:46:16 +00:00
martin 2675789424 Add a caveats section describing potential problems with autoconfigured
swap partitons.
2006-08-27 22:00:33 +00:00
martin 0a4f0b6f07 As discussed on tech-userlevel: enhance the -A/-U commands to take a -t
auto flag, which queries all local harddisks for swap partitions/
wedges and adds/removes them as swap device, a -f option to use the
first found swap device as dump device, and a -o option to only
auto-configure the dump device, but leave swap alone.

Add a -n option to make swapctl only say what it would do, but not
change any system state.
2006-08-27 21:07:39 +00:00
christos 41cacf46ed Make the "traditional" comment match reality. 2006-08-27 18:49:08 +00:00
christos a1ed611584 Don't hard-code 3. From our secret user. 2006-08-27 18:27:49 +00:00
christos e0811114bb add a const 2006-08-27 09:20:53 +00:00
christos 52bdc9cda3 need getdiskinfo. 2006-08-27 01:37:28 +00:00
christos 5a70d8a008 - Deal with wedges and the new disk geometry structures, instead of using
struct disklabel.

Functionality lost:
  1. struct disklabel used to be updated to contain bsize, fsize, cpg.
     This information was used to locate the alternative superblock in
     the filesystem if the primary superblock was corrupted. We need
     to find a new place to store this information if we need this
     functionality.
  2. On vax SMD drives that contained bad sector lists, the newfs program
     knew how to get the offset and skip to the correct location in order
     to place the label.
2006-08-26 22:03:47 +00:00
christos 09e8908e10 - make preen recognize wedges and insert their parent disks in the disk list
so that we don't run multiple fsck's on the same spindle at the same time!
- Add some partition getting utilities that are wedge aware (soon to be able
  to use the native geometry ioctl), so that we can fsck wedges.
2006-08-26 21:54:05 +00:00
christos 2a1607d040 Programs that use efun. 2006-08-26 18:14:28 +00:00
matt cca9bcea2e Nuke a leftover XNS fragment. 2006-08-26 16:59:27 +00:00
matt bb735e0ef9 Remove XNS support. 2006-08-26 16:20:20 +00:00
matt e6ff03ce6f Remove XNS and CCITT/X25 bits. 2006-08-26 15:26:02 +00:00
wiz d728febe7a Sort options. Sync usage with man page. 2006-08-23 20:59:09 +00:00
wiz 2161b003f1 Sort sections. Fix typos. 2006-08-23 20:53:53 +00:00
martin fb07e2dde3 Only one -D synopsis line 2006-08-22 21:38:39 +00:00
martin b99b0d9adb Allow unsetting the dump device via "swapctl -D none".
For -l (list swap partitions) and -z (list dump device) return a usefull
error status, so scripts can easily decide if swap or dump are configured.
2006-08-22 14:08:36 +00:00
christos f06e8d55c6 Revert previous. It is not ready for public consumption. 2006-08-17 22:21:27 +00:00
christos 2e4a4ae4c9 Don't use || if you need &&. 2006-08-17 20:06:06 +00:00
uwe b87585ec3c Mark splash.enable and splash.progress write-only, there are no ioctls
to get the values.
2006-08-13 23:52:11 +00:00
wiz 003523496e Add -x to usage. 2006-08-13 23:24:53 +00:00
wiz 85d38d942b Bump date for new -x. 2006-08-13 23:23:30 +00:00
bjh21 952b42f672 Fix typos in messages: SHOULE -> SHOULD 2006-08-13 22:18:09 +00:00
dyoung a79c18d72f Add a flag to wdogctl(8), -x, that activates a user-mode timer that
is NOT disarmed when wdogctl closes the watchdog device.  The -x
mode protects against the case where the kernel kills wdogctl,
sshd, and other essential userland programs (due to memory exhaustion,
for example), lobotomizing a mission-critical NetBSD system and
necessitating an operator visit to reboot it.
2006-08-13 01:11:01 +00:00
ghen 6c96070844 scan_ffs(8) has been pulled up into netbsd-3 and thus will have
"first appeared in NetBSD 3.1", not 4.0.
2006-08-12 10:14:22 +00:00
wiz 4a3dddea24 Bump date for previous. 2006-08-08 22:11:42 +00:00
kardel 64e74c80df document timecounter sysctls 2006-08-08 19:47:44 +00:00
wiz 8d3619d115 Bump date for previous. 2006-08-06 23:38:13 +00:00
dyoung 9dde08c82f Document -nocloning, -nocloned flags. Shift a couple of columns
right by a character width, to make room for the new flags.
2006-08-06 21:47:35 +00:00
dyoung 2bc777d5d0 KNF err(3), errx(3) usage, indentation, braces. 2006-08-06 17:47:17 +00:00
dyoung 61dbc26298 Add route keywords -nocloned, -nocloning. 2006-08-06 17:44:56 +00:00
perseant fb882cd53a Ensure sector size is zero in the debug case, to avoid a division by zero
error pointed out by Zafer Aydogan.
2006-08-06 00:21:14 +00:00
perseant f4bbda4f6c Don't try to even fake building a filesystem on a file descriptor that is
neither a file nor a character special device.
2006-08-06 00:14:17 +00:00
elad 03917bd261 update comment, thanks freza@. 2006-07-30 20:01:26 +00:00
elad f1d99e7dfa CTLFLAG_READONLY1 and CTLFLAG_READONLY2 were deprecated in earlier commit, remove them here too 2006-07-30 19:53:20 +00:00
elad 8bc495196e CTLFLAG_READONLY1 was deprecated in earlier commit, remove it here too 2006-07-30 19:53:19 +00:00
elad 8ffd510349 remove CTLFLAG_READONLY1 usage. pointed out by cube@, thanks.. 2006-07-30 19:46:33 +00:00
wiz 1702d6b574 Drop trailing whitespace. 2006-07-23 13:23:12 +00:00
bouyer d252c65e9c Add a /dev/amr* control file for amr(4) devices, which allows sending raw
commands to the controller.
Add a amrctl(8) control tool, which for now only allows to get status
from the adapter (status of adapter, logical volumes and and individual
drives).
From FreeBSD, with some adjustements by Andrew Doran and me.
2006-07-23 12:01:25 +00:00
elad 0f70b7df59 no VERIFIED_EXEC anymore, just a pseudo-device. 2006-07-22 10:43:51 +00:00
perseant fabf2934ae On-disk inode accounting fix for roll-forward. 2006-07-19 22:48:11 +00:00
perseant a37f15f04c Don't doubly free an inode remove_ino() during roll-forward. 2006-07-19 02:45:10 +00:00
perseant a0a4c29df0 Quell uninitialized-variable warning that appeared when compiling for macppc. 2006-07-18 23:47:44 +00:00
perseant 29f1062b46 Various improvements to fsck_lfs, to wit:
* Add lfs_balloc capability to the lfs library.
* Extend the Ifile if we run out of free inodes when creating lost+found.
* Don't roll forward if we have allocated a lost+found, to avoid
  conflicts when adding new files in roll-forward.
* Make some messages slightly more verbose (e.g. include inode number,
  and use pwarn() instead of printf() so the messages include the device
  name when preening).
* Change superblock detection/avoidance to use the offset table in the
  primary superblock, rather than looking at the contents.
* Be more verbose about various operations when passed the -d flag,
  especially roll-forward.
* Be more careful about dirops during roll forward, since the cleaner can
  sometimes write blocks from dirop vnodes.  Detect and avoid this problem.
* Always check the free list, even if given -i; if we're going to write
  it we have to check it first.
* Mark inodes dirty when blocks are found during roll forward, so the
  inodes are written with the new block locations.
* Update size of inodes if blocks beyond EOF are found during roll
  forward.
* Fix segment accounting for blocks and inodes found during roll
  forward.
* Report statistics on roll forward: how many new/deleted/moved files
  and how many updated blocks (or "nothing new").
* Don't care if the device being checked is really a device, if we have
  been passed the -f flag (to facilitate automated testing).
* When writing to the disk, use the current time in the segment headers
  rathern than time 0.
* When passed the -i flag, locate the partial segment containing the
  Ifile inode and use that to calculate lfs_offset, lfs_curseg,
  lfs_nextseg.  (Again for automated testing.)
2006-07-18 23:37:13 +00:00
elad b2b73a2973 misc cleanup: remove #if 0 code, unused var, and make pretty. 2006-07-14 23:00:09 +00:00
elad bb74ea2d6b oops, forgot to handle new abi for "query", noted by he@, thanks! 2006-07-14 22:42:05 +00:00
elad 1c8d298b89 move security.setid_core.* to kern.coredump.setid.*, as requested by yamt@. 2006-07-14 21:55:19 +00:00
elad b5d09ef065 okay, since there was no way to divide this to two commits, here it goes..
introduce fileassoc(9), a kernel interface for associating meta-data with
files using in-kernel memory. this is very similar to what we had in
veriexec till now, only abstracted so it can be used more easily by more
consumers.

this also prompted the redesign of the interface, making it work on vnodes
and mounts and not directly on devices and inodes. internally, we still
use file-id but that's gonna change soon... the interface will remain
consistent.

as a result, veriexec went under some heavy changes to conform to the new
interface. since we no longer use device numbers to identify file-systems,
the veriexec sysctl stuff changed too: kern.veriexec.count.dev_N is now
kern.veriexec.tableN.* where 'N' is NOT the device number but rather a
way to distinguish several mounts.

also worth noting is the plugging of unmount/delete operations
wrt/fileassoc and veriexec.

tons of input from yamt@, wrstuden@, martin@, and christos@.
2006-07-14 18:41:40 +00:00
yamt ff6f0069a4 prtsig: remove a mysterious abort(). 2006-07-14 05:43:49 +00:00
martin 50edcae7de Trying the old "ifconfig <name> x.x.x.x down" issue again:
if the kernel does not set the interface up after we set an address,
do it explicitly, unless we (previously) set it down on user request.

This will allow the network drivers to be "fixed" while keeping visible
behaviour the same. Part of fixing PR 30694.
2006-07-13 14:02:03 +00:00
kardel e386d70092 accept either "time_second" or "time" as kernel timevariable in
order to support common userland in enviroments where
timecounter kernels and non timecounter kernel co-exist
(e.g. xen & i386)
2006-07-09 06:43:16 +00:00
tsutsui 835463e99a Misc fixes for sl(4) and slattach(8) man pages:
- note that ifconfig(8) create subcommand is required before slattach(8)
- network addresses aren't defined by slattach(8) but ifconfig(8)
- Add a BUGS section in slattach(8) to note that currently there is no way to
  specify/see an interface name to be attached
- move description about link[0-2] flags from slattach(8) to sl(4)
  (rather than adding a new description...)
- move description about SLIP limitations to a new BUGS section in sl(4)
- remove inappropriate MLINKS of slip.8 to slattach.8
- create MLINKS of slip.4 to sl.4 instead
- add some more xrefs

Ok'ed by christos, and closes PR kern/33672 and PR bin/33923.
2006-07-08 17:22:14 +00:00
ross a75e5e7741 Replace complicated test for ELFSIZE 64 with #ifdef _LP64 which is
the netbsd convention. Rig the old test temporarily to a #error
sanity check.
2006-07-08 05:49:01 +00:00
hubertf 33bed52cb8 Replace strcpy() call with strlcpy() call.
OK'd by christos@
2006-07-07 17:25:01 +00:00
drochner c6b8e0a9fe fix an Xref 2006-06-30 15:51:36 +00:00
lukem 272515842e Support MAKEVERBOSE.
Use CLEANFILES to cleanup temp files instead of rm.
Cosmetic tweaks.
2006-06-28 15:03:00 +00:00
lukem a0f0fb81a8 Convert to using CC instead of LD, as LDFLAGS is for CC not LD. 2006-06-28 15:00:51 +00:00
hubertf c1f1683df1 * constify
* replace two calls to strncpy() with strlcpy(), eliminating some
   magic numbers

OK'd by christos@
2006-06-26 22:42:45 +00:00
christos 29c1a4c22e GCC4 fixes from Mike Pumford 2006-06-25 21:32:39 +00:00
wiz abefac52de Use Dv for a macro; new sentence, new line. 2006-06-24 07:57:07 +00:00
perseant 1c57171fe3 Change LFCNWRAP{STOP,GO} to make them more suitable for snapshotting; in
particular, the caller can now choose whether to wait for the condition
to be met, and if the caller of LFCNWRAPSTOP dies or otherwise closes
the descriptor, the filesystem is started again.  Updated the ckckp
regression test to use the new semantics.

dump_lfs(8) now uses the fcntls to implement LFS-style snapshotting through
the -X flag, addressing PR#33457 albeit not using fss(4).  Fixed a couple
other problems with dump_lfs that manifested themselves during testing.
2006-06-24 05:28:54 +00:00
mrg 9bf1d4a9b8 work around some GCC4 internal problems on m68000 platform.
document the hack, and update another GCC4 list.
2006-06-24 05:21:11 +00:00
gdamore a5c89047c0 Initial import of bluetooth stack on behalf of Iain Hibbert. (plunky@,
NetBSD Foundation Membership still pending.)  This stack was written by
Iain under sponsorship from Itronix Inc.

The stack includes support for rfcomm networking (networking via your
bluetooth enabled cell phone), hid devices (keyboards/mice), and headsets.

Drivers for both PCMCIA and USB bluetooth controllers are included.
2006-06-19 15:44:33 +00:00
christos ea14c28779 fix typo 2006-06-17 02:16:19 +00:00
elad 70e875f636 strcpy -> strlcpy
okay christos
2006-06-16 23:49:22 +00:00
elad d10cf99230 fix incorrect usage of strncpy() to (an internal implementation of)
estrlcpy().

okay christos
2006-06-16 23:48:35 +00:00
tron 2ab5da17ce Adapt ifconfig(8) to new return value from socket(2). This stops
ifconfig(8) from printing errors like "ifconfig: socket: Address
family not supported by protocol family" when examining the status
of a network interface.
2006-06-14 11:05:42 +00:00
christos 65c3a16644 PR/33695: Arnaud Lacombe: Add compatibility syntax for FreeBSD interoperability. 2006-06-11 15:51:31 +00:00
kardel 75418af90c support timecounters (struct time gone, use time_second then) 2006-06-07 20:56:19 +00:00
christos 0bf2e0005a fix gcc warning. 2006-06-07 15:27:13 +00:00
christos c4c1a29bd4 don't use uint32_t when you mean size_t. 2006-06-06 16:19:11 +00:00
christos 657e8b0071 fsck_lfs does not us fsutil.c; perhaps it should? revert to perror for now. 2006-06-05 23:27:36 +00:00
christos 0268f6ea4e s/perror/perr 2006-06-05 16:53:14 +00:00
christos 6a6266cc74 s/perror/perr/ so that we can make it varyadic. Overloading stdio's perror()
sneaky.
2006-06-05 16:52:05 +00:00
christos 15f3040f9f - don't leak memory on allocation failure.
- s/perror/perr and print how much we were trying to allocate.
2006-06-05 16:51:18 +00:00
christos 0ca3098868 Use SA_NOKERNINFO instead of playing with the tty. 2006-06-03 18:19:55 +00:00
christos e5ea88eb01 PR/33633: Yoshito Komatsu: /sbin/fdisk does not work
Downgrade error getting heads to a warning.
2006-06-02 17:40:34 +00:00
christos 53516f73e1 Factor out the tty code and explain we prefer to stop in the ^Z bg case
when we exit, rather than kill the tty setting.
2006-06-01 18:04:08 +00:00
christos 8d1784140b PR/33623: Chuck Cranor: Ping stops when ran in the background
because it tries to set the tty not to print kerninfo. Change it
to only only play with the tty when ping is running in the foreground
(and will not stop when calling tcsetattr()). In my opinion, it is
preferable to print the kerninfo line with the ping info message
rather than to mess with the tty, but that's just me.
2006-06-01 15:59:31 +00:00
liamjfoy 27f99986a6 bump date (.Dd) 2006-05-29 19:35:31 +00:00
liamjfoy 10f12d58af document Common Address Redundancy Protocol sysctls, aka CARP
ok joerg@
2006-05-29 19:11:16 +00:00
yamt b1af57a6ba remove __POOL_EXPOSE. 2006-05-27 09:14:03 +00:00
christos 7d40b7b07f Coverity CID 830: Fix dead code issue 2006-05-25 15:32:17 +00:00
jnemeth 13eb323a11 Coverity CID 3447: Add extraneous checks to shut up Coverity. 2006-05-23 22:35:20 +00:00
christos e73d73289c Coverity CID 3287: Comment out dead code. 2006-05-23 01:03:16 +00:00
christos 124bff0089 PR/33522: Peter Bex: Sanity checks to avoid zerodivide. 2006-05-21 16:00:17 +00:00
yamt ebeaf83fb7 do not keep to use nfsv3 filehandle when falling back to nfsv2. 2006-05-20 08:06:48 +00:00
yamt ae4a112295 replace a magic constant with a macro. 2006-05-20 07:56:28 +00:00
yamt 248ca69bad copy missing copyright notices from
getnfsargs.c and sys/arch/i386/stand/libsa/nfs.c.
2006-05-20 07:48:39 +00:00
christos 326dc9f020 Coverity CID 3275: Plug memory leak. 2006-05-19 14:52:39 +00:00
christos e70330c76d Coverity CID 3656,3655: Plug memory leak. 2006-05-19 14:50:32 +00:00
liamjfoy 4876c304b1 Integrate Common Address Redundancy Procotol (CARP) from OpenBSD
'pseudo-device	carp'

Thanks to: joerg@ christos@ riz@ and others who tested
Ok: core@
2006-05-18 09:05:49 +00:00
rpaulo 25ff2bc882 Replace the way we calculate the standard deviation with the unbiased form
for non-related samples. There are several websites that explain why we
should use this form instead of the normal formula to compute the std. dev.
(Wikipedia is one of them).
Also, ping(8) (where this "new" formula came from) already does it this way
so, I'm trying to score some extra points by making both utilities behave
the same way.

Thanks to wrtstuden@ for the initial clarification.
2006-05-18 02:14:22 +00:00
rpaulo 83dc99da2a There are no broadcast addresses in IPv6, so, kill a leftover from the
ping(8) man page.
2006-05-18 00:50:08 +00:00
elad 04d63f90b5 Introduce PaX MPROTECT -- mprotect(2) restrictions used to strengthen
W^X mappings.

Disabled by default.

First proposed in:

	http://mail-index.netbsd.org/tech-security/2005/12/18/0000.html

More information in:

	http://pax.grsecurity.net/docs/mprotect.txt

Read relevant parts of options(4) and sysctl(3) before using!

Lots of thanks to the PaX author and Matt Thomas.
2006-05-16 00:08:24 +00:00
mrg 16efbf8575 don't do the -Wno-pointer-sign dance for host programs. 2006-05-12 01:18:25 +00:00
mrg aadd7d4847 sprinkle some -fno-strict-aliasing and -Wno-pointer-sign with GCC4. 2006-05-11 23:16:28 +00:00
mrg d2eb498e2b - log2() -> lfs_log2().
- fix a couple of entries in struct lfs lfs_default:
	- in a comment, it's called dlfs_freehd now
	- dlfs_inodefmt comes after dlfs_tstamp.  fortunately for this
	one, LFS_44INODEFMT is also 0 so the right thing was happening.
2006-05-11 16:56:50 +00:00
mrg 19b4ae1a8b remove extern for unused ifr6. 2006-05-11 00:46:02 +00:00
mrg c2d7663a8e __b64_pton() wants unsigned char *. 2006-05-11 00:42:08 +00:00
mrg 41093909e9 HMAC() wants unsigned int pointer for the final argument; make it so. 2006-05-11 00:40:54 +00:00
mrg 084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
mrg bc2e62d3b8 change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:30:15 +00:00
mrg 0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
rpaulo 84f73e685c Remove support support for RFC 2292. 2006-05-07 16:00:18 +00:00
christos 5fdb201207 We don't need ext2fs_extern.h 2006-05-06 22:23:37 +00:00
wiz 4d1a166e8b Remove trailing whitespace. 2006-05-06 07:01:22 +00:00
rpaulo 848d0be7cc len should be socklen_t, not size_t. Spotted by
Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>.
2006-05-05 12:49:23 +00:00
rpaulo de8db47547 Add support for RFC 3542 Adv. Socket API for IPv6 (which obsoletes 2292).
* RFC 3542 isn't binary compatible with RFC 2292.
* RFC 2292 support is on by default but can be disabled.
* update ping6, telnet and traceroute6 to the new API.

From the KAME project (www.kame.net).
Reviewed by core.
2006-05-05 00:03:21 +00:00
christos 32c4e3d517 Since MNT_GETARGS is not allowed when any other flags are set, don't set
ASYNC in the getargs case.
2006-05-04 19:46:10 +00:00
christos c543e3e4ab since yamt prohibits any flag with MNT_GETARGS, don't set MNT_UPDATE for
/ when we do getargs.
2006-05-04 19:38:50 +00:00
perseant efc48a3bfa newfs_lfs(8) compoment of the recent superblock parameter addition. Change
the wording of the explanation of the -M option, detail a new -R option
that controls initial setting of the new parameter.
2006-05-04 04:39:15 +00:00
yamt 69f5e94d4e define dummy NOCRED by ourselves, rather than assuming that kernel headers
provide it.
2006-05-03 15:04:51 +00:00
rpaulo 227effc121 Add two new options from FreeBSD:
hidessid | -hidessid:	SSID broadcast control
	apbridge | -apbridge:	how to pass packets between wifi clients
2006-04-29 21:32:29 +00:00
perseant 00d9f4be09 Avoid a core dump if ginode() returns NULL. Correct an error message
while we're here.
2006-04-28 00:07:54 +00:00
wiz 94aa5cae8a New sentence, new line. 2006-04-23 16:48:46 +00:00
jld aab6081169 When testing seek speed (for the -A option), use sector-aligned offsets
so the reads don't always fail, and also be more careful not to read off
the end of the disk.  If a read does fail, error out instead of silently
leaving the loop early (and possibly dividing by zero seconds), because
it means our idea of the disk size is wrong, or worse.

This fixes PR bin/33199.
2006-04-23 07:56:58 +00:00
skrll 7ba7efe154 Don't use cast expressions as lvalues as newer versions of gcc warn. 2006-04-21 15:00:49 +00:00
christos 23be85ae7f "struct ucred" should not be exposed to userland. Instead make it a "void *"
since it is not really used.
2006-04-19 15:52:58 +00:00
hannken f4729837b8 Emit "a snapshot of" message for snap_internal case too. 2006-04-19 15:42:12 +00:00
salo b0b7590bc7 Add support for running multi-user in a chroot() environment.
How it works:

- after successful execution of /etc/rc, check the value of "init.root"
  sysctl node, if it's different than "/", chroot() into its value and run
  /etc/rc inside the chroot(),

- in single-user, return back to the original / file system.

Allows running with / file system on e.g., cgd(4), vnd(4) or ccd(4) volumes.

Idea first discussed with Matt Thomas, implemented by Jachym Holecek <freza
(at) liberouter.org> with some nitpicks by me.  Successfully used by me for
almost a year with / on a cgd(4) volume (for more information about the setup
check ftp://ftp.NetBSD.org/pub/NetBSD/misc/salo/init-chroot/ ).
2006-04-18 11:40:26 +00:00
perseant 7700866e01 Remove the free list ordering/disordering code, since the kernel now keeps
the list in order (ordering it on mount).

Regularize error messages: these are now all in ALL CAPS, with all hex
numbers (not reported in caps) prefixed by 0x.  (The non-fsck-specific
messages are an exception to this all-caps rule.)
2006-04-17 19:05:16 +00:00
perseant 1f429c3724 Don't update the superblock if we were run with -n, regardless of whether
the "clean" bit is set.
2006-04-13 19:50:10 +00:00
dbj a015786b0d the root directory of non fat32 filesystems is stored in a special area.
a couple of corner cases can cause it to fail to write out that area
after it performs repairs.
2006-04-10 03:25:11 +00:00
jnemeth 7b95c00460 Coverity CID 2784: Add more checks for value==NULL. 2006-03-30 08:02:40 +00:00
christos fbe98ede0f Coverity CID 2763: Add more checks for value==NULL. 2006-03-26 23:12:48 +00:00
christos 48ce3c5d75 Coverity CID 2764: Avoid null reference 2006-03-26 23:10:26 +00:00
christos 3c0ef79b7f Coverity CID 2766: Don't leak memory. 2006-03-26 23:06:45 +00:00
jmmv 862d1d4e18 There is no need to check for the resulting value of a strto*l call after
ERANGE has been raised.  Just remove the extra checks, which were incorrect
anyway in almost all calls because they did not match their corresponding
strto*l function.

This caused mount_tmpfs to not catch some error cases in, e.g., i386, as
strtoll was returning LLONG_MAX instead of LONG_MAX, which are different
in this platform (but not on 64-bit ones).

Problem found by martin@; thanks!
2006-03-26 16:15:15 +00:00
reed f21a315136 In the DIAGNOSTICS section, document that mismatched LKM and kernel
versions will be reported to the console and to the system message
buffer.

And update documentation date.
2006-03-24 00:38:23 +00:00
wiz d292467748 Remove Kerberos4/NFSKERB settings. 2006-03-23 23:53:23 +00:00
wiz 637b6cf962 unifdef NFSKERB (Kerberos 4 support). Update man page and usage() for
-K and -m removal (Kerberos 4 specific options).
2006-03-23 23:23:27 +00:00
wiz c1bf91bf36 Fix typo in Xref. 2006-03-23 20:15:49 +00:00
christos fbdfb6fbf0 Coverity CID 2753: Free the correct variable. 2006-03-22 16:35:44 +00:00
christos bd5a805fc3 fix compile problem. 2006-03-22 15:45:16 +00:00
christos 86bc6ef985 Coverity CID 786: Avoid NULL dereference. 2006-03-22 02:25:44 +00:00
christos 9a02e676ef Coverity CID 1301: Return early if we could not open /dev/null 2006-03-22 02:23:11 +00:00
christos 7ef824757b Coverity CID 1593: Plug memory leak 2006-03-22 02:21:20 +00:00
pavel d8e5c31820 Clarify and correct the description of the -R (Record Route) flag.
Reviewed by jnemeth, whith help from him.
2006-03-21 22:54:46 +00:00
christos aa1540d7a7 Coverity CID 2742: Avoid NULL deref. 2006-03-21 21:50:44 +00:00
christos b771b70f76 Coverity CID 1601: Fix memory leak. 2006-03-21 21:43:03 +00:00
christos 22eda87ac9 Coverity CID 1603: Fix memory leak. 2006-03-21 21:41:00 +00:00
christos 0c9dfbbbdf Coverity CID 1688: Fix memory leak. 2006-03-21 21:37:34 +00:00
christos 1f5c810a97 Coverity CID 782: Don't dereference NULL was not going to happen, but:
1. return error instead of the trashed errno.
2. don't return -1, but return ENAMETOOLONG.
3. eliminate unused code.
2006-03-21 21:34:01 +00:00
christos 7067dcb9a4 Always check the results of getmntopts() and free them. 2006-03-21 21:11:41 +00:00
pavel c38d26c2d6 Bump date, requested by wiz. 2006-03-21 09:54:12 +00:00
pavel 104eb3fa9f -I does work for unicast pings too (it sets the source address).
With some language help from dsl.
Reviewed by jnemeth.
2006-03-21 09:15:53 +00:00
christos db80529cf2 Delete an obvious free(NULL) pointed out by erh. 2006-03-20 22:44:25 +00:00
christos 731d9b0c04 Coverity CID 2305: Fix memory leak. 2006-03-20 01:51:54 +00:00
christos ef75a584c1 Coverity CID 2301: FIx memory leak. 2006-03-20 01:45:12 +00:00
christos 4b15f35af4 Coverity CID 2302: Free fat if fatal error to avoid leak. 2006-03-20 01:42:47 +00:00
christos 74f7dc651d Coverity CID 2299: Fix memory leak. 2006-03-20 01:37:10 +00:00
christos 16f27d8161 Coverity CID 2298: Fix memory leak. 2006-03-20 01:34:16 +00:00
christos 3401a36160 Coverity CID 2074: Fix memory leak. 2006-03-20 01:30:34 +00:00
christos 635d729786 Coverity CID 1745: Fix memory leak. 2006-03-20 01:27:44 +00:00
christos e5919d97fc Coverity CID 1078: Add assertion check for NULL pointer. 2006-03-20 01:25:14 +00:00
christos 0794bfc81d Coverity CID 2551: Don't use LIST_FOREACH() if you are going to free the
current element (bp) in the body of the loop; the foreach does bp = bp->next;
2006-03-20 01:20:55 +00:00
christos db7722d2a7 Coverity CID 774: Don't increment a pointer *before* testing it for NULL! 2006-03-20 01:06:07 +00:00
christos 9871eb575d Coverity CID's 1853, 1852, 1851: Plug memory leaks. 2006-03-20 01:00:34 +00:00
christos 25207a2398 Coverity CID 1203: Check return code of b64_ntop(). 2006-03-20 00:53:39 +00:00
dan 1fcee3db59 close fp in several error paths, closing Coverity CIDs 1690, 1692.
"go" by go.
2006-03-19 01:57:11 +00:00
christos 55303a4a4b Coverity CID 2307: Possible memory leak. 2006-03-18 20:25:28 +00:00
christos f04c9de45b Coverity CID 2306: Possible memory leak. 2006-03-18 20:23:51 +00:00
christos 5ac5bc844b Coverity CID 1079: Possible NULL deref. 2006-03-18 20:21:50 +00:00
christos 704b63146c Coverity CID 1080: Possible NULL deref. 2006-03-18 20:20:31 +00:00
christos 6672211d0f Coverity CID 2432: Dereference before NULL check. 2006-03-18 19:55:49 +00:00
dsl 57c63d8912 Avoid indexing beyond the end of a malloced array.
Rework loop to be less confusing.
Coverty 519 made me read this code, but this isn't the 'bug' it found.
2006-03-18 12:48:35 +00:00
dsl 46b640e7c6 Coverty 521: fclose() temporary file used when editing label. 2006-03-18 11:38:59 +00:00
christos 6edcc275a1 Coverity CID 2297: Fix memory leak. 2006-03-18 09:51:08 +00:00
dsl df7e187ccb Appease Coverty CID 7449. Avoid close(-1) in error path. 2006-03-18 08:36:50 +00:00
perseant 16cb5d93b2 Make it compile again. 2006-03-17 19:24:08 +00:00
dsl 87f04837fb Fix build breakage, split assignment and test for ease of reading. 2006-03-17 19:18:33 +00:00
christos 2044d4f590 Coverity CID 2671: Fix use of ifp after free. 2006-03-17 16:58:09 +00:00
hubertf 2b40d43066 Fix minor ressource leak
Coverity CID 1855
OK'd by thorpej
2006-03-17 16:14:48 +00:00
rumble e948e1b17f Check for allocation failures in malloc, calloc, realloc, asprintf, and
vasprintf and try to handle them.
2006-03-17 15:53:46 +00:00
rumble e973f66640 Gracefully handle out of memory condition. 2006-03-17 14:50:44 +00:00
elad 6ec9e1c359 Proper bounds check, found by Coverity, CID 1468. 2006-03-17 13:58:27 +00:00
erh e1806cf352 Fix Coverity issue 1579. Check retval from getmntopts(). Use freemntopts(). 2006-03-17 06:51:00 +00:00
chris 4727225848 Fix case where argv wasn't returned or freed.
This fixes Coverity CID 2023.

While here also return NULL if the malloc fails.
2006-03-17 02:48:29 +00:00
elad 21831d5e1d Fix an off-by-one found by Coverity, CID 1456.
I haven't looked, but I suggest security-officer@ looks into it to see if
this may be exploited passively?
2006-03-17 02:31:03 +00:00
hubertf f500b89c3d Free some allocated memory in the failure case when trying to
fetch the panic string.

Fixes Coverity CID 1856.
2006-03-17 01:45:51 +00:00
jnemeth 61f477b7e3 PR/31531: Takahiro Kambe: shutdown(8) quietly exit if execed from login shell 2006-03-07 22:19:55 +00:00
christos 421a9c133c add the 3 opencrypto sysctls. 2006-03-06 00:51:48 +00:00
simonb 3204463045 We link against libl and liby, so depend on them too. 2006-02-25 11:57:52 +00:00
wiz 5d1e8b2745 Fix some typos. 2006-02-25 02:28:55 +00:00
christos 4738a03371 remove vinum reference. 2006-02-25 01:56:41 +00:00
christos e241178d90 mark vinum as obsolete. 2006-02-25 01:55:00 +00:00
christos 1b49426ea4 remove vinum 2006-02-25 01:31:02 +00:00
wiz 1ad8067cb3 Fix typos, reported by Alexey Dobriyan ("Gathered from Linux"),
forwarded by jmc@openbsd.
2006-02-25 00:58:34 +00:00
jmcneill 8e45f8abca Add the ability to control the splash screen.
wsconsctl -d -w splash.enable=<1|0> to toggle the splash screen, and
 wsconsctl -d -w splash.progress=1 to update the splash animation
2006-02-18 19:35:11 +00:00
lukem 8c09644630 * The kernel's struct ccd_softc has extra structure members over the
userland version; provide another ccd global variable (ccd_softc_elemsize)
  containing the kernel's size, and use that it ccdconfig(8) to convert the
  kernel's ccd_softc into userland versions.
  Fixes 'ccdconfig -g'.
* Use DISKUNIT() instead of home-grown cruft to determine the `N' of "ccdN".
  Fixes 'ccdconfig -g ccd1'.
* Use (void *) instead of (char *) in the calls to kvm_read().

XXX: ccd could be converted from nlist to sysctl.  "Someone else's yak shave".
2006-02-16 23:25:18 +00:00
dyoung 6c1041b8b7 So that we can build a full-featured fdisk cross-tool with -DBOOTSEL,
condition the definition of DEFAULT_BOOTxxx variables and SCAN_xxx
on defined(BOOTSEL), instead of defined(__i386__) || defined(__x86_64__).

While I'm here, only build get_diskname in the same conditions as
get_geometry is built, since only the latter calls the former.
2006-02-14 04:48:15 +00:00
chs 899d1b31b2 convert "magiclinks" from a per-fs mount option to a system-wide sysctl.
as discussed on tech-kern quite some time ago.
2006-02-12 01:32:06 +00:00
christos 3d8d9aa461 define __POOL_EXPOSE. 2006-02-11 05:49:48 +00:00
christos 238f1027f9 detect integer overflow differently. previous change broke negative sysctl
values.
2006-02-08 18:13:56 +00:00
reinoud 7514b43102 Fix 3 more spelling errors and make it pass `spell -b' 2006-02-06 11:45:50 +00:00
christos 404831da9c PR/17441: John F. Woods: integer sysctl does not accept numbers > 0x7fffffff
Use unsigned int in the range comparison, and use strerror() instead of
home brewed error strings.
2006-02-05 22:42:55 +00:00
jmmv c799a9c4c0 Style fixes:
- Use EXIT_SUCCESS/EXIT_FAILURE where appropriate.
- Cut long lines.
- Properly indent continuation of lines.
- Sort includes.
- Replace u_int with unsigned int.
- Remove parenthesis around return values.
- Add blank line at the beginning of functions without local parameters.
- Cast *printf calls to void.
2006-02-05 18:11:46 +00:00
jmmv 2df378f966 Fix two pastos in the code to set 'samplerate'. 2006-02-05 17:45:06 +00:00
jmmv 8b589aee17 Add support to automatically repeat mouse button events in wsmouse(4) and
change wsconsctl(4) so that this is configurable.

This is specially useful for mice that provide page up/down buttons instead
of a real wheel and that do not send events repeatedly from the hardware.
(E.g.: Logitech Marble Mouse.)

No objections in tech-kern@.
2006-02-05 17:38:33 +00:00
wiz 82924459cb Use more markup, fix xref, serial comma, other misc. fixes. 2006-02-04 20:10:53 +00:00
wiz e1a202b1cb Bump date for security.* 2006-02-04 18:37:58 +00:00
wiz 298f5a67e2 New sentence, new line; sort SEE ALSO; other minor improvements 2006-02-04 18:35:49 +00:00
riz 288025ff2a Bump date, use "file system" consistently, no hyphen in "soft
dependencies", and sort options under -o.
2006-02-03 22:50:21 +00:00
riz efb16065b2 Note that softdep and async options can't be used together. From
Dheeraj S in PR#32211, wording and formatting changes by me.
2006-02-03 22:34:11 +00:00
snj 52d8744177 Fix two spelling errors and a typo. From Chris Tribo in PR misc/32715. 2006-02-03 08:28:39 +00:00
christos 1098ee8a76 expose a_num. 2006-02-02 23:42:00 +00:00
christos ae7a5ee5fc - pass lint
- check errors
- use EXIT_FOO consistently
- use the fattr.h functions, don't duplicate the code
2006-02-02 23:41:43 +00:00
elad 81ed970f39 - make use of the recently added mode_bits for security.setid_core.mode;
- document setid_core variables.
2006-02-02 18:00:07 +00:00
reinoud 0400433f3f Note the support for harddisc partitions and vnd devices and notify users
of the problems that could arise with mapping images of UDF file systems
when using vnd with respect to the sector size.
2006-02-02 16:45:06 +00:00
xtraeme c53b38d234 KNF 2006-02-02 16:25:46 +00:00
reinoud 85b5a27e76 Crosslink mount(8) with mount_udf(8) 2006-02-02 16:24:09 +00:00
elad 202872db03 add support for parsing file mode bits.
when printed, you'll see something like "0600 (rw-------)", like the
ls output. when reading input you can either specify octal mode (0600)
or chmod-like (u=rw).

ideas from atatat@ and kjk@; okay and lots of help from atatat@.
2006-02-02 16:23:25 +00:00
reinoud 21a48c8e8b Remove false notion about harddisc partition and vnd support since it has
been added since.
2006-02-02 16:11:25 +00:00
xtraeme 3d5d61e01c Fix NetBSD tag. 2006-02-02 15:48:24 +00:00
reinoud 09457a8a6e Initial import of a UDF file system implementation for NetBSD.
Finally the logic glue and the set distribution lists modifications.
2006-02-02 15:26:32 +00:00
reinoud c2f693f4f5 Initial import of a UDF file system implementation for NetBSD.
Add UDF file system mounter.
2006-02-02 15:21:29 +00:00
wiz cc07c6e988 Use default option order (AaBbCc...). 2006-01-29 22:11:10 +00:00
dsl c28e0ae4af Byteswap the constant MBR_{BS_}MAGIC throughout, should genetate better code.
Except that non all architectures have that optimisation :-(
2006-01-29 12:55:16 +00:00
dsl 79bd2ddb02 Update/rewrite to match reality and in a muchmore succinct format. 2006-01-29 00:04:26 +00:00
is d155cb6cd4 Print the INET netmask if it is non-contiguous. 2006-01-26 11:35:09 +00:00
christos 81a178c561 PR/32632: Yves-Emmanuel JUTARD: Improvment suggestion in 'route' display.
Add a new -S flag that prints a space for missing flags.
2006-01-25 16:29:10 +00:00
christos b7f3395036 PR/32629: Yves-Emmanuel JUTARD: Type errors in sbin/route/route.c, another
u_char/char conflict.
2006-01-25 16:19:50 +00:00
christos 86b43a935f PR/32628: Yves-Emmanuel JUTARD: Missing cast in sbin/ifconfig/ifconfig.c,
strcasecmp needs char * not u_int8_t *.
2006-01-25 16:08:49 +00:00
simonb e37b3f410c Use 64-bit arithmetic to calculate fragsperinodeblk, avoiding 32-bit
overflows for large values of "-i bytes-per-inode".
2006-01-21 12:32:14 +00:00
dsl 09d4a5d5c8 Izumi Tsutsui pointed out that we don't need vfslist.c (from ../mount)
if we are defining SMALL.
2006-01-21 11:59:53 +00:00
yamt 7273d6e313 whitespace. 2006-01-21 10:55:56 +00:00