Commit Graph

4802 Commits

Author SHA1 Message Date
apb c3bbc70fa0 When calculating the size of the MFS /dev file system, round file sizes
up to a multiple of 512.  (Not doing this before was wrong but probably
asymptomatic, because there was enough slack space to cope with the
error).
2007-03-01 18:25:58 +00:00
apb c654f7abce When creating /dev in a memory file system, include all three of
MAKEDEV, MAKEDEV.subr and MAKEDEV.local in the set of files that are
copied if they exist.

Now booting an INSTALL kernel with an embedded ramdisk correctly creates
/dev again, fixing a problem introduced when MAKEDEV.subr was created a
few days ago.
2007-03-01 07:18:07 +00:00
pooka be2ccdedfd proc/#/exe is now exposed for all mounts, move it away from linux-only 2007-02-24 15:45:43 +00:00
rumble 8f8bfb23ec Add a DIAGNOSTICS section and explain that the error message "could not
calibrate pkcs5_pbkdf2" could have resulted due to dynamic changes in cpu
clock frequency.
2007-02-23 20:00:04 +00:00
rumble 0a71191807 Cross-reference fsck_lfs and fsck_ext2fs. 2007-02-23 19:32:16 +00:00
hubertf 6eb43c8c6d TSEL() is const char* now 2007-02-18 01:48:37 +00:00
riz 16a0235c60 Use strtoll() when converting a 64-bit quantity. This makes "gpt add"
work with an offset of more than 2147483647 sectors.  While I'm here,
use strtoul() when converting an unsigned quantity.
2007-02-16 17:13:02 +00:00
xtraeme bebefe198b * There's no need to use an int to store the returned value of
ffs_checkver() and later use it in the switch statement, just
  use ffs_checkver.
* Remove unneded <sys/queue.h> header.
* Remove LFS from fstypes, it was never used.
* Increase SBCOUNT to 128, works faster.
* Remove unneded casts.
* (-F mode) close fd when the scan has finished or if pread() failed.
* (-F mode) print total size of file.
2007-02-16 01:32:21 +00:00
tron e3f6d993ed Increase the numbers of inodes available on the "/dev" MFS to 1280.
This should fix the "sysinst" problems caused by adding more devices
node to resolve PR port-amd64/35532.
2007-02-15 22:39:12 +00:00
hannken f67846b19f Add support for Solaris ufsdump volumes with more than 512*1024 inodes.
Here the bitmaps are written as

	CLRI or BITS with c_count <= 512
	ADDR* for the remaining blocks

Remove the bitmap handling from getfile(), remove xtrmap() and xtrmapskip().
Add new function getbitmap() modeled after getfile() that does bitmap
allocation, bitmap expansion and sets maxino.

Reviewed by: Manuel Bouyer <bouyer@netbsd.org>
2007-02-09 09:36:02 +00:00
drochner 628f1591c1 include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
cbiere 033e1229b9 Revert previous commit. 2007-02-06 20:24:19 +00:00
cbiere a91470cccd Fixed format string in opendisk_werror() which was wrong since my previous
commit.
2007-02-06 14:04:01 +00:00
cbiere a63e176c73 * 1 -> EXIT_FAILURE.
* Replaced atoi() with parse_int().
 * Use an enum for ACTION_* instead of #define.
 * Use strdup() or asnprintf() instead of strlcpy() to avoid truncation.
 * pread() returns ssize_t not int.
 * Suppress "unused parameter" warnings.
 * verify_disklabel(): Pass the correct size to disklabel_scan().
 * verify_ffs():
   * Don't indicate success if pread() fails.
   * Check the amount of bytes read.
   * Don't cast buf to (struct fs *), it's not aligned.
 * eliminate_cores(): No need for a temporary variable.
2007-02-06 02:09:19 +00:00
cbiere 6d1dbd06cb Use warn() and warnx(). 2007-02-06 01:55:40 +00:00
cbiere 6065c2bb2b crypt_defaults_lookup():
* Avoid comparison of int with unsigned.
 * Simplified.
2007-02-06 00:51:09 +00:00
cbiere b90361afef memxor(): Fixed size_t/int mismatch. 2007-02-06 00:48:37 +00:00
cbiere 21f5afe6b9 * 0/1 -> EXIT_{SUCCESS,FAILURE}
* make_utmpx(): Added comment and slightly simpler construct.
 * alrm_handler(): Suppress "unused parameter" warning.
 * mapfile():
   * Handle st.st_size correctly.
   * Avoid unnecessary return statements.
   * Removed unnecessary MAP_FILE flag.
   * Use S_ISLNK() and check S_ISREG() too.
   * Add the terminating NUL rather after readlink() than
     before, just in case.
 * writefile():
   * Avoid unnecessary return statements.
 * read_ttys():
   * Check S_ISREG() as well.
   * Check for st.st_size > 0 rather than != 0.
