Commit Graph

4680 Commits

Author SHA1 Message Date
christos 7f593965ea cast sizeof() to int for printf widths. 2007-07-17 23:56:01 +00:00
christos 27e0d2b78b kill MFSNAMELEN 2007-07-17 20:17:52 +00:00
christos a6e0a40b9f kill MFSTYPENAME 2007-07-17 20:13:43 +00:00
christos fede0a77fc kill MFSNAMELEN 2007-07-17 20:03:10 +00:00
pooka 91896524c2 Don't attempt to start megamaid if run with MNT_GETARGS. 2007-07-17 12:39:24 +00:00
pooka 63d872ecae Print MNT_GETARGS results in one line to make them display
properly with mount -vvvvvvvvvv
2007-07-16 17:12:03 +00:00
pooka 8f211a8a19 kernfs doesn't support getargs, so fail silently instead of making
a fuss about it.
2007-07-16 17:09:42 +00:00
pooka 704e075311 Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS.  Others worked with < 0,
but make them check against -1 too for consistency.  And sprinkle some
stylish line wrapping where appropriate.
2007-07-16 17:06:52 +00:00
dsl 7af7206539 Add additional 'sizeof args' parameter to mount(2). 2007-07-14 15:57:24 +00:00
jnemeth 2f4c83c097 PR/36626 - Jukka Salmi -- fails to compile if DEBUG is defined 2007-07-10 23:50:35 +00:00
bouyer a59a9ef8db writeat() also expect offsets in DEV_BSIZE unit. This and the previous commit
should fix PR bin/35560. Thanks to Michael L. Hitch for pointing me at the
PR.
2007-07-08 16:54:40 +00:00
dsl df1814f734 Use block minor (from device name) for block devices (not char minor).
Fixes PR bin/36614
2007-07-07 20:11:07 +00:00
bouyer 2d9d4664a8 readat() expects the offset in DEV_BSIZE units. This made resize_ffs find the
filesystem on a vnd partition for me. It did grow the filesystem, and after
a fsck -f on the partition to fix a few superblock inconsistencies, all
looks good.
2007-07-05 21:38:20 +00:00
dsl 4c11bfb2e9 Preserve the mbr 'driver serial number' when copying in the netbsd
mbr code.  Should leave windows vista bootable.
Print the dsn from the mbr, not each pbr.
2007-07-05 20:30:29 +00:00
pooka 01d79aae7e The kernel socket isn't used by any of the providers, and it's a bit
hard to imagine how it could be used, so get rid of it.
2007-07-02 18:07:44 +00:00
pooka 703c0341d4 basesrc is no more 2007-07-02 16:56:37 +00:00
pooka 6ff8a42783 * narrow-angle const spray
* make config read return an error if it can't read the config file
2007-07-02 16:33:05 +00:00
rumble e222f53360 When checking for an EFS filesystem just read in the whole superblock,
rather than jump to the hard-coded magic field offset.
2007-06-30 02:05:27 +00:00
rumble 8600ed2bd8 Make mount_efs.8 and svhlabel.8 reference one another. 2007-06-30 01:11:35 +00:00
rumble dd5b82c6a6 Add missing include. 2007-06-30 00:54:09 +00:00
rumble 98a859360f Superblock magic numbers are #define'd, so use them. 2007-06-29 23:33:05 +00:00
rumble 6912898dc8 Add read-only support for SGI's Extent File System.
Reviewed by pooka@.
2007-06-29 23:30:16 +00:00
rumble 688ef4d823 Nuke extra comma in Xrefs. 2007-06-25 00:41:50 +00:00
dyoung e62dac44ae Produce more useful error messages. 2007-06-11 04:22:00 +00:00
dyoung 6f3106eba2 Let the operator use the DISKLABELSECTOR and DISKLABELOFFSET
environment variables to override the sector number, and the
bytes-offset in the sector, where disklabel(8) writes a disklabel.

If disklabel(8) was compiled as a host tool, then the defaults
still come from the port's LABELOFFSET and LABELSECTOR #defines.
Otherwise, the defaults still come from the sysctls, kern.labelsector
and kern.labeloffset.

This change helps me create a bootable CompactFlash image with both
a Master Boot Record (MBR) and a BSD disklabel for the RouterBOARD
153.  The RB 153 is an evbmips board with a CompactFlash slot.  It
searches the MBR on a CompactFlash card for a partition containing
an ELF kernel.  When disklabel(8) is built for evbmips, it will
ordinarily overwrite an MBR with the BSD disklabel.
2007-06-05 21:48:46 +00:00
mishka d7d886db87 Our VLAN implementation (as it correctly expected) is not allowed
to modify the whole VLAN tags, but it is permitted to change 12-bit
VLAN identificators only. Reflect this fact on the appropriate man
pages.

