aboutsummaryrefslogtreecommitdiff
path: root/sbin/mount_nfs
Commit message (Collapse)AuthorAgeFilesLines
* - Split out the {family,socktype}->netid conversion into a separateIan Dowse2001-05-131-11/+79
| | | | | | | | | | | | 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. Notes: svn path=/head/; revision=76530
* Fix a typo relating to the "-U" (force UDP for mount protocol)Ian Dowse2001-04-111-6/+7
| | | | | | | | option. When specified, make sure to use the correct netid for the getnetconfigent() call, and also in error messages. Notes: svn path=/head/; revision=75401
* Split out all the RPC code into a separate function and address aIan Dowse2001-04-101-233/+275
| | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=75394
* - Back out the last (wrong) commit, and readd a modified versionAndrey A. Chernov2001-03-311-84/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=75046
* - Backout botched attempt to introduce MANSECT feature.Ruslan Ermilov2001-03-261-0/+1
| | | | | | | - MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74815
* fix -o port=xxxAlfred Perlstein2001-03-251-5/+8
| | | | Notes: svn path=/head/; revision=74790
* Set the default manual section for sbin/ to 8.Ruslan Ermilov2001-03-201-1/+0
| | | | Notes: svn path=/head/; revision=74531
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andAlfred Perlstein2001-03-191-159/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=74462
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-4/+5
| | | | Notes: svn path=/head/; revision=71895
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-2/+2
| | | | Notes: svn path=/head/; revision=68960
* Explain why adding ``options NFSKERB'' breaks the kernel build.Sheldon Hearn2000-08-111-0/+3
| | | | | | | | | PR: 10642 Reported by: Stefan Eggers <seggers@semyam.dinoco.de> Submitted by: johan Notes: svn path=/head/; revision=64542
* Cross-reference mount_nfs(8) and showmount(8).Sheldon Hearn2000-07-181-1/+2
| | | | | | | | PR: 20008 Reported by: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> Notes: svn path=/head/; revision=63439
* Order the cross-references in the SEE ALSO section, in preparationSheldon Hearn2000-07-181-2/+2
| | | | | | | for PR 20008. Notes: svn path=/head/; revision=63438
* Fix memory leak in mount_nfs's background (-b) mode which occurs whenMatthew Dillon2000-06-111-2/+3
| | | | | | | | | the mount is not available. Submitted-by: Jonathan Hanna <pangolin@home.com> Notes: svn path=/head/; revision=61536
* Remove more single-space hard sentence breaks.Sheldon Hearn2000-03-021-1/+2
| | | | Notes: svn path=/head/; revision=57695
* Remove single-space hard sentence breaks. These degrade the qualitySheldon Hearn2000-03-011-3/+6
| | | | | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc. Notes: svn path=/head/; revision=57668
* Use libcrypto instead of libdes.Mark Murray2000-02-241-2/+2
| | | | Notes: svn path=/head/; revision=57449
* Changed setflags() to set_flags(). This fixes part of the world breakageBruce Evans2000-01-281-3/+3
| | | | | | | due to recently incremented namespace pollution in <unistd.h>. Notes: svn path=/head/; revision=56740
* Thresh-out the nfs manual page references a bitMatthew Dillon2000-01-131-1/+3
| | | | | | | Reviewed by: Julian Elischer <julian@elischer.org> Notes: svn path=/head/; revision=55937
* Finish up umntall support. init now passed an argument to theMatthew Dillon1999-11-222-63/+12
| | | | | | | | | | | | 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> Notes: svn path=/head/; revision=53550
* Fix an overflow or two and replace a while with a for.Brian Feldman1999-10-301-9/+11
| | | | | | | Submitted by: Martin Blapp <mbr@imp.ch> Notes: svn path=/head/; revision=52679
* mount* fixes from Martin Blapp <mb@imp.ch>:Poul-Henning Kamp1999-10-091-13/+40
| | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=52055
* Fix -Wall warningsNick Hibma1999-10-081-1/+1
| | | | | | | Submitted-By: Martin Blapp <mblapp@kassiopeja.lan.attic.ch> Notes: svn path=/head/; revision=52037
* Print a warning that includes the mount source when the foregroundMatthew Dillon1999-10-021-0/+1
| | | | | | | | | | mount fails prior to going into the background when a background NFS mount is requested. PR: misc/12376 Notes: svn path=/head/; revision=51873
* $Id$ -> $FreeBSD$Peter Wemm1999-08-282-2/+2
| | | | Notes: svn path=/head/; revision=50476
* Sync usage string and man page. Correct use of .Nm. Spelling. RemovePhilippe Charnier1998-07-062-23/+19
| | | | | | | unused #includes. Notes: svn path=/head/; revision=37427
* Fix bogon in man page. "-o conn" actually turns off NFSMNT_NOCONN as it isJoseph Koshy1998-06-291-2/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=37253
* Support changing the attribute cache limits per-mount. We don't havePeter Wemm1998-05-192-2/+38
| | | | | | | | many option letters left, I used long names only (like the previous port= option) Notes: svn path=/head/; revision=36178
* Mention the 2GB NFS v2 filesize limit.Peter Wemm1998-05-011-2/+3
| | | | | | | | PR: 6335 Submitted by: tom@sdf.com Notes: svn path=/head/; revision=35583
* Don't define KERNEL before including <nfs/nfs.h>. It is no longerBruce Evans1998-02-011-3/+1
| | | | | | | | necessary. This fixes warnings about missing forward declarations for structs in kernel-only prototypes. Notes: svn path=/head/; revision=32999
* Removed definition of _NEW_VFSCONF. The new vfsconf interface is nowBruce Evans1998-01-201-1/+0
| | | | | | | the default. Notes: svn path=/head/; revision=32645
* style(9) correctionsWarner Losh1997-12-261-3/+5
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=32008
* Be extra paranoid about trusting the length returned by gethostbyaddr.Warner Losh1997-12-241-3/+3
| | | | | | | Submitted by: Julian Assange Notes: svn path=/head/; revision=31955
* Introduce a -N option that disables the use of reserved ports, nowJoerg Wunsch1997-10-192-5/+14
| | | | | | | | | | that -P is on by default. Remove do-nothing code in the -P case (but leave the option itself for backward compatibility). PR: bin/4500 Notes: svn path=/head/; revision=30580
* Allow the 'async' mount flag.Doug Rabson1997-06-031-1/+2
| | | | Notes: svn path=/head/; revision=26417
* Test both the NFS and MOUNT protocols for v3 support before allowing a v3Doug Rabson1997-05-011-1/+61
| | | | | | | | | | 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> Notes: svn path=/head/; revision=25348
* Use v3 protocol by default if it is supported by the server. Allow theDoug Rabson1997-04-182-11/+49
| | | | | | | | | user to force v2 protocol even if the server supports v3. Obtained from: NetBSD but with a slightly different implementation Notes: svn path=/head/; revision=25004
* Make "-o noxxx" work properly, allowing the user to clean e.g. the resvportDoug Rabson1997-04-021-22/+47
| | | | | | | flag (which is now set by default). Notes: svn path=/head/; revision=24546
* Make mount_nfs use reserved ports by default.. Mounts already useGuido van Rooij1997-04-011-2/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=24495
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24359
* Merge from Lite2 (use new getvfsbyname() and mount(2) interface)Peter Wemm1997-03-113-46/+37
| | | | Notes: svn path=/head/; revision=23680
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-222-2/+2
| | | | Notes: svn path=/head/; revision=22990
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-142-2/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Mention the historic mount options, as `deprecated'.Joerg Wunsch1996-10-221-0/+49
| | | | | | | Closes PR # docs/735. Notes: svn path=/head/; revision=19112
* Don't use __dead or __pure in user code. They were obfuscationsBruce Evans1996-09-141-3/+3
| | | | | | | | | 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. Notes: svn path=/head/; revision=18286
* Get rid of the last vestiges of the old MOUNT_* constants in theGarrett Wollman1996-05-131-2/+9
| | | | | | | | | | | | mount_* programs. While we're at it, collapse the four now-identical mount programs for devfs, fdesc, kernfs, and procfs into links to a new mount_std(8) which can mount any really generic filesystem such as these when called with the appropriate argv[0]. Also, convert the mount programs to use sysexits.h. Notes: svn path=/head/; revision=15770
* #include <kerberosIV/des.h> -> #include <des.h>Mark Murray1996-02-111-1/+1
| | | | Notes: svn path=/head/; revision=14024
* Fix a bunch of spelling errors.Mike Pritchard1996-01-291-2/+2
| | | | Notes: svn path=/head/; revision=13720
* Changes to support version 3 of the NFS protocol.Doug Rabson1995-06-272-97/+259
| | | | | | | | | | | | | | | | | | | | | The version 2 support has been tested (client+server) against FreeBSD-2.0, IRIX 5.3 and FreeBSD-current (using a loopback mount). The version 2 support is stable AFAIK. The version 3 support has been tested with a loopback mount and minimally against an IRIX 5.3 server. It needs more testing and may have problems. I have patched amd to support the new variable length filehandles although it will still only use version 2 of the protocol. Before booting a kernel with these changes, nfs clients will need to at least build and install /usr/sbin/mount_nfs. Servers will need to build and install /usr/sbin/mountd. NFS diskless support is untested. Obtained from: Rick Macklem <rick@snowhite.cis.uoguelph.ca> Notes: svn path=/head/; revision=9336
* Added -o port option. Use specified port number for NFS requests. The defaultKarl Strickland1995-06-142-1/+13
| | | | | | | is to query the portmapper for the NFS port. This is useful for CFS users. Notes: svn path=/head/; revision=9230