Commit Graph

84 Commits

Author SHA1 Message Date
Matthew Dillon
091e0b14d5 Update mount_nfs documentation to reference new sysctl for -c default. 2003-01-27 20:12:32 +00:00
Maxime Henrion
fb624dbc80 Removed a debugging printf() left here in peter's
last commit.

Spotted by:	kris
2002-09-14 15:14:29 +00:00
Peter Wemm
4db5660477 Bandaid for mount_nfs segfaulting with the more obscure mount options
in /etc/fstab.  This isn't a real fix though and I'm still not sure
why it started failing.  mount(8) breaks up the nfs args into seperate
repeated '-o option=value' arguments.  But, the altflags variable that
we use to track things is incrementally built up each time we see the
next option and shows us the cumulative set of flags, not just the
flag that we are currently looking at.  As a result, the strstr hack
for looking up flags in a giant -o opt=val,opt=val, etc string was failing
and causing a segfault.  I do not know what changed recently that caused
this to suddenly break, but the code has been rather bogus for some time.
2002-09-06 19:59:29 +00:00
Ian Dowse
fd0b613a7b Unbreak the -c option by not using connect(2) for mount_nfs's
communication with the remote NFS server if this flag is specified.

PR:		bin/42003
Submitted by:	Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
2002-08-26 13:08:23 +00:00
Tom Rhodes
ce66ddb763 s/filesystem/file system/g as discussed on -developers 2002-08-21 18:11:48 +00:00
Semen Ustimenko
7ed000f774 Fix -o ac(reg|dir)(min|max) options. The appropriate flags weren't
translated from ALTF_* to NFSMNT_* thus these options weren't accepted
by kernel.

PR:		bin/30334
MFC after:	1 week
2002-08-06 20:26:30 +00:00
Maxime Henrion
526ba6d32b Now that the kernel is able to load modules itself,
remove all the code which was trying to do so.
This code was nasty in several ways, it was hiding
the kernel bug where the kernel was unable to properly
load a module, and it was quitting if it wasn't able
to load the module.  The consequence is that an ABI
breakage of the vfsconf API would have broken *every*
mount utility.
2002-08-03 16:03:21 +00:00
Matthew Dillon
3d8f797ac1 Convert old style (type foo *)0 casts to NULLs
PR:		kern/40360
Requested by:	Hiten PAndya via direct email
2002-07-11 17:54:58 +00:00
Philippe Charnier
e1205e80e5 The .Nm utility 2002-07-06 19:34:18 +00:00
Tom Rhodes
3468b317cb more file system > filesystem 2002-05-16 04:10:46 +00:00
Warner Losh
854299908c o __P removed
o main prototype removed
2002-03-21 13:14:21 +00:00
David E. O'Brien
3d438ad61f Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
 "register" -- just how many free registers do people think machines have?)
2002-03-20 17:55:10 +00:00
David E. O'Brien
2d68bf45bf Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
Alfred Perlstein
3fd0605ef0 note that 'nolockd' can't be used when updating mount flags 2001-11-12 02:43:56 +00:00
Alfred Perlstein
13190d8754 Allow users to use the 'nolockd' or -L options with mount_nfs in order
to avoid the need for rpc.lockd to perform client locks.  Using
this option a user can revert back to using local locks for NFS mounts
like we did before we had rpc.lockd.
2001-11-12 02:33:52 +00:00
Peter Wemm
9119623471 Userland part of nfs client/server split and cleanup. 2001-09-18 23:34:44 +00:00
Ruslan Ermilov
753d686d34 mdoc(7) police: s/BSD/.Bx/ where appropriate. 2001-08-14 10:01:54 +00:00
Ian Dowse
2bc53e1178 Change the foreground mount behaviour so that we keep retrying
forever by default. This matches what mount_nfs did before revision
1.40, and it is the generally expected behaviour for NFS mounts.

Document the current defaults near the start of the man page and
mention the options that can be used to change them.

Discussed on:	-hackers
2001-07-21 15:38:37 +00:00
Ian Dowse
e16873dad6 Since revision 1.40/1.41, the default behaviour for mount_nfs is
to give up after one attempt unless a background mount is requested.
Background mounts would retry 10000 times (at least 7 days) before
giving up.

For some situations such as diskless terminals, an NFS filesystem
may be critical to the boot process, so neither the "try once" nor
background mounts are appropiate. To cater for this situation,
unbreak the -R (retry count) parameter so that it also works in
the non-background case. Interpret a zero retry count as "retry
forever".

