Commit Graph

1001 Commits

Author SHA1 Message Date
Peter Wemm
eca42d3ce0 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
Doug Rabson
a79fe60755 Add utilities for the kernel linker. 1997-05-07 18:19:54 +00:00
Peter Wemm
9c3b235f46 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 Wunsch
ee359f4838 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 Eklund
b5aa560439 Fix typo.
PR:		Closes PR docs/3488
Submitted by:	k-horik@yk.rim.or.jp
1997-05-04 20:04:59 +00:00
Peter Wemm
9906480a84 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 Wemm
4edfe6b992 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 Wemm
ed055a8342 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 Wemm
fa738d1534 force null commit to skip over rev 1.25 so there's less cvs trouble 1997-05-04 06:00:27 +00:00
Peter Wemm
b5436146c9 Grab some of the NetBSD text for describing the new options and the
media commands.
1997-05-03 23:03:56 +00:00
Warner Losh
e37a137d7a 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
Doug Rabson
86dd941a5c 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
Paul Traina
0f4b7baa2d 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
Mike Smith
0a9bd6b010 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
Garrett Wollman
55e923b615 Document -k flag here, too. 1997-04-29 17:48:58 +00:00
Garrett Wollman
1982ee69fd 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 Wunsch
d6ef03d3fa 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
Doug Rabson
a0bc68a48e Don't try to look up unionfs' <above>, <below> keywords as hostnames. 1997-04-29 09:10:11 +00:00
Doug Rabson
64a094f9de 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
Andrey A. Chernov
7c506958f1 Change vfork to fork, too many memory-clobbering actions present in child 1997-04-23 23:04:58 +00:00
Mike Smith
590ef650e0 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
Daniel O'Callaghan
ed4d0b8acd Spelling police. 1997-04-23 04:46:38 +00:00
Doug Rabson
2a66cfc532 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
Doug Rabson
2cd1c32cf8 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
Daniel O'Callaghan
12d247a783 Fix typo: "oder" -> "order". 1997-04-16 09:56:30 +00:00
Joerg Wunsch
36b8baa315 Implement a -r option to fsdb(8), ``read/only''. 1997-04-15 09:02:48 +00:00
Guido van Rooij
84ca4b2a79 Oops...now really commit the doc change. 1997-04-09 20:25:43 +00:00
Guido van Rooij
c6e5e15858 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
Poul-Henning Kamp
71044fa7ab Allow "modern" syntax:
route add -net 192.168.64.0/20 bla bla bla
1997-04-02 17:05:30 +00:00
Poul-Henning Kamp
8fd0ef3952 unifdef CCITT, ISO & CRUFT. 1997-04-02 16:52:45 +00:00
Doug Rabson
b91ea324e7 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
Mike Pritchard
7966553397 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 van Rooij
d5e1fb3173 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
Bruce Evans
1f45d4d4eb 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
Bruce Evans
a52432a3c6 Fixed missing DPADD. Removed now-redundant SRCS. 1997-04-01 07:43:14 +00:00
Brian Somers
687d0cdeb3 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 Wemm
4af9705ceb 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
Warner Losh
6c3f552a31 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 Somers
568b59b9df Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
Poul-Henning Kamp
a6534afb2a Fix mount call for devfs.
Submitted by:	bde
1997-03-30 09:22:41 +00:00
Warner Losh
8d64695c7c 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 Wemm
19e1457bc5 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 van Rooij
394da4c167 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
Mike Pritchard
f55f3f4693 Update HISTORY to reflect that this will first appear in 2.2.5. 1997-03-27 18:47:05 +00:00
Mike Pritchard
dd99c4291c Typo fix (now how did that one get by me :-).
Submitted by:	Philippe Charnier
1997-03-27 00:27:50 +00:00
Guido van Rooij
e2bb969ac3 Get rid of __progname. I thought I already did that... 1997-03-26 19:07:54 +00:00
Mike Pritchard
e71e7150fd Typo police. Also update HISTORY to reflect when this first appeared
in FreeBSD.
1997-03-24 20:50:57 +00:00
Andrey A. Chernov
c59856210e Include missing <time.h>
Add missing RNG initialization
Use srandomdev() for RNG initialization
1997-03-24 15:51:11 +00:00
Andrey A. Chernov
cb78754c12 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
Warner Losh
94cf2e751d Fix small race window when creating portal socket.
Obtained from: OpenBSD
1997-03-24 05:53:12 +00:00
Warner Losh
722ceb3f84 Use mkstemp rather than mktemp to prevent a small race.
Obtained from: OpenBSD
1997-03-24 05:44:28 +00:00
Bruce Evans
9505c10438 Reactivated dumplfs and newlfs. 1997-03-24 04:57:50 +00:00
Bruce Evans
76cedae52d Changed MAN to MAN8 so that this builds. 1997-03-24 03:38:16 +00:00
Guido van Rooij
8f89943eda 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
Mike Pritchard
d92630300f Mdoc cleanup. 1997-03-19 22:42:02 +00:00
Peter Wemm
10e1c2d28a 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 Wemm
e3bed33cc9 Restore check for ridiculous directory sizes. 1997-03-18 19:53:54 +00:00
Peter Wemm
e457979c0d 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 Wemm
79aed3fe40 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
Bruce Evans
962cf4d335 Fixed bogus casts from (int32_t *) to (time_t *). 1997-03-13 17:56:25 +00:00
Peter Wemm
32f189ac7d 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 Wemm
01b21ff640 Reactivate fsdb 1997-03-13 12:46:17 +00:00
Peter Wemm
fd24d57d05 Missing $Id$ 1997-03-13 12:44:53 +00:00
Peter Wemm
76863c5104 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
Bruce Evans
0622cc3837 Fixed checking for a non-numeric minor number. 1997-03-12 19:03:40 +00:00
Joerg Wunsch
d048f017ad Record num_eisa_slots if it could be found in the kernel. 1997-03-12 18:54:52 +00:00
Bruce Evans
74cf460b66 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
Bruce Evans
51a5cf9064 Finished (?) merging with Lite2: cleaned up #include mess. 1997-03-12 17:01:11 +00:00
Bruce Evans
bb19997c02 Finished (?) merging with Lite2: cleaned up #include mess.
Fixed style bugs in FreeBSD changes.
1997-03-12 16:58:35 +00:00
Bruce Evans
a2c6443276 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
Bruce Evans
04aba25407 Finished (?) merging with Lite2: cleaned up #include mess.
Fixed misformatting in a comment.
1997-03-12 16:49:28 +00:00
Bruce Evans
473e3a9ab9 Finished (?) merging with Lite2: cleaned up #include mess.
Updated getopt() usage.
1997-03-12 16:46:32 +00:00
Bruce Evans
d97b1da168 Restored lost reference to fsdb(8).
Fixed weird quoting of $Id$.
1997-03-12 16:35:26 +00:00
Mike Pritchard
42deda5d1a Add cvs Id. 1997-03-12 15:08:06 +00:00
Mike Pritchard
6bae29046e Some minor mdoc cleanup. Partially based on PR# 2959. 1997-03-12 13:22:17 +00:00
Peter Wemm
d87d79aefe 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 Wemm
08966bd5fd Merge from Lite2 (use new getvfsbyname() interface) 1997-03-11 12:51:00 +00:00
Peter Wemm
73421c42fb Merge from Lite2 (but does not work) 1997-03-11 12:49:29 +00:00
Peter Wemm
75e2941193 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 Wemm
87564113d7 Merge from Lite2 (use new getvfsbyname() and mount(2) interface, cleanup) 1997-03-11 12:43:45 +00:00
Peter Wemm
4a4c52857e Merge from Lite2 (use new getvfsbyname() and mount(2) interface) 1997-03-11 12:40:45 +00:00
Peter Wemm
b94d6bf4d7 Update to compile under Lite2 1997-03-11 12:38:16 +00:00
Peter Wemm
c06fe0a05e 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 Wemm
e7b6972097 Compile under Lite2 (unistd.h has proto for getopt) 1997-03-11 12:24:00 +00:00
Peter Wemm
b4f70931e0 Compile under Lite2 (getopt() is in unistd.h etc) 1997-03-11 12:23:09 +00:00
Peter Wemm
780a5c1ec1 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 Wemm
82b49328cd Merge from Lite2 (does not work though) 1997-03-11 12:14:07 +00:00
Peter Wemm
9d1741b9da Merge from Lite2 1997-03-11 12:12:26 +00:00
Peter Wemm
a37c38b8d8 Merge Lite2 changes (rather bigish, the dump/restore folks should check) 1997-03-11 12:09:50 +00:00
Peter Wemm
33aa65742b 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 Wemm
39e5614a71 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
Peter Wemm
1811bdf372 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
Bruce Evans
92e2d9bed5 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
Bruce Evans
2822751af3 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
Bruce Evans
a92d3ad246 Attempt to import Lite2's mount. 1997-03-05 17:51:21 +00:00
Bruce Evans
423f22330a Force null termination after 2 errant strncpy()s. 1997-03-05 12:08:44 +00:00
Warner Losh
624ff93821 Fix typo introduced in 1.17.
Submitted by:	"Philippe Charnier" <charnier@xp11.frmug.org>
1997-03-04 22:05:49 +00:00
Bruce Evans
8f86703906 Updated mount_msdos to use the Lite2 getvfsbyname() interface. 1997-03-03 13:23:54 +00:00
Warner Losh
1ffae4a6dd 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
Mike Pritchard
940783df47 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