Commit Graph

1003 Commits

Author SHA1 Message Date
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
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
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
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