The defaults are now "try once" for non-background mounts and "retry
forever" for background mounts; both can be overridden via -R.
Add a description of this behaviour to the manpage.
2001-07-19 21:11:48 +00:00
Dima Dorfman
7ebcc426ef Remove whitespace at EOL. 2001-07-15 07:53:42 +00:00
Ruslan Ermilov
9fe48c6e8d mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
Ian Dowse
eca1c24e5a Use the new CLSET_CONNECT clnt_control() request on UDP clients to
ensure that we never proceed with the mount() syscall if the server
is replying from the wrong source address. Previously the userland
RPC call to the remote nfsd would succeed, but the kernel uses
connect() so it would not see the replies, resulting in a hung
mount.
2001-06-23 19:57:20 +00:00
Ian Dowse
4086cd0d7e Make it much more obvious that the use of NQNFS is discouraged (the
NQNFS code is ancient, bug-ridden, and should probably be removed).
The wording here was very confusing; it was easy to get the impression
that NQNFS is an extension to NFSv3 when in fact it just uses some
NFSv3-like extensions on top of NFSv2. As witnessed by the mailing
lists and PRs, some people were reading the description and deciding
that NQNFS was what they wanted to use.

MFC after:	1 week
2001-06-22 00:41:20 +00:00
Ian Dowse
a3d8f94bd4 - Split out the {family,socktype}->netid conversion into a separate
function; we now handle unknown protocols more gracefully.

- Cache the return from getnetconfigent() so that we don't have to
  remember to call freenetconfigent() each time. This fixes a memory
  leak that would cause retrying background mount_nfs processes to
  slowly increase their memory usage.
2001-05-13 00:07:03 +00:00
Ian Dowse
ba33efd92c Fix a typo relating to the "-U" (force UDP for mount protocol)
option. When specified, make sure to use the correct netid for the
getnetconfigent() call, and also in error messages.
2001-04-11 00:21:16 +00:00
Ian Dowse
317d5933d4 Split out all the RPC code into a separate function and address a
number of issues:

- Fix background mounts; these were broken in revision 1.40.
- Don't give up before trying all addresses returned by getaddrinfo().
- Use protocol-independent routines where possible.
- Improve error reporting for RPC errors.
- In non-background mode, give up after trying all protocols once.
- Use daemon(3) instead of rolling our own version.
- Never go ahead with the mount() syscall until we have received
  a reply from the remote nfsd; this is especially important with
  non-interruptible mounts, as otherwise a mistyped command might
  require a reboot to correct.

Reviewed by:	alfred, Martin Blapp <mb@imp.ch>
2001-04-10 22:05:47 +00:00
Andrey A. Chernov
deffdffafa - Back out the last (wrong) commit, and readd a modified version
of pingnfsserver(). The pingnfsport() function is now called everytime.
  If we don't get RPC_SUCCESS or RPC_PROGVERSMISMATCH back, there's
  something wrong with the NFS server and we just exit.

- Fix cfs mount on IPv4-only machines

- Fixed the looping when we did not run background mode.

- Fixed a getnameinfo() call with uninitialized adress.
  This is a NetBSD bug I didn't notified :-( Thanks Ian !

- Added some #ifdef NFSKERB

- Removed some unused variables.

- Fixed idention

- Remove unnecessary ":" in openlog ident

Submitted by:	Martin Blapp <mb@imp.ch>
Reviewed by:	Ian Dowse <iedowse@maths.tcd.ie>
2001-03-31 20:45:21 +00:00
Ruslan Ermilov
0a5779d45b - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
Alfred Perlstein
12d6e650c6 fix -o port=xxx 2001-03-25 19:18:43 +00:00
Ruslan Ermilov
fe655281c5 Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
Alfred Perlstein
8360efbd6c Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) and
associated changes that had to happen to make this possible as well as
bugs fixed along the way.

  Bring in required TLI library routines to support this.

  Since we don't support TLI we've essentially copied what NetBSD
  has done, adding a thin layer to emulate direct the TLI calls
  into BSD socket calls.

  This is mostly from Sun's tirpc release that was made in 1994,
  however some fixes were backported from the 1999 release (supposedly
  only made available after this porting effort was underway).

  The submitter has agreed to continue on and bring us up to the
  1999 release.

  Several key features are introduced with this update:
    Client calls are thread safe. (1999 code has server side thread
    safe)
    Updated, a more modern interface.

  Many userland updates were done to bring the code up to par with
  the recent RPC API.

  There is an update to the pthreads library, a function
  pthread_main_np() was added to emulate a function of Sun's threads
  library.

  While we're at it, bring in NetBSD's lockd, it's been far too
  long of a wait.

  New rpcbind(8) replaces portmap(8) (supporting communication over
  an authenticated Unix-domain socket, and by default only allowing
  set and unset requests over that channel). It's much more secure
  than the old portmapper.

  Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded
  to support TI-RPC and to support IPV6.

  Umount(8) is also fixed to unmount pathnames longer than 80 chars,
  which are currently truncated by the Kernel statfs structure.

