Commit Graph

1269 Commits

Author SHA1 Message Date
pst
489b7a4fe8 Attempt to open the device for reading before actually adding the device
to the session list.  If the device comes back as unconfigured, just
ignore that line in /etc/ttys.  If someone HUP's init, we'll try again.

This change stops getty's from hanging on vty and sio ports that don't
exist, either due to LKM drivers not being loaded, or probes failing.
Reviewed by:	bde
1997-06-28 08:18:29 +00:00
jhay
0814c237ff Display tickadj in struct clockinfo. 1997-06-24 18:23:32 +00:00
brian
dc42cd84a9 Suggest using /etc/services entry rather than a
number in the "ipfw add divert" example.
1997-06-24 10:49:44 +00:00
tegge
ad743ec5a7 Allow use of the name "swap" instead of an actual swap device.
This makes configuration of mfs /tmp on diskless clients more intuitive
for people like me, that have used this feature on NetBSD and SunOS.
Using the -T option and /dev/null, while already supported,
is neither intuitive nor documented in the handbook.
Obtained from: NetBSD
1997-06-23 22:44:51 +00:00
julian
b2627a7a7f Allow ipfw to look up service names from /etc/services (or NIS if turned on)
note.. this would be dangerous if your ipfw was blocking NIS access :)

Submitted by: archie@whistle.com (Archie Cobbs)
1997-06-23 22:32:13 +00:00
steve
7a5541cde7 Show the real revision date and not the date that this
manpage is being viewed.
1997-06-23 04:03:49 +00:00
jkh
f4c30626de sysconfig -> rc.conf 1997-06-22 14:40:27 +00:00
brian
4fa0e5a551 This commit was generated by cvs2svn to compensate for changes in r26781,
which included commits to RCS files with non-trunk default branches.
1997-06-22 04:19:08 +00:00
brian
59a701d2eb Bring natd into main source tree now that the
pppd/natd combination works ok.

Submitted by:	Ari Suutari <ari.suutari@ps.carel.fi>
1997-06-22 04:19:08 +00:00
charnier
8e9b467863 Sync usage string according to man page. 1997-06-19 14:44:24 +00:00
charnier
c50254e7ea Cosmetic in usage string. 1997-06-19 14:42:10 +00:00
charnier
359e756ecf Use warn(3). 1997-06-19 14:40:41 +00:00
charnier
0c0624c76d Use err(3). Add missing prototypes. Cosmetic in usage string. 1997-06-19 14:38:53 +00:00
charnier
7f9d40cba7 Use err(3). Add usage(). 1997-06-19 14:33:42 +00:00
charnier
eb50166664 Use err(3). 1997-06-19 14:28:32 +00:00
charnier
6708198883 Various typos in man page. Cosmetic in usage string. Use err(3) instead
of fprintf. Remove unused variables.
1997-06-18 06:37:23 +00:00
charnier
8b228a9975 Sync man page and usage string. Remove unused -p option from getopt call. 1997-06-18 06:34:28 +00:00
charnier
b430896bf1 Sync man page and usage string. 1997-06-18 06:33:11 +00:00
charnier
a7ec830880 Sync beetween man page and usage string. 1997-06-18 06:30:34 +00:00
charnier
2f83b582ea Fprintf -> warn. 1997-06-18 06:28:46 +00:00
bde
f96e3b64ac Merge from Lite2.
- use new getvfsbyname() interface.
- new -A option, like -a except only mounted file systems are unmounted.

All non-cosmetic FreeBSD changes in umount.c, except ignoring of
realpath() failures, went away because they are done better in Lite2.
realpath() failures must be ignored so that non-pathnames like
"<above>:/foo" and "host:/bar" get as far as mount(2).

Reviewed by:	dfr
1997-06-16 11:20:05 +00:00
max
ba3c9ef967 Typo fix.
PR:		3868
Submitted by:	Kazuo Horikawa <k-horik@yk.rim.or.jp>
1997-06-16 06:54:30 +00:00
charnier
e4cd6f51ca Use err(3) instead of local copy. 1997-06-16 06:43:13 +00:00
charnier
03fe5003eb Use err(3) instead of local err() (a errx() like function). 1997-06-16 06:38:14 +00:00
charnier
ad63a4c160 Use err(3). 1997-06-16 06:35:23 +00:00
ache
1b5fc58b0b Remove srandomdev fallback 1997-06-14 00:17:53 +00:00
max
aed020b3a1 Typo fix.
PR:		3854
Submitted by:	Takahiro Yugawa <yugawa@orleans.rim.or.jp>
1997-06-13 20:58:09 +00:00
charnier
6e0b43d464 Remove __progname. Cosmetic in usage string. 1997-06-13 06:27:12 +00:00
charnier
98daca0d1c Use err(3). 1997-06-13 06:24:42 +00:00
charnier
5cfc21982c Add Id. Staticize usage function. Typo in usage string. 1997-06-11 07:18:18 +00:00
charnier
128554a0bd Remove __progname. Make -f a no-op flag as stated in the man page. Remove
unused variables.
1997-06-11 07:13:30 +00:00
charnier
d048b9413f Add Id. Cosmetic in usage string. 1997-06-10 11:14:04 +00:00
charnier
31625b3c6b Add Id. Use err(3). Costmetic in usage string. 1997-06-10 11:08:53 +00:00
charnier
e8cbbf4f69 Remove __progname. Cosmetic in usage string. 1997-06-10 11:04:50 +00:00
charnier
7be0d348a8 Add Id, add usage function. 1997-06-10 11:01:13 +00:00
charnier
4c8536d451 Use errx instead of fprintf/exit. 1997-06-04 06:46:09 +00:00
charnier
c3d108c78d Expected to be found in /sbin not /etc. 1997-06-04 06:40:30 +00:00
brian
864e7b2e63 Number partitions 1-4, not 0-3.
Any existing config files (using the -f option) will need
to be changed although using the old files will usually result
in an error (partition 0 is invalid).
1997-06-03 21:24:39 +00:00
dfr
8aa4391233 Allow the 'async' mount flag. 1997-06-03 13:49:26 +00:00
gibbs
9ad77f813d Don't overflow when calculating the size in MB of a partition.
No more 241MB 4+ gig partitions for me!
1997-06-02 19:25:48 +00:00
julian
18750f0354 Submitted by: Whistle Communications (archie Cobbs)
these are quite extensive additions to the ipfw code.
they include a change to the API because the old method was
broken, but the user view is kept the same.

The new code allows a particular match to skip forward to a particular
line number, so that blocks of rules can be
used without checking all the intervening rules.
There are also many more ways of rejecting
connections especially TCP related, and
many many more ...

see the man page for a complete description.
1997-06-02 05:02:37 +00:00
dfr
2fc66c2d94 Use realpath on the source as well as the destination. 1997-05-23 17:07:40 +00:00
dfr
eedff6c44b Typo in previous change. 1997-05-23 17:07:00 +00:00
dfr
573a396aa7 Generalise the previous change so that only NFS hostnames are looked up.
PR:		bin/3588
Suggested by:	Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>
1997-05-16 10:27:02 +00:00
max
f0ed53bbe1 Typo.
PR:		3600
Submitted by:	Josh Gilliam <soil@quick.net>
1997-05-15 09:00:39 +00:00
alex
860e1f01b9 Minor rewording of the examples section. 1997-05-15 00:51:08 +00:00
peter
ef73892b1a Clean up some more. Move parsing of sysctl iflist data into a single
place rather than updating the main loop's index variables from within
a subroutine and other revolting things like that.  Move some more
globals into local variables.
1997-05-10 17:14:53 +00:00
peter
6f36e2eccf Grumble.. My last patchup here didn't quite work either. I hate this
program and it's use of global variables.  Somehow, I managed to miss the
most obvious case.. "ifconfig ed0 10.0.0.1" failed (no "inet")