2007-02-05 22:36:18 +00:00
njoly e2ca295958 Fix compilation on 64bit platforms.
ok by elad.
2007-02-05 15:37:20 +00:00
christos 847a4f4ee5 warns=4 2007-02-04 20:54:02 +00:00
christos 6a075814d9 - close the utmpx file.
- sprinkle void
- use size_t consistently.
2007-02-04 20:53:19 +00:00
wiz 4400332b14 Bump date for previous. 2007-02-02 07:28:03 +00:00
alc 340d62487a - sync file list with reality
- add a description for fd/# (with reference to fd(4))
2007-02-02 00:54:19 +00:00
perry a3b6213467 As pointed out by James Wetterau, we wish to complement, as in the
logical operation, rather than compliment, as in praise, the magic
number of the disk.

There are probably other instances of this in the tree. We should fix
them.
2007-01-27 19:20:28 +00:00
cbiere 140287a3de Replaced int_encode() with be32enc(). 2007-01-27 08:29:14 +00:00
wiz a0ab6bc85b Bump date for previous. 2007-01-23 20:34:17 +00:00
bouyer e47fe82adf Kimura Fuyuki, bin/35216: add a setspeed command, to set the highest speed
that the optical drive should use for reading data.
2007-01-22 20:56:46 +00:00
cbiere 551466a6e7 Avoid crash if the filename contains no digits. 2007-01-21 20:45:41 +00:00
isaki d4ba865188 Make it compile without SUPPORT_UTMP nor SUPPORT_UTMPX. 2007-01-20 13:25:28 +00:00
hubertf df06563bc3 Remove more duplicate #includes,
from Slava Semushin <slava.semushin@gmail.com>
2007-01-17 21:59:49 +00:00
reinoud 3434329686 Add `-o noatime' support to the mount program. Not relevant for the
read-only implementation currently committed though.
2007-01-17 21:21:12 +00:00
dyoung 3dfd6a1c5f Print more 802.11 statistics when the operator runs 'ifconfig -v
ath0', for example.  Fix the spelling of one statistic.
2007-01-09 09:25:56 +00:00
dyoung dbf49243d9 Per discussion "ifconfig error handling" on tech-net@ in August
2006, if we fail to set any 802.11 parameter, exit immediately with
EXIT_FAILURE.
2007-01-09 09:24:14 +00:00
dyoung d097d6a596 Let us adjust the 802.11 fragmentation threshold with ifconfig ath0
frag 256, for example.
2007-01-09 09:19:02 +00:00
wiz fbe3512d50 Bump date for previous. 2007-01-08 07:22:12 +00:00
isaki 577b5df548 Sync with reality. The default timeout is 1200 sec. 2007-01-07 08:53:04 +00:00
elad 9b470b7708 Mention potential reasons for EPERM.
Requested by Anon Ymous.
2007-01-06 14:43:27 +00:00
jmmv 08d2474c3c s/tons/lots/, per simonb@'s suggestion. This looks more formal. 2007-01-03 08:39:29 +00:00
yamt dae26da41f remove the rest of Kerberos 4 code. 2006-12-27 12:43:10 +00:00
yamt bb0e3db15a sync with header changes. (nqnfs removal) 2006-12-27 12:13:55 +00:00
wiz 211f17ad46 Sort options in usage. 2006-12-27 11:28:59 +00:00
wiz 78cc844673 Sort options. 2006-12-27 11:27:37 +00:00
yamt b9625c8fbe oops, remove duplicated -D. 2006-12-27 11:08:30 +00:00
yamt 580a1898fe revive -D option because it actually has some meanings for non-nqnfs mounts. 2006-12-27 11:05:04 +00:00
wiz 856416cc4a Punctuation nit, sort SEE ALSO. 2006-12-23 07:41:26 +00:00
elad aede3e59fc PR/35304: C J Coleman: Off-by-one nul byte overwrite in mode_bits routine
of sbin/sysctl
2006-12-21 22:25:39 +00:00
wiz b60285f6d5 Nicer macro usage. 2006-12-19 20:33:35 +00:00
jmmv 320a6bcfea Note that meta data is stored in non-pageable memory and the problems this
may carry.  Suggested by Greg Troxel in private mail.
2006-12-19 14:50:49 +00:00
christos 8539ad5cf5 from Anon Ymous: remove (void)&var; 2006-12-18 20:08:48 +00:00
christos 746c5b06eb Convert a couple of "(void)&" constructs to volatile.
Flag various unused parameters in restore and dump so that these will
compile with -Wextra.  (Note: restore uses some stuff from dump.)
2006-12-18 20:07:32 +00:00
nonaka 5637a5d46a zaurus use MBR partition info. 2006-12-18 13:39:10 +00:00
christos b311ec9d52 Exit with non-zero on errors. 2006-12-18 12:50:08 +00:00
reed 09fde137ce Mention pfil(9). Reword slightly for "ipf" option as filters IPv6
also (and ICMP is implied) and that other types are blocked.

Point to pf(4) and pfil man pages.

Based on discussion in January 2006 on tech-kern.  (This has been
in my tree for around 11 months.)

This part of my work to change this (and related to use) pfil (instead
of ipf). That is done back then but needs some testing.
2006-12-14 02:50:12 +00:00
christos df99a4dd43 Sprinkle volatile, instead of using the (void)&foo; which does not work on
gcc 4.
2006-12-13 16:08:26 +00:00
elad 031bd982f9 Don't reset entry-type for every flag_spec. 2006-12-08 23:22:19 +00:00
pavel edab74570a Move the description of sysctl MIBs from sysctl.3 to a new manual page
sysctl.7. Remove the list of MIBs from sysctl.8 so we don't have to
maintain duplicate information, as proposed by YAMAMOTO Takashi on
tech-userlevel. Also remove references to header files from sysctl.8.

The numeric constants remain documented, they are still needed in some
cases. See the discussion on tech-userlevel. ("mib list in sysctl.8")

OK by YAMAMOTO Takashi.
2006-12-04 08:59:13 +00:00
wiz 11b2ef8137 Remove a troff command that added some empty lines to the man(1) output. 2006-12-03 11:35:07 +00:00
tls e1231b8650 Prompt before rolling forward, in interactive mode, so it's possible to fix
the filesystem but not roll forward possibly unwanted changes.
2006-12-01 06:38:39 +00:00
elad 95513f79fe Support escaping characters in the path so that spaces etc. are allowed
in entries for Veriexec.

This has been requested for a long time, most recently by Brad Harder.

Thanks a lot to Michael van Elst for the patch, done during the latest
hackathon.
2006-11-29 14:28:30 +00:00
elad 6b6dc6a617 Type changed from size_t to uint64_t, adjust format string.
Pointed out by Tom Spindler, thanks!
2006-11-29 01:12:00 +00:00
elad 646f2112d3 Make Veriexec use proplib(3) for kernel-userland data passing.
Obviously, this breaks the already unstable Veriexec ABI, but that's
it. Some cool additions are planned to be introduced, and this just
makes it so that NetBSD 4.0 users will be able to easily use them as
well.

This also removes the fingerprint type name limit, so relevant code
was adjusted.

Thoroughly tested (even uncovered a bug in proplib! thanks for fixing
that cube@!). Documentation updated.
2006-11-28 22:22:02 +00:00
jmmv 91af0d68b1 Add a '-l' flag and a 'L' command to interactive mode to list all known
file system types.  (Similar to what fdisk does for partition types.)

Closes PR bin/12954.
2006-11-26 16:16:31 +00:00
christos df031f1edc PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
2006-11-25 21:40:04 +00:00
christos f5b5006944 PR/28884: Izumi Tsutsui: mount_mfs(8) doesn't set default fssize if "swap" is
specified
2006-11-25 18:18:22 +00:00
dsl 26ad77c3e1 Report the last sector number of a partition, instead of that of the first
of the next - with appropriate discarding of the head/sector values
if the partition is cylinder aligned.
Fixes PR 26921
2006-11-25 16:10:32 +00:00
scw 258fa36dc2 Don't use negative offsets from "bpb.bps" when writing out values such
as DOSMAGIC in the MBR. In non-512 byte media, the MBR is still 512
bytes in length.

Based on the patches provided in PR kern/17398 by Trevin Beattie.
2006-11-25 12:29:33 +00:00
christos 1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
yamt 809ec70bcf implement ipv6 TSO.
partly from Matthias Scheler.  tested by him.
2006-11-23 19:41:58 +00:00
elad a84fee7faf Initial implementation of PaX Segvguard (this is still work-in-progress,
it's just to get it out of my local tree).
2006-11-22 02:02:51 +00:00
elad 0ba2154297 Update my email address. 2006-11-21 00:22:04 +00:00
apb 324b3b8a78 Fix error in previous. Pass 1 needs to use progress_setrange(),
not progress_sethighlim().
2006-11-14 22:51:11 +00:00
apb f93df16b06 Improve the progress bar displayed by fsck_ffs -p -P.
The progress bar will now travel from 0 to 20% during pass 1, from 20%
to 95% during pass 2, and from 95% to 100% during passes 3, 4, and 5.
Previously, the progress bar was not displayed at all during pass 1,
slowly traveled from 0 to about 50% during pass 2, and then very rapidly
traveled from 50% to 100% during passes 3, 4, and 5.

Note that fsck_ffs is the only user of fsck/progress.{c,h}.
2006-11-14 21:01:46 +00:00
dyoung a25eaede91 Add a source-address selection policy mechanism to the kernel.
Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses.  Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

        1 Factor out some common code, producing rt_replace_ifa().

        2 Abbreviate a for-loop with TAILQ_FOREACH().

        3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
          IN_PRIVATE(), that are true for link-local unicast
          (169.254/16) and RFC1918 private addresses, respectively.
          Add the predicate IN_ANY_LOCAL() that is true for link-local
          unicast and multicast.

        4 Add IPv4-specific interface attach/detach routines,
          in_domifattach and in_domifdetach, which build #ifdef
          IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.
2006-11-13 05:13:38 +00:00
apb e81d0de4e0 Fix a bug that caused 0.0.0.0/0 to be treated like 0.0.0.0/32.
foo << 32 is undefined per section 6.5.7 of the C99 standard
if foo is (or is promoted to) a 32-bit type.
2006-11-11 21:50:19 +00:00
jmmv 98f101bc9c tmpfs is not considered experimental any more. OK'ed by core@. 2006-11-11 19:01:30 +00:00
jmmv 2947e73b43 Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting
the root file system on a LFS volume.

Addresses PR bin/30407.  No objections in tech-userlevel@.
2006-11-11 14:47:27 +00:00
christos 80955a4c43 replace varstack alloc with malloc. 2006-11-09 19:41:59 +00:00
christos b6479e9fff Fix malloc/realloc/calloc issues: always check and exit, use EEXIT instead
of 8.
2006-11-09 19:36:36 +00:00
yamt 442aa98fcd remove nqnfs support.
namely,
	- make -q a synonym of -3.
	- ignore -L and -D.
2006-11-09 10:07:00 +00:00
christos 9f4a7c8c31 PR/34965: Nicolas Joly: sysctl(1) small memory leak 2006-11-02 14:54:21 +00:00
christos 09012c9606 prefix name in kern.drivers 2006-11-01 22:26:36 +00:00
mjf a2be0ed655 Revert the changes I introduced trying to solve tmpfs' NFS export problem.
Requested by yamt@
2006-10-31 08:12:46 +00:00
christos 9e74871aa3 find rmd160.h 2006-10-30 01:21:53 +00:00
hannken fcd5ec4841 When using a snapshot take the snapshot raw device on further open.
Fixes PR #34923  dump(8) only dumps a corefile with -X (snapshots)

Approved by: Manuel Bouyer <bouyer@netbsd.org>
2006-10-26 20:02:30 +00:00
mjf 84bd46b9f9 Add support to allow a file system to not permit being exported over NFS.
Approved by elad@ and wrstuden@
2006-10-24 21:53:10 +00:00
mrg 7d429c305a use c99 initialisers. 2006-10-23 03:56:38 +00:00
christos 27ae1373d5 Mention include proper file for keyboard defines; from Zafer. 2006-10-22 19:39:32 +00:00
he 565d8259e3 Add initialization of a variable where gcc for some archs thinks
that it may be used un-initialized.  From cursory inspection it is
not obvious that gcc is wrong.
2006-10-17 21:14:03 +00:00
wiz 1a2477c1ae Serial comma. Add RCS Id. Remove superfluous quotes. 2006-10-17 09:32:34 +00:00
wiz a88697ed0e Improve English. 2006-10-17 09:26:21 +00:00
he a738248ed5 Some of our ports want <sys/param.h> in order to have DEV_BSIZE defined,
needed for LABELSECTOR expansion.
2006-10-17 09:20:09 +00:00
christos 5afd1c0a23 use MOPT_NULL 2006-10-16 03:37:42 +00:00
christos cf91149591 c99 initializer 2006-10-16 03:26:49 +00:00
christos 851ac27d44 c99 initializers 2006-10-16 03:25:21 +00:00
christos 8dd4b2bbb0 comment out/delete impossible code 2006-10-16 03:21:34 +00:00
christos 8cf4f4e359 c99 initializers 2006-10-16 03:21:05 +00:00
christos b8a730da20 c99 initializer 2006-10-16 03:15:46 +00:00
christos dcd203dd29 c99 iniitializer 2006-10-16 03:12:23 +00:00
christos 17e1e1af49 c99 initializer 2006-10-16 03:10:59 +00:00
christos 0e84886f1c comment out impossible code. 2006-10-16 03:09:26 +00:00
christos fef0df6d6b c99 initializers 2006-10-16 03:09:06 +00:00
christos 6dd4b3398f c99 initializers. 2006-10-16 03:04:45 +00:00
christos f076ca6346 use c99 initializers 2006-10-16 03:02:01 +00:00
christos 68475dcb61 comment out impossible code. 2006-10-16 03:01:36 +00:00
christos 50b568b12d c99 initializers 2006-10-16 02:56:56 +00:00
christos 9b005038ce add missing initializer 2006-10-16 02:55:10 +00:00
christos 2f9c53340f sprinkle volatile. 2006-10-16 02:54:23 +00:00
christos 00ab1df137 - get rid of p_cfunc2
- add missing initializers
2006-10-16 02:52:43 +00:00
christos 56641252ba - add volatile
- static before const
2006-10-16 02:44:46 +00:00
christos 064b0504f7 c99 initializer 2006-10-16 02:43:19 +00:00
christos 457d135620 c99 initializers 2006-10-16 02:42:42 +00:00
christos 7e3b870a41 add missing initializers 2006-10-16 00:45:19 +00:00
christos 9052088997 add casts 2006-10-15 22:43:30 +00:00
christos 70a155bfa8 hook in gpt 2006-10-15 22:37:14 +00:00
christos 9b52236568 Make this work under NetBSD. 2006-10-15 22:36:29 +00:00
christos 5819a8c09d Import the gpt tool from FreeBSD 2006-10-15 22:34:15 +00:00
christos 5bc3ea6c79 support printing kern.drivers 2006-10-15 21:33:34 +00:00
xtraeme 3481053ae9 Use O_DIRECT (aka Direct I/O) when -F is used. 2006-10-15 13:18:24 +00:00
xtraeme 7cf1cb802e Detect FFSv1 partitions with fragsize/blocksize greater than
2048/16384.
2006-10-14 13:22:34 +00:00
pooka 1cacfd0524 lower value mean higher priority for bridges
+ fix off-by-one

Tobias Nygren, bin/34781
2006-10-11 13:16:39 +00:00
peter e263dfd62f WFORMAT is no more... 2006-10-08 17:52:28 +00:00
elad 516c371048 PR/13478: Greg A. Woods: some tty-related documentation fixes
Patch applied with "minor tweaks" from me, thanks!
2006-10-06 22:07:44 +00:00
elad 53ca07b4d7 If Veriexec enforces access type, don't allow mmap() to use PROT_EXEC on
files that don't have the "indirect" flag. Also change the "library" alias
in veriexecctl(8) to mean "file, indirect".

okay blymn@
2006-09-30 10:56:31 +00:00
perseant 554662dc37 Call fcntl on the file descriptor *before* closing it. 2006-09-28 23:23:01 +00:00
elad 38e12255a4 Change error message to say "setuid", forgotten in previous commit.
Pointed out by Ray Lai, thanks!
2006-09-28 16:01:16 +00:00
christos 6bc6175052 Don't record runlvl transitions before we have a read-write /var. Noticed
by lrou at x dot ua.
2006-09-28 15:20:14 +00:00
christos c5acbf4d6b Coverity CID 3788: comment out impossible code. 2006-09-27 18:52:11 +00:00
wiz 730e1c55de End sentence with a dot. 2006-09-27 17:42:34 +00:00
elad 5c38108d28 Change the PaX mprotect(2) restrictions' "global_protection" knob to
just "global" -- it's shorter and more readable. Update documentation.
2006-09-26 14:48:40 +00:00
elad fd2bf79719 Add a DIAGNOSTICS section, specifically to address the "Operation not
supported by device" error. Reference options(4). Bump date.
2006-09-25 20:07:17 +00:00
christos 6accae529c Error message consistency:
1. don't print the program name in the message [syslog does it]
2. no extraneous \n [syslog takes care of it]
3. quote strings as `%s' [we are using syslog]
4. use %m instead of error = %d
2006-09-25 19:42:04 +00:00
wiz da100ff1d9 Use more macros. New sentence, new line. 2006-09-24 15:52:12 +00:00
jmcneill 4fd9dcb2a0 PR# 28660: how to remove bootmenu text from some partition 2006-09-24 15:22:01 +00:00
elad d13f82cf17 On 2nd thought, setuid() is better here. 2006-09-24 11:17:09 +00:00
elad 545c393d67 PR/28741: Michael Santos: ping does [not] drop root privileges
Moved socket calls way up, and called seteuid(getuid()).
2006-09-24 11:05:09 +00:00
xtraeme 91254d0d23 It's WDCC_SECURITY_FREEZE not WCDD_SECURITY_FREEZE.
Noticed by Sergey Svishchev.
2006-09-24 08:33:30 +00:00
pooka 4df78a97d5 print the L flag for routes with llinfo. makes you not wonder why
non-llinfo routes are being printed for route show -llinfo
2006-09-23 23:01:01 +00:00
dyoung 6333e1495e Let us qualify 'route flush' and 'route show' commands with -llinfo
and -host flags, which is useful for displaying/flushing ARP entries:

# route -n show -inet -llinfo -host
Routing table

Internet:
Destination        Gateway            Flags
169.254.1.119      link#1             UH
169.254.230.110    00:02:6f:21:e6:6e  UH
# route -n flush -inet -llinfo -host
169.254.1.119                             done
169.254.230.110      0.2.6f.21.e6.6e      done
169.254.237.70                            done
# route -n show -inet -llinfo -host
Routing table
#

This will help me address bin/11079, "dhclient may require arp and sed".

Extract common code from flushroutes() and show(), creating
parse_show_opts().

While I'm here, make small cosmetic changes to flushroutes().
2006-09-23 22:41:25 +00:00
dyoung 29655a0cbb Move the #ifndef SMALL code together. 2006-09-23 21:55:47 +00:00
dyoung 07474a8f36 Use the symbol AF_UNSPEC instead of 0 as appropriate. 2006-09-23 21:51:05 +00:00
dyoung bf71bcc951 Remove dead code. 2006-09-23 21:11:53 +00:00
he fa8dee8628 Um, correct previous, so that current_state def/use is consistent. 2006-09-23 18:57:26 +00:00
elad 30d1b3f220 PR/30226: Nino Dehne: ping6(8) and ping(8) are inconsistent in the output
of round-trip times.

okay rpaulo@
2006-09-23 16:18:04 +00:00
xtraeme e2e3ea2b19 Do not print "SMART not supported" when SMART was disabled, this
fixes PR bin/18666.
2006-09-23 15:24:24 +00:00
he 54f712bd18 Since current_state is conditionally defined, make sure its uses are as well. 2006-09-23 14:04:26 +00:00
christos c34b6372d0 Try entertain who(1) because it has been sad since it was swallowed by the
Death Star: add utmpx entries for boot time, down time, run level, login
process.
2006-09-22 21:49:21 +00:00
thorpej ef731d9e00 - Add a new DRVCTLCOMMAND ioctl to /dev/drvctl. This is a generic
"execute a command" ioctl that takes a dictionary as an argument
  (specifying the command and arguments) and returns a dictionary
  with the results (error code, optional error message, optional
  result data).

- Define and implement a "get-properties" command for DRVCTLCOMMAND
  that returns the properties dictionary of the specified device.

- Add a -p flag to drvctl(8) to fetch and display the properties of
  the specified device.

This is a great example of how to use prop_dictionary_sendrecv_ioctl().
2006-09-22 04:37:36 +00:00
elad 58375355b4 .Sh -> .Ss
mmm mdoclint. :)
2006-09-17 13:03:02 +00:00
elad efffcc37c4 Reference veriexecgen(8) instead of the old scripts. Bump date. 2006-09-16 21:06:13 +00:00
hubertf 8e46fd3f16 Fix typo, noted by Nino Dehne <ndehne@gmail.com> 2006-09-16 20:15:49 +00:00
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