summaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* Currently the "-s" option is ignored by the text-based mount interface. ToChuck Lever2008-07-151-0/+15
| | | | | | | | | | | | notify the kernel that sloppy mount option parsing is needed, add "sloppy" to the string of mount options passed to the kernel. The 2.6.23 - 2.6.26 kernels will fail the mount if "sloppy" is present, as they won't recognize it. To prevent them from ever seeing this option, have the mount command check the kernel version before appending the option. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Clean up: add the traditional pre-processor safety check in headers underChuck Lever2008-07-158-10/+34
| | | | | | | | | | utils/mount to prevent them from being included multiple times. For headers that already have this, use a more unique macro name to reduce the probability that some other header may use the same macro. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Moved the kernel version-ing code into a new version.hChuck Lever2008-07-154-21/+55
| | | | | | | header file which allows the code to be shared Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Introduce a new DNS resolver function in utils/mount/network.c that usesChuck Lever2008-07-152-19/+61
| | | | | | | | | getaddrinfo(3), which supports AF_INET6, to resolve host names. Replace the guts of nfs_gethostbyname() with a call to the new function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The text-based mount command displays the rather inexplicable "mount:Chuck Lever2008-07-152-4/+10
| | | | | | | | | | | | | internal error" whenever it encounters a problem that is entirely unexpected by its designers. Let's beef that error message up to include instructions about reporting the problem, and fix the error code returned by the mount option rewriting logic so that also will no longer report "internal error". An error in there should generally only occur if there was an invalid mount option specified. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Ported the create_mtab() routine from util-linux-ng as wellChristiaan Welvaart2008-07-153-34/+86
| | | | | | | | some add_mtab() updates to better hand the instances where /etc/mtab does not exist or is not writable Signed-off-by: Christiaan Welvaart <cjw@daneel.dyndns.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* The rpc.gssd scans for any suitable kerberos ticket. In cross-realmLukas Hejtmanek2008-07-155-15/+165
| | | | | | | | | | environment this may not be the desired behaviour. Therefore a new option, -R preferred realm, is presented so that the rpc.gssd prefers tickets from this realm. By default, the default realm is preferred. Signed-off-by: Lukas Hejtmanek <xhejtman@ics.muni.cz> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* The default expiration of kernel gss contexts is the expirationLukas Hejtmanek2008-07-154-4/+16
| | | | | | | | | | | | | | | | | of the Kerberos ticket used in its creation. (For contexts created using the Kerberos mechanism.) Thus kdestroy has no effect in nullifying the kernel context. This patch adds -t <timeout> option to rpc.gssd so that the client's administrator may specify a timeout for expiration of contexts in kernel. After this timeout, rpc.gssd is consulted to create a new context. By default, timeout is 0 (i.e., no timeout at all) which follows the previous behavior. Signed-off-by: Lukas Hejtmanek <xhejtman@ics.muni.cz> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* gssd_setup_krb5_user_gss_ccache must return an error if no usable cache isLukas Hejtmanek2008-07-153-8/+8
| | | | | | | | found. Trying to use invalid default cache and continue is not good idea at all. Signed-off-by: Lukas Hejtmanek <xhejtman@ics.muni.cz> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* The nfsstat program reads /proc/net/rpc/* files to gets info aboutJeff Layton2008-06-231-4/+5
| | | | | | | | | | | | | | | | calls. This info is output as unsigned numbers (at least on any relatively recent kernel). When nfsstat prints these numbers, they are printed as signed integers. When the call counters reach 2^31, things start being printed as negative numbers. This patch changes nfsstat to read and print all counters as unsigned integers. Tested by hacking up a kernel to initialize call counters to 2^31+1. Thanks to Takafumi Miki for the initial version of this patch. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* nfsstat -m lists all current nfs mounts, with the mount options.Neil Brown2008-06-061-1/+1
| | | | | | | | | | It does this by reading /proc/mounts and looking for mounts of type "nfs". It really should check for "nfs4" as well. For simplicity, just check the first 3 characters of the type. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix error reporting when probe_bothports() fails while rewriting mountChuck Lever2008-06-062-4/+8
| | | | | | | options. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Clean up: instead of passing so many arguments to all the helpers, haveChuck Lever2008-06-061-111/+132
| | | | | | | | nfsmount_string build a data structure that contains all the arguments, and pass a pointer to that instead. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Steinar Gunderson reports:Chuck Lever2008-06-061-13/+38
| | | | | | | | | | | | | | | | | "It seems retry= is now additive with the text-based mount interface. In particular, "mount -o retry=0" still gives a two-minute timeout." Correct the bug and make retry= option parsing more robust. If parsing the retry option fails, the option is ignored and a default timeout is used. Note that currently the kernel parser ignores the "retry=" option if the value is a number. If the value contains other characters, the kernel will choke. A subsequent patch to the kernel will allow any characters as the value of the retry option (excepting of course ","). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Make the text-based mount path check whether statd is running if the "lock"Neil Brown2008-06-061-4/+27
| | | | | | | | option is in effect. This echoes similar logic in the legacy mount path. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed smail typo in exportfs man pageOren Held2008-05-081-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* If mount.nfs is not installed setuid, an attempt to perform a "user"NeilBrown2008-05-081-0/+6
| | | | | | | | | | or "users" mount will fail with a fairly obscure error message, typically about getting "permission denied" from the server. This patch gives a more helpful message in that case. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Kerberos credentials may be stored in multiple places. Make itVince Busam2008-05-076-20/+43
| | | | | | | | | | possible to search several directories for valid credentials when making NFS requests. Original patch from Vince Busam <vbusam@google.com> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>. Signed-off-by: Steve Dickson <steved@redhat.com>
* Add a new function to retrieve the current verbosity levelKevin Coffman2008-05-072-0/+6
| | | | | | | | so that some messages that would otherwise always print may be silenced. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Add the other two DES encryption types to the default list ofKevin Coffman2008-05-071-1/+3
| | | | | | | Kerberos encryption types that may be negotiated. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Check the info file nfs/rpc_pipefs/nfs/clnt?/info toOlga Kornievskaia2008-05-072-2/+13
| | | | | | | | | see if a port number was supplied. If so, use it rather than the default port number. Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* The prev_bg_host stuff made sense when NFS didn't have its own mountJeff Layton2008-05-071-14/+0
| | | | | | | | | handler. Now though, each mount.nfs invocation is really a one-shot affair, and this check no longer works. It also leaked memory. Remove it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The bg option is essentially ignored with nfs4 currently. nfs4mount()Jeff Layton2008-05-071-2/+8
| | | | | | | | | will never exit with EX_BG, so the mount will never be backgrounded. Fix it so that when bg is specified that we error out with EX_BG as soon as possible after the first failed mount attempt. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Currently nfs4mount() sets the retry value to 10000 on both fg and bgJeff Layton2008-05-072-5/+17
| | | | | | | | | | | | mounts. It should be 2 for fg and 10000 for bg. nfsmount() sets it properly, but there is a potential corner case. If someone explicitly sets retry=10000 on a fg mount, then it will be reset to 2. Fix this by having retry default to -1 for both flavors, and then reset if needed after the mount options have been parsed. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Change how mount.nfs handles EACCES errors. Currently,Jeff Layton2008-04-141-1/+0
| | | | | | | | | | | EACCES is a non-fatal error which means the mount will be retied. This caused mounts to hang for 2mins when the client does not have permission to access the export. In a strict interpretation, the error that should be returned is EPERM, but this is not always the case. So due to the fuzzy interpretation, of EPERM and EACCES, EACCESS is now a fatal error Signed-off-by: Steve Dickson <steved@redhat.com>
* Correct a spelling error in a mount.nfs error messageLi Yewang2008-04-091-1/+1
| | | | | Signed-off-by: Li Yewang <lyw@cn.fujitsu.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Make sure showmount fails when rpc.mountd is not registeredSteve Dickson2008-03-181-1/+3
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Updated exportfs man to talk about /var/lib/nfs/etabSteve Dickson2008-03-181-10/+10
| | | | | | instead of /var/lib/nfs/xtab Signed-off-by: Steve Dickson <steved@redhat.com>
* There were 2 things wrong with auth flavour ordering:bc Wong2008-03-182-6/+16
| | | | | | | | | | | | | | | | | | | | | | - Mountd used to advertise AUTH_NULL as the first flavour on the list, which means that it prefers AUTH_NULL to anything else (as per RFC 2623 section 2.7). - Mount.nfs used to scan the returned list in reverse order, and stopping at the first AUTH_NULL or AUTH_SYS encountered. If a server advertises (AUTH_SYS, AUTH_NULL), it will by default choose AUTH_NULL and have degraded access. I've fixed mount.nfs to scan from the beginning. For mountd, it does not advertise AUTH_NULL anymore. This is necessary to avoid backward compatibility issue. If AUTH_NULL appears in the list, either the new or the old client will choose that over AUTH_SYS. Tested the server/client combination against the previous versions, as well as Solaris and FreeBSD. Signed-off-by: bc Wong <bcwong@cisco.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Turn down gssd's syslog verbosityTimo Aaltonen2008-03-132-2/+5
| | | | | Modified-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Stop rpc.mountd from probing all known devices which causesSteinar H. Gunderson2008-03-131-2/+0
| | | | | | | idle disks to spin up for basically no reason. Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Recently #include directives for autoconf's config.h file were added inChuck Lever2008-03-116-2/+24
| | | | | | | | | | | | | | | | | utils/mount/error.c and utils/mount/mount.c, but appropriate HAVE_CONFIG_H checks were not added at the same time. In addition, several other .c files under utils/mount reference autoconf-generated HAVE_ macros, but don't appear to include config.h Also, Heinz-Ado Arnolds <arnolds@MPA-Garching.MPG.DE> reports that this patch is needed to ensure START_STATD is properly defined in utils/mount/network.c. Otherwise start_statd() is always a no-op, even if the configure script defines an appropriate statd start-up script. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Heinz-Ado Arnolds <arnolds@MPA-Garching.MPG.DE> Signed-off-by: Steve Dickson <steved@dickson.boston.devel.redhat.com>
* Fixed typo in nfsd man pageFilipus Klutiero2008-03-111-1/+1
| | | | | | bz: http://bugzilla.linux-nfs.org/show_bug.cgi?id=160 Signed-off-by: Filipus Klutiero <chealer@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed a segfault in the mount.nfs commandSteinar H. Gunderson2008-03-101-1/+1
| | | | | Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed a couple typos that effected the '--mounts' nfsstat optionSteinar H. Gunderson2008-03-102-2/+2
| | | | | Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed typo in gssd manpageSteinar H. Gunderson2008-03-101-1/+1
| | | | | Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The mount(5) man page states that the noquota, quota, usrquota andSteinar H. Gunderson2008-03-101-0/+4
| | | | | | | | | | | grpquota options are ignored. (They are, however, used by the quota tools, so having them in fstab can be useful.) Make mount.nfs ignore them properly, matching the man page. There are a few aliases (like usrjquota) that are parsed by quota, but as these are not documented nor seem to be widely used, they are not included. Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Be explicit on how to update exports in the man page.Steve Dickson2008-03-101-0/+2
| | | | | Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* As part of migrating from nfs@lists.sf.net to linux-nfs@vger.kernel.org,Chuck Lever2008-03-052-6/+0
| | | | | | | | | | | update the mailing list address used to report bugs in nfs-utils. Removed the BUGS section in the mount.nfs and umount.nfs man pages since they weren't consistent with the contents of the BUGS sections in others in nfs-utils. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Increase the number of concurrent krb5 mounts by increasingDrew Middlesworth2008-03-041-1/+1
| | | | | | | the size of the poll array Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* If validateascii is passed a string containing only non-zero 7bitNeilBrown2008-02-261-1/+1
| | | | | | | | | | | | values, then the loop with exit with i == len, and the following test will access beyond the end of the array. So add an extra test to fix this. Found by Marcus Meissner <meissner@novell.com>. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed typo in the nfsstat command line arugments.Peng Haitao2008-02-261-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Stop gssd from ignoring the machine credential cacheVince Busam2008-02-261-1/+1
| | | | | | | defined by the -d flag Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
* In mountd, if get_exportlist() (utils/mountd/mountd.c) returns NULL itHarshula Jayasuriya2008-02-121-9/+7
| | | | | | | | | | | | | | should not be considered a failure. It just means that there are no exports on the system. The practical problem with the current code is that a showmount -e results in a syslog message from mountd that looks like: rpc.mountd: export request from 10.250.100.2 failed. Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: Harshula Jayasuriya <harshula@sgi.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Cleaned up some typos that were found in the variousFrank Filz2008-02-091-5/+7
| | | | | | | places in the mountd code. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
* Added in relatime mount option so mount.nfs staysSteve Dickson2008-01-242-1/+10
| | | | | | compatible with the mount command in util-linux-ng Signed-off-by: Steve Dickson <steved@redhat.com>
* Fix bug when both crossmnt and fsid are set.Steve Dickson2008-01-191-3/+8
| | | | | | | | | When exported a filesystems with option inherited (by the crossmnt option) from a higherlevel filesystem, ignore filesystem specific options like FSID and explicit UUID. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* The kernel doesn't support the underlying parts needed for changing theSteve Dickson2008-01-161-3/+0
| | | | | | | MNT program number. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* The kernel hasn't supported the underlying parts needed for changing theSteve Dickson2008-01-161-3/+0
| | | | | | | NFS program number for a very long time. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Address an inconsistency: the mount.nfs command uses the glibc routinesSteve Dickson2008-01-161-5/+7
| | | | | | | | | | | | to manipulate /etc/mtab (setmntent) but, everything else in nfs-utils uses a local private version (nfs_setmntent). The local version does some extra mangling of the mtab entries. We should check what util-linux does these days to be sure, but for now, let's make the mount.nfs command use the nfs_ variants of setmntent(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>