Submitted by: dfr
1997-05-10 14:47:35 +00:00
dfr
6a933805fd Add utilities for the kernel linker. 1997-05-07 18:19:54 +00:00
peter
c54176b4c3 Restore unintentially lost backwards compat behavior of defaulting to
family inet if not specified.  (eg: "ifconfig ed0" down would fail because
no family was specified, even though the up/down status is not per family)

Pointed out by: Wolfgang Helbig <helbig@MX.BA-Stuttgart.De>
1997-05-07 04:28:26 +00:00
joerg
e005bbd63c Fix a long-standing bug with dump not treating errors correctly. They
were mishandled as an EOF, which became fatal if your first tape was
accidentally write-protected.

PR:		bin/850 dump treats write-protect as an EOT...
1997-05-06 20:52:28 +00:00
eivind
5ea236e383 Fix typo.
PR:		Closes PR docs/3488
Submitted by:	k-horik@yk.rim.or.jp
1997-05-04 20:04:59 +00:00
peter
54b5e92f49 Commit hooks for ifmedia support. It's optional in the Makefile, and
can be trivially disabled.
1997-05-04 06:27:45 +00:00
peter
036d0fb7d5 Bring in the ifmedia components of NetBSD's ifconfig as a seperate file.
Obtained from: Jason Thorpe via NetBSD
1997-05-04 06:22:27 +00:00
peter
c2cd7da05d Second try at cleanups and fixes (without if_media stuff for the moment)
- parse command options using getopt for consistancy
- sanitise the command parsing so that it's less like spaghetti
- implement a "-l" option (idea from NetBSD - just list names)
- attempt to clean up the sysctl parsing loop some more.  It still needs
  to be taken out the back and shot though.
- cut down on global usage, but there's a lot more scope for this.
- make usage string a bit closer to reality (it was missing lots of things)

Unfortunately, I did this for the second time but with the memory of
the NetBSD version still recently in my mind.  It's hard to redo simple
changes or getopt stuff without making it look like what you've been
working with a few hours ago.
1997-05-04 06:14:47 +00:00
peter
2c9c5546d4 force null commit to skip over rev 1.25 so there's less cvs trouble 1997-05-04 06:00:27 +00:00
peter
db7461418d Grab some of the NetBSD text for describing the new options and the
media commands.
1997-05-03 23:03:56 +00:00
imp
edf3f04212 OpenBSD uses ID 0xa6 for its partitions on i386, arc and others that need
a BIOS-like partition table.  We now detect this correctly and print the
right thing.
Obtained from: Value obtained from OpenBSD sources.
1997-05-02 03:08:04 +00:00
dfr
d2e6eb44ef Test both the NFS and MOUNT protocols for v3 support before allowing a v3
mount.  It is possible to have v3 MOUNT but only v2 NFS, for instance for
a custom user-mode server like CFS.

Reviewed by:	"Louis A. Mamakos" <louie@TransSys.COM>
1997-05-01 12:30:02 +00:00
pst
d189b0dfd0 Back out msmith's recent commit which breaks using symbolic names for netmasks.
Instead, reverse the order of the testing, so if a symbolic name starts with
a digit, we'll see if we can make a network address out of it first.  If
that fails, then we'll call getnet...
1997-04-30 18:40:12 +00:00
msmith
5139aca705 Fix parsing of mount options with '=' in their name.
PR:		bin/3027
Submitted by:	Louis Mamakos <louie@TransSys.COM>
1997-04-30 05:48:22 +00:00
wollman
db77624107 Document -k flag here, too. 1997-04-29 17:48:58 +00:00
wollman
d226ef144b Implement Kerberized rcmd for rdump/rrestore. This is lacking the
options one would normally expect to set the realm, enable encryption,
and whatnot, but this actually is able to contact the remote server,
so at least it's a start.  (As a bonus, the stripped static binary is
unquestionably exportable.)
1997-04-29 17:46:27 +00:00
joerg
aae566870b Userland part of ISO9660 multi-session support. mount_cd9660(8) will
now by default mount the last data track (thus last session), as
opposed to the very first session it has been mounting previously.
This is consistent with the ISO9660 multi-session idea, and the way
other operating systems are working.

There's support to mount arbitrary sessions using the -s option.  This
way, you can simulate multi-session CDs on something like vn devices
that don't support CDIO* ioctl commands.  You can also force the
historic behaviour with

	mount -t cd9660 -o -s=0 /dev/cd0a /cdrom
1997-04-29 15:56:40 +00:00
dfr
39cc207873 Don't try to look up unionfs' <above>, <below> keywords as hostnames. 1997-04-29 09:10:11 +00:00
dfr
5705190364 Use realpath() on the source as well as the target otherwise it can be
impossible to unmount a union which was mounted with a relative pathname.
1997-04-29 09:09:09 +00:00
ache
9829398fac Change vfork to fork, too many memory-clobbering actions present in child 1997-04-23 23:04:58 +00:00
msmith
2190adec41 Don't call getnetbyname() on a netmask. On a system with a slow net
connection, a large set of network exports could take many minutes to
time out, giving the appearance of a total hang during boot.
1997-04-23 11:03:10 +00:00
danny
24026ebd29 Spelling police. 1997-04-23 04:46:38 +00:00
dfr
a6bde6da85 Add a -2 flag to mountd to allow an admin to disable NFSv3 services.
This is handy for testing and possibly to work around busted v3 clients.
1997-04-22 10:37:27 +00:00
dfr
2166a1b301 Use v3 protocol by default if it is supported by the server. Allow the
user to force v2 protocol even if the server supports v3.

Obtained from: NetBSD but with a slightly different implementation
1997-04-18 16:23:10 +00:00
danny
285de91cc0 Fix typo: "oder" -> "order". 1997-04-16 09:56:30 +00:00
joerg
947370ca12 Implement a -r option to fsdb(8), ``read/only''. 1997-04-15 09:02:48 +00:00
guido
544a6e8574 Oops...now really commit the doc change. 1997-04-09 20:25:43 +00:00
guido
c0dad1ff8d Make a sysconfig variable controlling if teh kernel should accept
nfs requests from non-privileged ports.

Change mountd such that it does never set this variable, but only clears
it when run with -n. Also document this in the man page.
1997-04-09 20:17:15 +00:00
phk
4632df0ca9 Allow "modern" syntax:
route add -net 192.168.64.0/20 bla bla bla
1997-04-02 17:05:30 +00:00
phk
86b5cc53e4 unifdef CCITT, ISO & CRUFT. 1997-04-02 16:52:45 +00:00
dfr
0d59262184 Make "-o noxxx" work properly, allowing the user to clean e.g. the resvport
flag (which is now set by default).
1997-04-02 11:30:44 +00:00
mpp
4b08ee0ed3 Be more specific as to which flags may not be turned off when the
system is running in secure mode.