Submitted by: Martin Blapp <mb@imp.ch>
Manpage review: ru
Secure RPC implemented by: wpaul
2001-03-19 12:50:13 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Ruslan Ermilov
7c7fb079b9 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
Sheldon Hearn
acaf1e1fc5 Explain why adding ``options NFSKERB'' breaks the kernel build.
PR:		10642
Reported by:	Stefan Eggers <seggers@semyam.dinoco.de>
Submitted by:	johan
2000-08-11 13:03:13 +00:00
Sheldon Hearn
893d2b85cd Cross-reference mount_nfs(8) and showmount(8).
PR:		20008
Reported by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2000-07-18 17:34:23 +00:00
Sheldon Hearn
ffc717e235 Order the cross-references in the SEE ALSO section, in preparation
for PR 20008.
2000-07-18 17:31:00 +00:00
Matthew Dillon
9c41fc0919 Fix memory leak in mount_nfs's background (-b) mode which occurs when
the mount is not available.

Submitted-by: Jonathan Hanna <pangolin@home.com>
2000-06-11 05:19:58 +00:00
Sheldon Hearn
4e86fcacf6 Remove more single-space hard sentence breaks. 2000-03-02 14:54:02 +00:00
Sheldon Hearn
ef8f7ac935 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 11:27:47 +00:00
Mark Murray
f499a39621 Use libcrypto instead of libdes. 2000-02-24 21:01:54 +00:00
Bruce Evans
3306ebd1a5 Changed setflags() to set_flags(). This fixes part of the world breakage
due to recently incremented namespace pollution in <unistd.h>.
2000-01-28 12:44:50 +00:00
Matthew Dillon
2a2d4405a2 Thresh-out the nfs manual page references a bit
Reviewed by: Julian Elischer <julian@elischer.org>
2000-01-13 21:47:21 +00:00
Matthew Dillon
a69497d73f Finish up umntall support. init now passed an argument to the
rundown script 'reboot' or 'single'.  ISO support (which never
    worked) has been removed from mount_nfs.  mount_nfs and umount
    now use mounttab, which allows umntall to work properly.  The
    rc scripts now call umntall as appropriate.

Submitted by:	Martin Blapp <mb@imp.ch>
1999-11-22 04:23:11 +00:00
Brian Feldman
66a84ea766 Fix an overflow or two and replace a while with a for.
Submitted by:	Martin Blapp <mbr@imp.ch>
1999-10-30 17:56:47 +00:00
Poul-Henning Kamp
73dd316734 mount* fixes from Martin Blapp <mb@imp.ch>:
Made mount more userfriendly (bad slashes are now filtered out)
        and we remove in mount_nfs trailing slashes if there are any.

        Fixed mount_xxx binarys to resolve with realpath(3)
        the mountpoint.

        Translate the deprecated nfs-syntax with '@' to ':' .
        The ':' syntax has now precedence, but '@' still works.
        Notify the user that the '@' syntax should not be used.

PR: 7846
PR: 13692
Submitted by:   Martin Blapp <mb@imp.ch>
Reviewed by:    phk
1999-10-09 11:54:14 +00:00
Nick Hibma
ae0c2c7836 Fix -Wall warnings
Submitted-By:  Martin Blapp <mblapp@kassiopeja.lan.attic.ch>
1999-10-08 19:56:45 +00:00
Matthew Dillon
fa9f8da4d2 Print a warning that includes the mount source when the foreground
mount fails prior to going into the background when a background NFS
    mount is requested.

PR:		misc/12376
1999-10-02 19:42:46 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Philippe Charnier
46fc8f78df Sync usage string and man page. Correct use of .Nm. Spelling. Remove
unused #includes.
1998-07-06 07:15:53 +00:00
Joseph Koshy
a34f78d134 Fix bogon in man page. "-o conn" actually turns off NFSMNT_NOCONN as it is
a "negative" option.  This makes it equivalent to /not/ specifying "-c".
The compile time default is /not/ to have the NFSMNT_NOCONN flag set, so
"-o conn" should never be needed---truly a deprecated option :-).

PR: 6905.
1998-06-29 06:58:46 +00:00