summaryrefslogtreecommitdiffstats
path: root/sbin/mount_nfs
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix parsing of acregmin, acregmax, acdirmin and acdirmax NFS mount optionsrodrigc2009-01-281-4/+4
| | | | | | when passed as strings via nmount(). Submitted by: Jaakko Heinonen <jh saunalahti fi>
* Implement support for RPCSEC_GSS authentication to both the NFS clientdfr2008-11-031-1/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and server. This replaces the RPC implementation of the NFS client and server with the newer RPC implementation originally developed (actually ported from the userland sunrpc code) to support the NFS Lock Manager. I have tested this code extensively and I believe it is stable and that performance is at least equal to the legacy RPC implementation. The NFS code currently contains support for both the new RPC implementation and the older legacy implementation inherited from the original NFS codebase. The default is to use the new implementation - add the NFS_LEGACYRPC option to fall back to the old code. When I merge this support back to RELENG_7, I will probably change this so that users have to 'opt in' to get the new code. To use RPCSEC_GSS on either client or server, you must build a kernel which includes the KGSSAPI option and the crypto device. On the userland side, you must build at least a new libc, mountd, mount_nfs and gssd. You must install new versions of /etc/rc.d/gssd and /etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf. As long as gssd is running, you should be able to mount an NFS filesystem from a server that requires RPCSEC_GSS authentication. The mount itself can happen without any kerberos credentials but all access to the filesystem will be denied unless the accessing user has a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There is currently no support for situations where the ticket file is in a different place, such as when the user logged in via SSH and has delegated credentials from that login. This restriction is also present in Solaris and Linux. In theory, we could improve this in future, possibly using Brooks Davis' implementation of variant symlinks. Supporting RPCSEC_GSS on a server is nearly as simple. You must create service creds for the server in the form 'nfs/<fqdn>@<REALM>' and install them in /etc/krb5.keytab. The standard heimdal utility ktutil makes this fairly easy. After the service creds have been created, you can add a '-sec=krb5' option to /etc/exports and restart both mountd and nfsd. The only other difference an administrator should notice is that nfsd doesn't fork to create service threads any more. In normal operation, there will be two nfsd processes, one in userland waiting for TCP connections and one in the kernel handling requests. The latter process will create as many kthreads as required - these should be visible via 'top -H'. The code has some support for varying the number of service threads according to load but initially at least, nfsd uses a fixed number of threads according to the value supplied to its '-n' option. Sponsored by: Isilon Systems MFC after: 1 month
* Use the version of the kernel returned by getosreldate()rodrigc2008-09-191-6/+16
| | | | | | | to determine whether to call the fallback_mount() backwards compatibility function or not. Reviewed by: dfr
* Instead of building up a "struct nfs_args" to pass to the kernelrodrigc2008-09-132-473/+622
| | | | | | | | | | | | | | | via nmount(), build up an iovec where each iovec member is an NFS mount option, and pass the iovec down to the kernel via nmount(). These options are then parsed in the kernel. This should make it easier to add new NFS mount options in future. Many, many thanks to Doug Rabson for taking my initial patches, and cleaning them up. In addition, Doug added a fallback_mount() function so that the newer mount_nfs program will work against older kernels, to facilitate upgrading/downgrading scenarios. Doug also re-wrote the mount_nfs.8 man page. Reviewed by: dfr
* Fix -o mntudp after the conversion to default TCP mountskris2008-07-101-1/+4
| | | | | Submitted by: danfe MFC after: 1 week
* Undo the damage I did in sys/kern/vfs_mount.c #1.274 andyar2008-02-181-9/+0
| | | | | | | sbin/mount_nfs/mount_nfs.c #1.76. Let the dragons sleep. Requested by: rodrigc, des PR: kern/120319 (welcome the bug back)
* Add a work-around to make it possible again to remountyar2008-02-181-0/+9
| | | | | | | | | | | NFS root r/w. The real solution would be to bring the whole nmount(2) framework, including FS drivers and userland tools, into a consistent state at last; but things should work in the meantime, too. Reported by: kris
* Back out rev. 1.74 because the kernel isn't ready yetyar2008-02-181-8/+1
| | | | to see NFS specific string options.
* Don't forget to prepare string options for nmount(2).yar2008-02-181-1/+8
| | | | | | | Otherwise things won't work as intended, e.g., it'll be impossible to upgrade NFS root mount to read-write. Reported by: kris
* Add the -4 option to the synopsis.ceri2008-02-121-1/+1
|
* Bump .Dd for r1.48.ceri2008-02-121-1/+1
|
* Switch the default NFS mount mode from UDP to TCP. UDP mounts are akris2008-02-112-6/+6
| | | | | | | | | | historical relic, and are no longer appropriate for either LAN or WAN mounting. At modern (gigabit and 10 gigabit) LAN speeds packet loss from socket buffer fill events is common, and sequence numbers wrap quickly enough that data corruption is possible. TCP solves both of these problems without imposing significant overhead. MFC after: 1 month
* Add "fg" option as antonym to "bg"; add "hard" option as antonym to "soft".thomas2007-03-052-0/+8
| | | | | | | | This is for better compatibility with other environments (Linux, Solaris, HP-UX, AIX and Tru64 support these options). PR: bin/109924 MFC after: 1 week
* Link mount_nfs -> mount_nfs4, and mount_nfs.8 -> mount_nfs4.8.rodrigc2007-01-231-0/+3
| | | | Suggested by: rees
* Merge mount_nfs4.c and mount_nfs.c into one program.rodrigc2007-01-232-7/+248
| | | | | | | | | | | If argv[0] == "mount_nfs4", then default to mounting NFSv4, otherwise if argv[0] == "mount_nfs", default to the old mount_nfs behavior. - Add a -4 option. - Add the University of Michigan copyright from mount_nfs4.c, for the code merged from mount_nfs4.c. Reviewed by: rees
* Pass a string buffer named "errmsg" to nmount().rodrigc2006-11-291-2/+4
| | | | | | | | This will allow the NFS mount code to return a string error message in addition to returning an error integer value. Reviewed by: mohans MFC after: 1 month
* Deduce the "fstype" parameter to pass to nmount() by looking atrodrigc2006-11-291-2/+8
| | | | | | | | the "_nfs" part of argv[0]. This should facilitate unifying mount_nfs and mount_nfs4 into one binary. MFC after: 1 month Reviewed by: mohans
* Increase WARNS to 3.rodrigc2006-11-211-1/+1
|
* Fix last element of nc_protos[] array to appease GCC.rodrigc2006-11-211-1/+1
|
* Convert mount_nfs from old mount(2) API to new nmount(2) API.rodrigc2006-11-211-1/+11
| | | | Reviewed by: mohans
* Properly separate sentences by adding a semi-colon.trhodes2006-10-071-1/+1
| | | | Hinted by: bmah
* Minor style(9) and KNF elimination as I prepare to fix a bug.imp2006-03-201-14/+8
|
* Kill the BUGS section, and remove a similar line noted under -T. As fartrhodes2005-12-251-14/+3
| | | | | | | as I know, Sun's NFS support works with TCP just fine. This is even hinted at in the PR. PR: 71782
* Use MOPT_END in favor of MOPT_NULL, which better describes the purporsedelphij2005-06-101-1/+1
| | | | of the macro.
* Add a handy macro to represent null mount option, MOPT_NULL, and makedelphij2005-06-011-1/+1
| | | | | | | | | | | | | | | | | | | use of the macro in sbin/mount*'s, by replacing: mopts[] = { MOPT_STDOPTS, { NULL } } With: mopts[] = { MOPT_STDOPTS, MOPT_NULL } This change will help to reduce the situation that we don't explicitly initialize "struct mntopt"'s. It should not contribute to any functional/logical changes as far as I can tell.
* Sync program's usage() with manpage's SYNOPSIS.ru2005-02-102-9/+9
|
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+1
|
* Remove advertising clause from University of California Regent's license,markm2004-04-092-8/+0
| | | | | | per letter dated July 22, 1999. Approved by: core, imp
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* mdoc(7): There cannot be a subsection inside a list.ru2003-09-101-2/+4
| | | | Reported by: naddy
* mdoc(7) markup overhaul.ru2003-05-171-43/+55
|
* Remove -p from getopt args.trhodes2003-05-121-1/+1
| | | | | | | PR: 37221 Submitted by: Joshua Goodall <joshua@roughtrade.net> Reviewed by: rwatson Approved by: re (jhb)
* Remove remnants of the -p option. While I'm here, remove wording abouttrhodes2003-05-111-6/+0
| | | | | | | | -P which could be interpreted as 'this option must be specified'. PR: 37221 && 51886 Discussed with: bmah Approved by: re (blanket)
* Use __FBSDID() to quiet GCC 3.3 warnings.obrien2003-05-031-4/+4
|
* Add mount options 'noinet4' and 'noinet6' which prevent using thosemdodd2003-03-252-0/+20
| | | | | | | address families. This is useful for preventing NFS mounts from using IPv6 on hosts that have both A and AAAA records for the same name.
* - Silence warnings (casting, implicit decl., unused var.).mdodd2003-03-252-4/+7
| | | | - WARNS=2
* Update mount_nfs documentation to reference new sysctl for -c default.dillon2003-01-271-2/+6
|
* Removed a debugging printf() left here in peter'smux2002-09-141-1/+0
| | | | | | last commit. Spotted by: kris
* Bandaid for mount_nfs segfaulting with the more obscure mount optionspeter2002-09-061-22/+34
| | | | | | | | | | | | 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.
* Unbreak the -c option by not using connect(2) for mount_nfs'siedowse2002-08-261-1/+2
| | | | | | | communication with the remote NFS server if this flag is specified. PR: bin/42003 Submitted by: Jean-Luc Richier <Jean-Luc.Richier@imag.fr>
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-212-12/+12
|
* Fix -o ac(reg|dir)(min|max) options. The appropriate flags weren'tsemenu2002-08-061-0/+4
| | | | | | | | translated from ALTF_* to NFSMNT_* thus these options weren't accepted by kernel. PR: bin/30334 MFC after: 1 week
* Now that the kernel is able to load modules itself,mux2002-08-031-13/+1
| | | | | | | | | | 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.
* Convert old style (type foo *)0 casts to NULLsdillon2002-07-111-3/+3
| | | | | PR: kern/40360 Requested by: Hiten PAndya via direct email
* The .Nm utilitycharnier2002-07-061-2/+1
|
* more file system > filesystemtrhodes2002-05-161-6/+6
|
* o __P removedimp2002-03-211-5/+5
| | | | o main prototype removed
* Remove 'register' keyword.obrien2002-03-201-4/+4
| | | | | | 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?)
* Default to WARNS=2.obrien2001-12-041-0/+2
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* note that 'nolockd' can't be used when updating mount flagsalfred2001-11-121-0/+3
|
OpenPOWER on IntegriCloud