Obtained from: NetBSD PR# 3299
1997-04-01 20:41:04 +00:00
guido
7f21d44360 Make mount_nfs use reserved ports by default.. Mounts already use
a reserved port, so why not the nfs rpc's themselves?
With user allowed mounts, this perhaps needs a closer look, but
on the other hand, a user could already specify the flag.
If normal users should not be able to use resserved ports, the kernel
should check for the flag at mount time.
1997-04-01 17:20:17 +00:00
bde
68052e6de3 Don't fail when the vfs.nfs.nfs_privport sysctl doesn't exist
(presumably because the kernel is old).  Moved the declaration of a
variable realated to this sysctl outside of an unrelated ifdef.

Not fixed:
- this sysctl is badly named (nfs occurs twice).
- it's silly to have for FreeBSD in FreeBSD code, especially when
  only half of the FreeBSD-dependent code is ifdefed.
1997-04-01 14:15:30 +00:00
bde
c2086a6f98 Fixed missing DPADD. Removed now-redundant SRCS. 1997-04-01 07:43:14 +00:00
brian
cb7f5ad555 Remove the syslog stuff, and allow various return values
in uu_lock().  Add uu_lockerr() for turning the results of
uu_lock into something printable.  Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly  where it should.

Suggested by:	ache@freebsd.org
1997-03-31 22:51:00 +00:00
peter
3e63a14f34 Fix the mount_mfs case from the last cleanup. The code was (ab)using
it's internal malloc() implementation to try and avoid overstepping it's
resource limits (yuk!).  Remain using libc's malloc(), but check the
resource limits right before trying to malloc the ramdisk space and leave
some spare memory for libc.  In Andrey's words, the internal malloc
was "true evil"..  Among it's sins is it's ability to allocate less memory
than asked for and still return success.  stdio would just love that. :-)

Reviewed by: ache
1997-03-31 16:43:16 +00:00
imp
691010efad compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-31 05:11:47 +00:00
brian
10839f0219 Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
phk
85568f7654 Fix mount call for devfs.
Submitted by:	bde
1997-03-30 09:22:41 +00:00
imp
167db52912 compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
peter
78634ace4c Make this compile after the fsirand changes that deleted two fields.
I was not sure whether the fs_id fields should be printed in the clear
in case of sniffing over a network login etc.  It might be an idea
to have somebody with spare time go through and find any other missing
fields that should be reported.

Definate 2.2.x/2.1.x candidate since it breaks the build.
1997-03-28 13:06:59 +00:00
guido
8db0f5f4fd Add code that will reject nfs requests in teh kernel from nonprivileged
ports. This option will be automatically set/cleraed when mount is run
without/with the -n option.
Reviewed by:	Doug Rabson
1997-03-27 20:01:07 +00:00
mpp
223d4ca2d3 Update HISTORY to reflect that this will first appear in 2.2.5. 1997-03-27 18:47:05 +00:00
mpp
831b437059 Typo fix (now how did that one get by me :-).
Submitted by:	Philippe Charnier
1997-03-27 00:27:50 +00:00
guido
4763d0a981 Get rid of __progname. I thought I already did that... 1997-03-26 19:07:54 +00:00
mpp
7886fb96dd Typo police. Also update HISTORY to reflect when this first appeared
in FreeBSD.
1997-03-24 20:50:57 +00:00
ache
cf3de83d91 Include missing <time.h>
Add missing RNG initialization
Use srandomdev() for RNG initialization
1997-03-24 15:51:11 +00:00
ache
3d7efd90ca Cleanup STANDALONE stuff
Not replace malloc() family for non-standalone variant
Pay attention on malloc() family return code now
Use srandomdev() now for RNG initialization
1997-03-24 15:43:36 +00:00
imp
3c8c5177a0 Fix small race window when creating portal socket.
Obtained from: OpenBSD
1997-03-24 05:53:12 +00:00
imp
17787893f3 Use mkstemp rather than mktemp to prevent a small race.
Obtained from: OpenBSD
1997-03-24 05:44:28 +00:00
bde
bdddad7101 Reactivated dumplfs and newlfs. 1997-03-24 04:57:50 +00:00
bde
2d01f2178c Changed MAN to MAN8 so that this builds. 1997-03-24 03:38:16 +00:00
guido
c337c37259 Add generation number randomization. Newly created filesystems wil now
automatically have random generation numbers. The kenel way of handling those
also changed. Further it is advised to run fsirand on all your nfs exported
filesystems. the code is mostly copied from OpenBSD, with the randomization
chanegd to use /dev/urandom
Reviewed by:	Garrett
Obtained from: OpenBSD
1997-03-23 20:08:22 +00:00
mpp
5c33e549a5 Mdoc cleanup. 1997-03-19 22:42:02 +00:00
peter
12d9e0792e patch up some "int *" vs. "time_t *" (long) mismatches. They could be
nasty if sizeof(int) != sizeof(long).
1997-03-18 20:02:18 +00:00
peter
6ae0d54833 Restore check for ridiculous directory sizes. 1997-03-18 19:53:54 +00:00
peter
b8a8563e51 Document the -a option in .Fl form instead of .Cm form to be consistant
with the rest of the manpage.  (Lite2 documents it in getopt form, Lite1
did it in old-style arg format)
1997-03-15 06:23:57 +00:00
peter
1a407c81b8 The -a option (autosize) option got mangled during the Lite2 merge.
Pointed out by:  Tom Jackson <tom@peeper.jackson.org>
1997-03-15 05:32:40 +00:00
bde
200c003cab Fixed bogus casts from (int32_t *) to (time_t *). 1997-03-13 17:56:25 +00:00
peter
2d879de2ad Kill the Lite2 early "filesystem clean abort" check and go back to
something closer to how we used to do it.  The Lite2 way is to check the
"fsclean" flag in the superblock and stop there if so (during preen).
We now do the various superblock sanity checks that we used to do before
since it's cheap.  We now get the filesystem state summary again instead
of "FILESYSTEM CLEAN; CHECKING SKIPPED" (or whatever).
1997-03-13 15:37:23 +00:00
peter
1c4cdc1a36 Reactivate fsdb 1997-03-13 12:46:17 +00:00
peter
d595a2d087 Missing $Id$ 1997-03-13 12:44:53 +00:00
peter
c10a735224 Make this compile. Mostly use the new names for the ctime/atime/mtime
stamps in the inodes and call one of fsck's utility funcs with a new arg.
1997-03-13 12:42:22 +00:00
bde
7c6cdff7fb Fixed checking for a non-numeric minor number. 1997-03-12 19:03:40 +00:00
joerg
d5c33ac549 Record num_eisa_slots if it could be found in the kernel. 1997-03-12 18:54:52 +00:00
bde
0ecb1e854b Finished (?) merging with Lite2: cleaned up #include mess; fixed merging
errors (mis-sorted prototypes, duplicated MNT_NOATIME, duplicated NULL
mntopts fixup).

Updated getopt() usage.

Fixed style bugs in FreeBSD changes (one or two per line for putfsent()
stuff).
1997-03-12 18:35:10 +00:00
bde
1b52927894 Finished (?) merging with Lite2: cleaned up #include mess. 1997-03-12 17:01:11 +00:00
bde
a54018968d Finished (?) merging with Lite2: cleaned up #include mess.
Fixed style bugs in FreeBSD changes.
1997-03-12 16:58:35 +00:00
bde
3059cc3c4c Finished (?) merging with Lite2: cleaned up #include mess and fixed a
style bug.