Antti Kantee and Mihai Chelaru from #netbsd-code were helpful in
better understanding of VLAN stuff. Thank you!
2007-06-05 11:15:15 +00:00
uwe 7a2d8df57b Document that reboot(8) passes any arguments to reboot(2) as bootstr. 2007-06-03 22:39:47 +00:00
ginsbach 3d6fea5a84 Add arguments to option descriptions for options that require arguments.
Document all of the NFS specific -o options.
2007-06-01 17:43:19 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
jnemeth c0e06197a8 Add a caveat about reboot(8) not running shutdown scripts. This addresses
(at least partially) PR/35067 by Blair Sadewitz.
2007-05-24 23:19:43 +00:00
wiz a115c64dc7 Plural fix. 2007-05-20 22:27:46 +00:00
wiz 36f6e8095a Sort options. Bump date. 2007-05-19 14:23:25 +00:00
wiz febfcb5f7e Fill in AUTHORS section. Bump date. 2007-05-19 14:21:36 +00:00
christos 885f3f0a50 Only eat the - if argv[0] starts with a - 2007-05-17 00:32:01 +00:00
oster 9a9131c20f Add missing #include <sys/ioctl.h> to make this build without warnings. 2007-05-15 22:01:19 +00:00
elad 6700cfccd6 Some Veriexec stuff that's been rotting in my tree for months.
Bug fixes:
  - Fix crash reported by Scott Ellis on current-users@.

  - Fix race conditions in enforcing the Veriexec rename and remove
    policies. These are NOT security issues.

  - Fix memory leak in rename handling when overwriting a monitored
    file.

  - Fix table deletion logic.

  - Don't prevent query requests if not in learning mode.


KPI updates:
  - fileassoc_table_run() now takes a cookie to pass to the callback.

  - veriexec_table_add() was removed, it is now done internally. As a
    result, there's no longer a need for VERIEXEC_TABLESIZE.

  - veriexec_report() was removed, it is now internal.

  - Perform sanity checks on the entry type, and enforce default type
    in veriexec_file_add() rather than in veriexecctl.

  - Add veriexec_flush(), used to delete all Veriexec tables, and
    veriexec_dump(), used to fill an array with all Veriexec entries.


New features:
  - Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
    database. This allows Veriexec to produce slightly more accurate
    logs under certain circumstances. In the future, this can be either
    replaced by vnode->pathname translation, or combined with it.

  - Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
    This can be used to recover a database if the file was lost.
    Example usage:

        # veriexecctl dump > /etc/signatures

    Note that only entries with the filename kept (that is, were loaded
    with the '-k' flag) will be dumped.

    Idea from Brett Lymn.

  - Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
    usage:

        # veriexecctl flush

  - Add a 'veriexec_flags' rc(8) variable, and make its default have
    the '-k' flag. On systems using the default signatures file
    (generaetd from running 'veriexecgen' with no arguments), this will
    use additional 32kb of kernel memory on average.

  - Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
    load. This is done automatically for files marked as 'untrusted'.


Misc. stuff:
  - The code for veriexecctl was massively simplified as a result of
    eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
    pass of the signatures file, making the loading somewhat faster.

  - Lots of minor fixes found using the (still under development)
    Veriexec regression testsuite.

  - Some of the messages Veriexec prints were improved.

  - Various documentation fixes.


All relevant man-pages were updated to reflect the above changes.

Binary compatibility with existing veriexecctl binaries is maintained.
2007-05-15 19:47:43 +00:00
xtraeme 04ae3cd1d0 Remove an extra comma. 2007-05-07 11:02:21 +00:00
xtraeme 598409109e Add -b flag into usage(). 2007-05-01 21:43:37 +00:00
xtraeme b83d27bc99 Bump date. 2007-05-01 21:41:52 +00:00
perseant faaef229b4 Add a "-b" option to search a partition for valid alternate superblocks,
rather than searching the disk for partitions.  Also, test LFS superblock
checksums before we report them.
2007-05-01 21:28:50 +00:00
bouyer 982bad256f Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
2007-05-01 17:18:52 +00:00
tron 04dc8ab30b Bump date because of last change. 2007-04-30 12:33:13 +00:00
tron 962652c0b2 Improve example of restoring a complete filesystem with "restore -r":
- NetBSD's "newfs" doesn't accept a second (non-option) argument.
  Patch provided by Jeff Ito in PR bin/36241.
- Use "sd0" instead of "rp0" because NetBSD's doesnt have a disk driver
  called "rp".
- Use "/dev/rst0" instead of "/dev/rst8". With NetBSD's device numbering
  scheme a system would have to have 9 tape drives to get "/dev/rst8".
2007-04-30 12:32:35 +00:00
christos cedd1a800a PR/36229: Geoff Wing: uninitialized dkwedge_info structure in mount_mfs
causes random failures
2007-04-28 02:56:32 +00:00
christos 7731d9378a PR/36223: Milos Negovanovic: Don't ask if we want to install mbr_bootselect
with -f.
2007-04-26 18:51:00 +00:00
matt 1863ad163e Remove defunct B from getopt string. 2007-04-12 18:41:23 +00:00
chs cb9ef1cfbd apply revision 1.31 yet again:
"make sure that we don't try to allocate negative memory when blks == 0."
or on amd64, "make sure that we don't allocate 32 GB when blks == 0."
2007-04-12 05:19:18 +00:00
pooka 46bc932103 whooops, bump date also 2007-04-05 21:31:44 +00:00
pooka 278c207505 /proc/devices, not /proc/device 2007-04-05 21:30:16 +00:00
dyoung 5630b5969e Don't try to convert numbers to names for either endpoint of a
tunnel.  In this way, ifconfig will avoid emitting something
abominable like this:

        tunnel 192.168.1.1,mdns --> 192.168.1.2,kazaa
2007-03-26 05:02:44 +00:00