Removed a redundant declaration.
1997-03-12 16:53:31 +00:00
bde
3bd624b27a Finished (?) merging with Lite2: cleaned up #include mess.
Fixed misformatting in a comment.
1997-03-12 16:49:28 +00:00
bde
70568e2da5 Finished (?) merging with Lite2: cleaned up #include mess.
Updated getopt() usage.
1997-03-12 16:46:32 +00:00
bde
948d236d70 Restored lost reference to fsdb(8).
Fixed weird quoting of $Id$.
1997-03-12 16:35:26 +00:00
mpp
43df4ac67e Add cvs Id. 1997-03-12 15:08:06 +00:00
mpp
8cfc866252 Some minor mdoc cleanup. Partially based on PR# 2959. 1997-03-12 13:22:17 +00:00
peter
494e7b3a77 Merge from Lite2
- cleanups,
 - whiteout support
 - bug fixes (chflags missing on a few file types etc)
The dump/restore folks would want to have a closer look at this, the
change is pretty big.
1997-03-11 12:55:19 +00:00
peter
a4f4635e03 Merge from Lite2 (use new getvfsbyname() interface) 1997-03-11 12:51:00 +00:00
peter
62af9afecd Merge from Lite2 (but does not work) 1997-03-11 12:49:29 +00:00
peter
2a0adf9a12 Merge from Lite2:
- use new getvfsbyname() and mount(2) interface (mount_mfs)
 - use new fs include files
 - updated inode / cg layout calculations (?)
1997-03-11 12:48:17 +00:00
peter
bd986f8051 Merge from Lite2 (use new getvfsbyname() and mount(2) interface, cleanup) 1997-03-11 12:43:45 +00:00
peter
1c0f77f024 Merge from Lite2 (use new getvfsbyname() and mount(2) interface) 1997-03-11 12:40:45 +00:00
peter
f461294e07 Update to compile under Lite2 1997-03-11 12:38:16 +00:00
peter
2feef020b3 Merge from Lite2
- use new getvfsbyname() interface and mount(2) interface

**DANGER WILL ROBINSON!!**  You must be running a -current kernel
from within a week or so in order for this to work!
1997-03-11 12:28:00 +00:00
peter
d2924d1b17 Compile under Lite2 (unistd.h has proto for getopt) 1997-03-11 12:24:00 +00:00
peter
0c594fc8cf Compile under Lite2 (getopt() is in unistd.h etc) 1997-03-11 12:23:09 +00:00
peter
ac28da2dc0 Merge from Lite2. Note that Lite2 has it's own filesystem clean check
skipping code that overrides ours sooner.  One should be eliminated,
but for now it works.
1997-03-11 12:20:21 +00:00
peter
683ee3c015 Merge from Lite2 (does not work though) 1997-03-11 12:14:07 +00:00
peter
a48eeb8124 Merge from Lite2 1997-03-11 12:12:26 +00:00
peter
7f724bc019 Merge Lite2 changes (rather bigish, the dump/restore folks should check) 1997-03-11 12:09:50 +00:00
peter
9d6aaa6325 Disable two newly broken dirs:
fsdb (too intimate with old fsck, needs work)
 newlfs (doesn't build since Lite2 lfs wasn't merged into kernel)
1997-03-11 12:06:41 +00:00
peter
5e2372f721 Import some CSRG 4.4BSD-Lite2 components for sbin onto vendor branch.
(note that some of these have already been imported, this is a no-op)
1997-03-11 11:59:39 +00:00
peter
f59a1bdace This commit was generated by cvs2svn to compensate for changes in r23669,
which included commits to RCS files with non-trunk default branches.
1997-03-11 11:59:39 +00:00
bde
7ce0820838 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
bde
d8a1a0faaf This commit was generated by cvs2svn to compensate for changes in r23412,
which included commits to RCS files with non-trunk default branches.
1997-03-05 17:51:21 +00:00
bde
28c4c8d166 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
bde
20c91658b4 Force null termination after 2 errant strncpy()s. 1997-03-05 12:08:44 +00:00
imp
227366adfe Fix typo introduced in 1.17.
Submitted by:	"Philippe Charnier" <charnier@xp11.frmug.org>
1997-03-04 22:05:49 +00:00
bde
7de8df2b4b Updated mount_msdos to use the Lite2 getvfsbyname() interface. 1997-03-03 13:23:54 +00:00
imp
e5f21340d7 Check the size of the IP address reutrned from gethostbyname2, per PR
2578 from Julian A.  Likely not strictly needed, but it doesn't hurt
and protects ping against possible buffer overflows if the resolver
were to return large IP addresses.
1997-03-03 09:50:21 +00:00
mpp
cff32b65f6 An odd merge from 2.2 to -current. Somehow that 2.2 nologin.5
man page was in better shape than the 3.0-current version,
so I'm committing the 2.2 version to 3.0.  Whatever happened,
it was my fault :-).
1997-03-03 06:47:27 +00:00
jmg
8137e0fb8f fix man page to use marcos instead of parens, quotes and braces
plus other minor fixes
1997-03-02 23:38:05 +00:00
jmg
b6a02cdd45 mdoc'ify man page 1997-03-02 21:43:10 +00:00
imp
914ff23b93 1) Minor nits in the usage message from bde. I took out the hard tabs and
used spaces to align the second line under the program name.
2) Cache uid after call to setuid(getuid()) so we don't waste a system call
   for each packet with a call to getuid for the -v case.
3) Update manual to reflect new restriction on -l from last delta.

Suggested by:	bde, Bill Fenner
1997-03-02 20:01:13 +00:00
joerg
99d2db84f9 Avoid the ``Three seconds until format begins'' construct. It's
inconsistent with the remaining unix utilities, so replace it by
something better suited.

Learned from:	The Unix Hater's Handbook :-)
1997-03-02 11:21:07 +00:00
imp
ae1fecd92f 1) Fix usage to match convention and manual. Fix manual to match usage.
2) Must be root to run preload (OpenBSD ping.c 1.8)
3) Don't print all replies unless verbose and root (from idea in
   OpenBSD ping.c 1.10 and 1.11) to avoid leaking information available
   only to root.
4) Remove unused h: from option string to getopt.
5) Make the compiler happy with exit(0) (Lite-2?)

Reviewed by: Dan Cross <tenser@spitfire.ecsel.psu.edu>

Good candidate for 2.2 and 2.1 (as are many of the 1.17 changes).
1997-03-02 06:32:42 +00:00
wollman
17f6cabecc Make ping -Wall clean (except for one warning).
Do a better job of argument parsing.
Don't permit ping -f to a multicast address (very antisocial).
Don't permit -L, -I, -T options with unicast addresses.
Ensure that we ask for only AF_INET addresses (should close PR#2584).
Return <sysexits.h> error codes for failures.  Document this.
Fix man page to identify the author and put sections in correct order.
1997-03-01 20:19:18 +00:00
imp
17cf792b06 Fix a minor problem with restore from tapes from big endian machines.
This finishes the closing of PR2446 which J"org Wunsch pointed out to
me after I closed it.

Submitted by:	Tor Egge <Tor.Egge@idt.ntnu.no>
1997-02-25 02:25:02 +00:00
peter
b782f4df30 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
peter
245ba20d12 Revert $FreeBSD$ to $Id$ 1997-02-22 15:48:31 +00:00
peter
4968036f61 Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
roberto
ed1608278d Security patch from OpenBSD: fixes potential buffer overflow in a static
buffer (so more difficult to exploit but better safe than sorry). Found
by comparing FreeBSD & OpenBSD sources/logs for the auditing process.

Reviewed by:	Warner Losh
Obtained from:	OpenBSD
1997-02-20 22:16:39 +00:00
dg
d71873490f Protect from stack overrun via /etc/ttys, which could possibly allow a
root user to change the securelevel. Pointed out by Thomas H. Ptacek
<tqbf@enteract.com>.
1997-02-19 08:04:58 +00:00
bde
778d2e17a8 Disabled dumplfs. Importing the Lite2 version was a mistake, since
many files haven't left the vendor branch and the sys/ufs/lfs hasn't
been merged.
1997-02-17 13:15:42 +00:00
bde
cebb7ac61b Import Lite2's dumplfs. 1997-02-17 13:07:40 +00:00
bde
033e1785e7 This commit was generated by cvs2svn to compensate for changes in r22839,
which included commits to RCS files with non-trunk default branches.
1997-02-17 13:07:40 +00:00
jkh
13be5f8d6c Update CHANGEDSINCE macro to conform to -current dinode.h 1997-02-16 22:16:08 +00:00
joerg
ce56561376 Plug a security hole involving $ENV forwarding over telnet. Sigh, i
thought i've long since done this.
1997-02-15 10:15:49 +00:00
markm
7c4a46a3a0 Part two of a "fix-and-move". There were some macros declared in ../sbin's
Makefile that were a) broken and b) bogusly placed. This brings the
repeared macros in.

Pointed-out-by:	BDE
1997-02-10 17:44:34 +00:00
markm
5b3185bcd6 Part one of a "fix-and-move". Init(8) had make macros declared here
bogusly. This removes the macros for replacement into init's Makefile.

Pointed-out-by:	BDE
1997-02-10 17:41:33 +00:00
danny
9da4914e72 Add '-q' quiet flag for flush/add/zero commands; add 'show' command as
synonym for '-a list'; stop SEGV when specifying 'via' with no interface;
change 2 instances of strcpy() to strncpy().

This is a candidate for 2.2
1997-02-10 15:36:54 +00:00
eivind
959fd6631c Removed default setuid and added a comment to the manpage explaining this. 1997-02-09 20:56:34 +00:00
eivind
bf3d8cc375 Remove suid bit from binary, and update manpage to reflect this. 1997-02-09 18:03:41 +00:00
eivind
4327ec61e7 Buffer overflow patch. 1997-02-09 14:09:47 +00:00
wosch
5c82677757 /usr/lib/libmd.a -> ${LIBMD} 1997-02-08 23:24:10 +00:00
danny
3a676129b4 Reviewed by: Gary Jennejohn <gj@freebsd.org>
Submitted by:	Bruce Murphy <packrat@iinet.net.au>

Add '-a' audible flag, so terminal will beep upon receipt of a reply
packet.  Useful for debugging ethernet runs, among other things.
1997-02-08 01:43:56 +00:00
mpp
669d7c7c80 Replace "mfs" with "mount_mfs" in the NAME section. 1997-02-06 17:49:55 +00:00
wosch
33f749b773 /sbin -> ${BINDIR} 1997-02-06 01:24:43 +00:00
joerg
2b3e3d7363 Add the a' option (`auto-size'') to bypass all tape length
considerations, and dump right to the end of medium.
1997-02-01 23:44:19 +00:00
mpp
c629e6bcfd Some various mdoc cleanup.
Partially Obtained from: NetBSD-bugs mailing list
1997-01-28 05:55:22 +00:00
obrien
1627d472cb I was porting something from sysV world and found our cross references
not quite as good as I would expect.  So I'm introducing mknod to mkfifo,
and vice-versa.
1997-01-27 19:20:05 +00:00
imp
8c5715a8db Apply patch from pr2536, after testing locally.
Fixes: PR2446 and PR2536

Submitted by: Flemming Jacobsen <fj@tfs.com>

2.2 Candidate.
1997-01-25 05:27:17 +00:00
adam
2ee6680619 typo 1997-01-22 12:38:40 +00:00
davidn
71e4601fc6 Style police. 1997-01-22 02:07:55 +00:00
adam
a4845fcc5a -n was broken
2.2 candidate (probably)
1997-01-21 21:07:29 +00:00
mpp
81b3c1218e Various minor cleanup.
Partially Obtained from: NetBSD-bugs
1997-01-19 17:57:15 +00:00
davidn
557de278bc Impose login_cap resource limits on processes started by init.
/etc/rc started with "daemon" settings.
	"window=" started with "default" settings
	gettys started with "default" settings.
This should open the way to junk kernel options MAX_{OPEN,CHILD}
and the corresponding sysctl vars.
1997-01-19 16:49:13 +00:00
jkh
6c16e85bae Adjust spelling of `fw_flg' so this thing compiles again. 1997-01-17 07:01:21 +00:00
alex
a3118e8c68 Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +00:00
adam
752ba4d26f implement "not" keyword for inverting the address logic 1997-01-16 21:04:29 +00:00
phk
4a4bd14c4c Trivial fix for braino.
Reviewed by:	phk
Submitted by:	Martin Ibert <mib@ppe.bb-data.de>
1997-01-16 10:12:30 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wosch
71f5160702 Sort cross references. 1997-01-13 00:25:51 +00:00
wollman
bca91f319c If the RTM_NEWMADDR and RTM_DELMADDR messages are defined
(in <net/route.h>), then interpret them appropriately.  This has
no effect until I commit the changes to multicast group
management (awaiting review).
1997-01-09 21:34:03 +00:00
peter
3e1646e9fb Fix double typo 1997-01-08 03:00:42 +00:00
imp
eba6461a03 Fix many buffer overflows, correct usage of strcat and implement
$TAPE.  Inspired by OpenBSD's work in this area.

Reviewed by:	Peter Wemm, Guido van Rooij and Jordan Hubbard.
Obtained from: OpenBSD
1997-01-07 20:48:24 +00:00
pst
3e449dc0ea bin/1789: dump estimates a negative number of tapes needed for huge dumps 1997-01-07 20:15:04 +00:00
wollman
ac8cf4628a This commit was generated by cvs2svn to compensate for changes in r21378,
which included commits to RCS files with non-trunk default branches.
1997-01-06 17:24:50 +00:00
wollman
8de1ca1a49 Quoth Vern:
ftp.sgi.com:sgi/src/routed.tar.Z has a fix that has been cooking for a week
or so and that fixes a problem in the new hash tables for zillions of
interface aliases.  The bug was that interfaces that come and go, such
as for SLIP and PPP, would get permanently lost.

Submitted by:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1997-01-06 17:24:50 +00:00
wollman
5972643f58 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
ache
b34e6f29a2 Merge to eliminate conflict 1997-01-03 08:29:46 +00:00
wollman
892d76ceb1 Latest version of routed from Vern Schryver. This one really
should fix Andrey's problem.
1997-01-02 16:57:08 +00:00
guido
07e783bc3e Yet another buffer overflow.
2.2 candidate
(and -stable too actually, who does that?)
Reviewed by:	Warner Losh
1997-01-01 14:08:47 +00:00
imp
d19cae33a9 Various security related deltas from OpenBSD
dirs.c:
	From OpenBSD 1.2, 1.3, 1.5, 1.8, 1.10, 1.11, 1.12
	1.2:
		use unique temporary files; netbsd pr#2544;
		lukem@supp.cpr.itg.telecom.com.au
	1.3:
		updated patch from lukem@supp.cpr.itg.telecom.com.au
		to also make -r and -R work again
	1.5:
		mktemp open & fdopen
	1.8:
		/tmp// -> /tmp/
	1.10:
		Fix strncpy usage and correct strncat length field,
		from Theo.  Also change some occurrence of MAXPATHLEN
		with sizeof(foo).
	1.11:
		does noone know how to use strncat correctly?
	1.12:
		use mkstemp()
	From NetBSD:
		Use open rather than create so we can specify
		exclusive open mode.

main.c:
	From OpenBSD 1.2, 1.5
	1.2:
		From NetBSD: support $TAPE.
	1.5
		Set umask to be read only by owner until we set real
		file permissions.
tape.c:
	From NetBSD:
		Use open rather than create so we can specify
		exclusive open mode.
1997-01-01 00:03:49 +00:00
obrien
aa9d006dfd Backing out my change of /etc/rmt -> /usr/sbin/rmt.
Added comments in both files stateing why /etc/rmt is correct so someone
else wont do the same thing again.

Suggested by:	Warner Losh & Ollivier
1996-12-29 11:48:45 +00:00
obrien
412ed00294 rmt is /usr/sbin/rmt, not /etc/rmt which is a link to /usr/sbin/rmt 1996-12-29 00:57:18 +00:00
wosch
de08351195 Add example for mount_mfs(8). 1996-12-26 02:01:09 +00:00
wosch
0426c0af88 comma typos 1996-12-23 23:09:55 +00:00
mpp
853fbca176 Minor mdoc/style fixes. 1996-12-23 02:03:15 +00:00
mpp
b4a9f746e1 Convert to mdoc format. 1996-12-23 01:04:46 +00:00
ache
8b70a73ddf FIx coredump with rtquery.
It is just quick fix taken from new routed sources,
full new routed importing I leave to wollman
1996-12-21 05:55:55 +00:00
wollman
55fb7512dc Delete redundant include of <sys/time.h> 1996-12-17 21:12:56 +00:00
wollman
1923b893d6 Merge from vendor branch. 1996-12-17 21:11:59 +00:00
wollman
9efe665f63 Latest routed from Vern Schryver. This is supposed to fix
Andrey's rtquery problem.

Submitted by:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1996-12-17 21:07:05 +00:00
wollman
883df1fcd3 This commit was generated by cvs2svn to compensate for changes in r20606,
which included commits to RCS files with non-trunk default branches.
1996-12-17 21:07:05 +00:00
fenner
e90f4998f6 Add multicast options -I (source interface), -T (set ttl), -L (no loopback).
They were all lowercase in the original, but our ping already uses -i and
-l so I made them all uppercase.

Obtained from:	Multicast release 3.5
1996-12-15 23:41:29 +00:00
mpp
d6f5b2f856 Now that all of the "standard" file system mount commands
refer the reader to the detailed information in section 5,
remove the mount_* man pages for those file system.  mount_std(8)
to cover all of the file systems it is currently being used
to mount.

mount_{devfs, fdesc, kernfs, procfs}.8 are now
MLINKS to mount_std.
1996-12-14 22:58:37 +00:00
mpp
2d8d988894 Refer the reader to devfs(5). 1996-12-14 22:49:44 +00:00
mpp
5fb251bcf3 Refer the reader to fdesc(5) for detailed info on the fdesc filesystem. 1996-12-14 22:18:08 +00:00
mpp
f2e85d05ba Remove the descriptions of the files in /kern and refer
the reader to kernfs(5) so that the information only
has to be maintained in one place.
1996-12-14 21:55:37 +00:00
mpp
3b372b51aa Update the newfs(8) man page to reflect current
default values for some options better.  Closes PR# 1374.
1996-12-14 20:54:05 +00:00
mpp
b15c39d6d2 Remove the detailed description of the files in /proc
and instead refer the reader to procfs(5) so that
the information does not need to be maintained in
two places.
1996-12-14 20:14:15 +00:00
wollman
879a7ef0ad Merge from vendor branch. 1996-12-11 21:04:17 +00:00
wollman
83f39a352f New version of Vern's routed. This includes more byte-order fixes,
some MD5 fixes, better tracing, configurable redirect processing,
and a fix to split-horizon/poisoned-reverse treatment.

Submitted by:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1996-12-11 20:59:33 +00:00
wollman
fb026d953f This commit was generated by cvs2svn to compensate for changes in r20339,
which included commits to RCS files with non-trunk default branches.
1996-12-11 20:59:33 +00:00
wollman
af7727cb96 Fix if.h lossage. I could have sworn I already fixed this one. 1996-12-10 21:25:42 +00:00
wollman
d3ecee07b3 Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves.  (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!)  Also fix up some
other #include messes while we're at it.
1996-12-10 17:11:53 +00:00
bde
8cc1fdd3af Cleaned up recent SIGINFO changes.
Simplified average calculations.  This also fixes potential overflow errors
and minor rounding inconsistencies (always round to nearest now).

Don't lose more SIGINFOs than necessary.

Print \r at the start of the status message.  This clears the dots that
are sometimes left by ping -f.

Reviewed by:	sef
1996-12-10 14:41:22 +00:00
mpp
316f6be0fa Improve the format of the usage string output.
Submitted by:	Sandro Sigala <sandro@cat.locao.net> as part of PR# 2134
1996-12-09 08:10:45 +00:00
mpp
6c8b1af21e Minor formatting/style fixes.
Submitted by:	Sandro Sigala <sandro@cat.local.net> as part of PR# 2134
1996-12-09 08:04:55 +00:00
pst
ef97ce8833 Fix typo in last patch. empty!=emtpy 1996-12-08 06:27:09 +00:00
sef
c48212278f Change how SIGINFO is handled -- set a flag (of sig_atomic_t), and check
that flag on every iteration of the loop.  This avoids calling fprintf
inside a signal handler, which is always somewhat icky.

Reviewed by:	bde
1996-12-07 20:20:41 +00:00
fenner
65c6417408 Fix math in SIGINFO printer. 1996-12-02 21:42:11 +00:00
sos
304d831859 This update adds the support for != 512 byte sector SCSI devices to
the sd & od drivers. There is also slight changes to fdisk & newfs
in order to comply with different sectorsizes.
Currently sectors of size 512, 1024 & 2048 are supported, the only
restriction beeing in fdisk, which hunts for the sectorsize of
the device.
This is based on patches to od.c and the other system files by
John Gumb & Barry Scott, minor changes and the sd.c patches by
me.
There also exist some patches for the msdos filesys code, but I
havn't been able to test those (yet).

	John Gumb (john@talisker.demon.co.uk)
	Barry Scott (barry@scottb.demon.co.uk)
1996-12-01 11:25:38 +00:00
wollman
1ee570ecc1 Fix lots of non-bug questionable code:
- Don't link against libkvm and don't uselessly include <kvm.h>.
- Declare constant objects as const.
- Declare functions with the correct types.
- Call functions with the correct parameters.

Not fixed:

- The sysctl parsing remains ugly (but it may be the best we can do).
- atnetrange() should use strtoul() rather than sscanf() for better
  error checking.
1996-11-21 19:36:09 +00:00
wollman
f677e9a302 For some reason the merge of this file didn't get committed properly.
Who has the conical hat?

Make things compile again.
1996-11-20 15:23:40 +00:00
wollman
b91551e883 Merge from vendor branch and use system MD5 library. 1996-11-19 20:42:43 +00:00
wollman
df774327d2 Last import was botched. Fix it. 1996-11-19 20:26:54 +00:00
wollman
fce827276a This commit was generated by cvs2svn to compensate for changes in r19882,
which included commits to RCS files with non-trunk default branches.
1996-11-19 20:26:54 +00:00
wollman
114e42787c Latest version of SGI routed courtesy of Vern Schryver. This version
adds the capability to use MD5 authentication as defined in the latest
documents.

Submitted by:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1996-11-19 20:23:47 +00:00
wollman
120c586640 This commit was generated by cvs2svn to compensate for changes in r19880,
which included commits to RCS files with non-trunk default branches.
1996-11-19 20:23:47 +00:00
sef
1f2dfe3791 Move the terminal handling code to a later location; this allows
the signal handlers to be set up; it also means that a failed name lookup
won't mess up the nokerninfo setting of the tty.

Reviewed by:	pst, nate
1996-11-19 03:32:32 +00:00
julian
f83f1c59af Submitted by: Archie@whistle.com
clear the fmod flag if it's set.
1996-11-13 02:01:36 +00:00
ache
3cd081b175 Add mount_msdos(8) reference
2.2 candidate
1996-11-10 02:21:05 +00:00
jdp
0118326e5f Document that "ldconfig -m" rescans all directories previously
entered into the hints file, in addition to the directories named
on the command line.

2.2 Candidate.
1996-11-09 20:26:19 +00:00
jdp
81bba450d5 Fixed a bug in the handling of the directories in the search path
that is stored in the hints file.  If that search path contained
a non-existent directory (one, say, that had been removed), and
"ldconfig -m /a/perfectly/good/directory" was run, ldconfig returned
an error status without printing an error message.  This caused
some confusing bombs when installing ports, in particular.

I changed it so that non-existent directories from the stored search
path are silently ignored.  Only non-existent directories named
explicitly on the command line are treated as errors.  Also, a
diagnostic is printed if and only if an error status is returned.

In an unrelated fix, ldconfig now silently ignores any directories
named on the command line when the "-r" option is given.  Formerly,
these directories incorrectly made their way into the "search
directories" line of the listing.  It really should be an error to
specify directories together with "-r", but I don't have time to
fix the manual page in that way right now.

2.2 Candidate.
1996-11-08 02:12:40 +00:00
jkh
7b9dce080d Allow fdisk to be driven from a configuration file, making a 3rd-party
utility for front-ending its operation more of a possibility.

2.2-RELEASE candiate.  Closes PR#1960
Submitted-By: Darryl Okahata <darrylo@hpnmhjw.sr.hp.com>
1996-11-06 14:08:39 +00:00
jdp
babb356b2c Fix a spelling error.
2.2 Candidate.
1996-11-05 22:27:33 +00:00
bde
e19880111b Fixed backgrounding of ping, which was broken by the ^T changes in rev.1.3. 1996-11-04 17:25:03 +00:00
wosch
90279ad4f4 fix usage string 1996-11-04 00:53:12 +00:00
wollman
7763a4ffb4 Delete another unnecessary #include <sys/mbuf.h>. 1996-11-01 20:30:37 +00:00
fenner
8cf03fedfc Use fprintf(stderr,) instead of msgtail() so it works for restore as well. 1996-11-01 17:23:41 +00:00
peter
7287066244 Temporarily disable an information message that was added in the last
commit..  This causes a link error in sbin/restore which also uses this
file.
1996-11-01 13:02:20 +00:00
fenner
75c2ebaa11 Make rdump error messages a little clearer and make them look like dump
messages, and make it explicit that stderr output came from the remote end.
 (e.g. "rmt: command not found")
1996-11-01 05:39:10 +00:00
fenner
6a0fb85f47 If rcmd() fails, return immediately instead of trying a bunch of
setsockopt()'s on a -1 file descriptor.

Remove attempt to decrease TCP MSS; it makes no sense.

Set the IP TOS to IPTOS_THROUGHPUT as an indication that this is an
application sending large blocks of data, as recommended by RFC1700.
1996-10-28 23:26:37 +00:00
phk
91bd35f309 If passed the -d flag, mount devfs on /dev 1996-10-28 11:03:19 +00:00
phk
14dde53c55 Don't give up just because we cant find the blkdev that corresponds
to the name given as a chardev.
1996-10-27 18:28:39 +00:00
fenner
3c7e2f5459 setuid back to the original caller immediately after opening the route socket.
Opening the socket is the only privileged operation route requires.

Make a couple of static buffers bigger, and use strncpy() and snprintf() where
there's a chance of overflow.

Fixes PR bin/1903

Partially Submitted by: Ollivier Robert <roberto@keltia.freenix.fr>

Don't look up the network number if we're being asked to add a host route.

Fixes PR bin/1900

Submitted by:	Bruce A. Mah <bmah@cs.berkeley.edu> (pr bin/1900)
1996-10-27 17:42:14 +00:00
joerg
9a3ddd97b6 Allow the specification of a mountpoint, and resolve it s disk device
using the fstab.

Closes  PR bin/129.

Submitted by:	jmg@nike.efn.org (John-Mark Gurney)
1996-10-25 20:38:40 +00:00
bde
842a7446a3 Moved #include of <sys/types.h> earlier so that this compiles when
<stdio.h> doesn't (bogusly) include <sys/types.h>.

Cleaned up #includes.
1996-10-25 06:48:29 +00:00
joerg
716fcd7118 Mention the historic mount options, as `deprecated'.
Closes PR # docs/735.
1996-10-22 21:56:58 +00:00
phk
b647589535 dumpfs blindly trusts that it has been handed a filesystem.
If the magic is bad, don't waste our time.

Submitted by: Giles Lean Giles Lean <giles@nemeton.com.au>
Obtained from: NetBSD PR bin/249
1996-10-21 19:40:01 +00:00
alex
9b6c3e888d Issue a warning if the user specifies an invalid interface in a rule.
The rule is still added to the chain since the interface may get
created later on after loading an LKM.
1996-10-17 01:05:03 +00:00
jkh
f39b076277 Bring back NS support for this utility - we need it for the commercial Novell
server software.
1996-10-16 19:37:58 +00:00
bde
e59ddf1629 Second try: attempt to import Lite2's newfs. 1996-10-15 08:40:58 +00:00
joerg
f685f88823 Fix my yesterday's brain-o: don't account for the kilobytes twice. 1996-10-14 22:56:01 +00:00
joerg
14dd70138e Yikes! Originally, i intended to apply the patch from PR # 1322,
but Bill has beaten me on this. ;-)

However, he missed the part to compute the kernelsize in kilobytes,
so the minfree consideration was now overcautious.  (I've also
changed the return type of dump_size() to void since int was useless.)

Being here, the fact that `vmcore' was written world-readable was just
a plain security hole: everybody who was able to crash a kernel could
later read any confidential information out of it at his will.  Create
it with umask 077 instead.
1996-10-13 20:55:45 +00:00
bde
f35890901a The dos() function needs a new second argument, containing the size
of the partition. Only if the size is 0 should the
special handling of 0 as first argument be triggered.

[This bug caused offset 0 to give C/H/S = 0/0/0 instead of 0/0/1.]

The init_sector0 function needs to decrease the first argument
to the second call to dos() by one to be consistent with the
calls to dos() in change_part().

[This bug caused fdisk -i to create bogus partition tables with
the ending C/H/S value 1 too high.  This usually gives S = 1
instead of S = maximum, so the geometry guessing in the slice
code and perhaps in SCSI BIOSes was defeated.]

Submitted by:	Tor Egge <tegge@itea.ntnu.no>
1996-10-13 18:18:50 +00:00
fenner
c4eeb055c1 Make the savecore command work like the man page says:
- make minfree work by getting the dump size before checking to see
  if the dump will fit on the filesystem
- also fail to dump if no minfree is specified but there are not enough
  free blocks.

Fix a typo in the man page.

Fixes PR bin/1322

Submitted by:	"Philippe C." <charnier@lirmm.fr>
1996-10-13 18:12:20 +00:00
bde
b24c97a50f Rewrote the section about the "normal" setting of the security level to
match reality.

Say that secured devices `may not be opened for writing' instead of
`are read-only'.
1996-10-12 15:37:23 +00:00
jdp
e11a58ddc6 Add a new option "-f hints_file" to specify an alternate file instead of
"/var/run/ld.so.hints".

Delete an incorrect statement about LD_LIBRARY_PATH from the manual
page.
1996-10-10 23:14:23 +00:00
guido
fa2df97111 Fix the case where fsck would not see sparse directories and the kernel would
panic. If such a thing is fixed fsck needs a rerun (and bugs the user to do
so).

Reviewed by:	Kirk McKusick
1996-10-08 14:54:53 +00:00
wosch
000fb64288 delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
joerg
43846dc578 When MODE SELECT'ing, the ``device-specific parameter'' field is
reserved by the SCSI-2 specs.  Hence, zero it out.  Some drives
(correctly) complain about this otherwise.

Reviewed by:	craigs@os.com (Craig Shrimpton)
1996-10-05 17:40:20 +00:00
jkh
47ef5d3faf Back out my -k changes; there's a better way to do this in the short-term. 1996-10-02 07:22:26 +00:00
jkh
3d87a60089 Add support for dset'ing an arbitrary kernel (experimental). 1996-10-01 14:42:36 +00:00
peter
23b0588846 Updates to deal with ld.so.hints version 2. It now deals with the
ldconfig path (from NetBSD).  I added code to make sure there were no
duplicates in the path when multiple ldconfig -m's were used.

Reviewed by: nate, jdp
Obtained from: NetBSD (partly)
1996-10-01 01:31:51 +00:00
guido
7706e782e6 Get rid of useless -f flag (though left for historical reasons). 1996-09-30 20:04:24 +00:00
wosch
ee17503232 .Os NetBSD -> .Os FreeBSD.
The pages are not NetBSD specific and FreeBSD is not a child of NetBSD.
1996-09-28 22:46:35 +00:00
bde
3b6e5aad90 Removed references to pathconf-related variables that were never handled
by sysctl and never can be in their documented form (kern.name_max would
have to become fs.filesystemname.name_max, etc.).

Added missing references to user.stream_max and user.tzname_max.  These
seem to misnamed.  <sys/sysconf.h> says that they correspond to POSIX2
names, but the sysconf names don't have POSIX2 or "posix2" like all the
other POSIX2 names.
1996-09-28 14:43:03 +00:00
guido
ce5e7a35c4 Add chlen command so you can set the size of an inode. This was handy
in order to create sparse directory files that caused a panic of a
filesystem where fsck would not find anything. A fix for fsck is in the
make but still has to be reviewed by Kirk McKusick.
1996-09-26 19:40:04 +00:00
bde
d2512c2bf9 Eliminated includes of the "temporary" backwards compatibility header
<sys/dir.h> in applications.  Maintained existing (inadequate) ifdefs
for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any
new ones.
1996-09-24 08:08:11 +00:00
wosch
89dea7c61d add missing comma(s) in .Xr macros 1996-09-23 22:24:39 +00:00
bde
2d23099e28 Who would have though that dmesg didn't understand message buffers?
Fixed the following bugs:
- the buffer was reprinted endlessly when msg.bufx == 0 and (for a
  different reason) when msg.bufx == 1.
- the last byte of the buffer wasn't printed except in the the infinite
  loop cases.
- the comment about walking the buffer didn't match the (correct) code.
- minor -Wall and style bugs.
Not fixed:
- excessive newline processing which hid the non-printing of the last
  byte of the buffer.
1996-09-21 08:11:22 +00:00
nate
c9979c6067 ts_sec -> tv_sec
ts_nsec -> tv_nsec
1996-09-20 04:56:09 +00:00
nate
5e96772b88 ts_sec -> tv_sec
ts_nsec -> tv_nsec
1996-09-20 04:33:57 +00:00
nate
4c36b3483c ts_sec -> tv_sec
ts_nsec -> tv_nsec
1996-09-20 04:24:31 +00:00
pst
ea1853644e rdisc functionality has been incorporated into routed
goodnight ugly prince...
1996-09-16 21:32:42 +00:00
wollman
2bff3824c7 Disable rdisc, enable routed in new location. 1996-09-16 17:08:23 +00:00
wollman
fcbb8bbde7 Change location of trace files and disable remote trace file change
feature.
1996-09-16 17:06:30 +00:00
wollman
8554e18558 Layer on FreeBSD local changes from old routed. 1996-09-16 17:04:22 +00:00
wollman
5ad8429e52 Virgin import of new BSD/SGI routed. This update contains a number
of important bug fixes.

Obtained from:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1996-09-16 16:51:32 +00:00
wollman
4ad3145a4e This commit was generated by cvs2svn to compensate for changes in r18316,
which included commits to RCS files with non-trunk default branches.
1996-09-16 16:51:32 +00:00
wollman
6970d7970e Virgin import of new BSD/SGI routed. This update contains a number
of important bug fixes.

Obtained from:	Vernon J. Schryver <vjs@mica.denver.sgi.com>
1996-09-16 16:51:32 +00:00
alex
51148e7d1f Note that -N is only effective when ipfw is displaying chain entries. 1996-09-15 00:08:30 +00:00
bde
6ed5ccfb8f Don't use __dead or __pure in user code. They were obfuscations
for gcc >= 2.5 and no-ops for gcc >= 2.6.  Converted to use __dead2
or __pure2 where it wasn't already done, except in math.h where use
of __pure was mostly wrong.
1996-09-14 03:00:32 +00:00
dg
e27a5690fe Added description of "noatime" option. 1996-09-08 13:28:12 +00:00
jkh
1cb64d5cca Make the noauto flag usable for swap devices too. Closes PR#1542
Submitted-By: David Leonard <d@scry.dstc.edu.au>
1996-09-06 06:01:05 +00:00
bde
11546f4616 Fixed DPADD. 1996-09-05 17:16:10 +00:00
dg
a078f218b5 Cast the partial result of an expression to an off_t to fix an overflow
in the calculation of free disk space. Fixes PR#1569.

Submitted by:	Tor Egge <Tor.Egge@idt.ntnu.no>
1996-09-05 08:08:41 +00:00
julian
4813de2fb3 Just realised the man page didn't mention the appletalk specific options
to ifconfig..
so I 've added them..
1996-09-04 20:21:47 +00:00
julian
d7d8eed5bb Get rid of an unexpectedly bogus sanity check under appletalk because
it stopped us from removing or setting loopback address
on lo0:

also make use of the fact the athe sockaddre_at struct now has a "netrange"
field.

CVS ----------------------------------------------------------------------
1996-09-04 19:41:31 +00:00
dg
2b8eb49135 Implemented user side of "noatime" mount option. This option disables
the file access time update on reads and can be useful in reducing
filesystem overhead in cases where the access time is not important (like
Usenet news spools).
1996-09-03 07:13:56 +00:00
peter
1238654310 Add ${DPADD}, $Id$ 1996-09-02 23:40:08 +00:00