summaryrefslogtreecommitdiffstats
path: root/utils
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* add_mtab() calls unlock_mtab() twice in one of its error exit paths.Steve Dickson2008-01-161-1/+0
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* When mount.nfs reports that statd isn't running, it suggests using the "-oSteve Dickson2008-01-161-1/+1
| | | | | | | nolocks" option, which doesn't exist. It should say "-o nolock". Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Automatically set 'nohide' on referral exports.Steve Dickson2008-01-091-1/+10
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Redress some nits in the description of the timeo optionSteve Dickson2008-01-091-9/+13
| | | | | | | in the nfs(5) man page. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Fixed typo in rpc.mountd's man pageSteve Dickson2008-01-071-1/+1
| | | | Signed-off-by: Steve Dickson <steved@redhat.com>
* Get rid of the "-i" option for mount.nfs[4] and always use the text-Steve Dickson2008-01-041-17/+4
| | | | | | | based mount(2) system call for kernel version 2.6.23 and later. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* Incorporated Chuck Lever's and Don Domingo's changes to theSteve Dickson2008-01-041-485/+1208
| | | | | | | | nfs(5) manual page. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Don Domingo <ddomingo@redhat.com> Signed-off-by: Steve Dickson <steved@redhat.com>
* When mountd gets a request to export a mountpoint which is notSteve Dickson2007-11-031-1/+1
| | | | | | | | | | | | | explicitly exported, but is below an export point that is flagged as "crossmnt", it passes the wrong path name to the kernel for the "filehandle -> directory" mapping. This can badly confuse the NFS client, and is certainly wrong. So use the correct path names. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* When following a list of mount versions to probe -Steve Dickson2007-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | e.g. probe_mnt1_first or probe_mnt3_first - probe_both will first probe the appropriate NFS version and then, if that succeeds, probe the actual mount version. However instead of probing the target mount version, it probes the "most appropriate" mount version for the given NFS version. This results in it probing: NFSv2, MOUNTv1 twice rather than NFSv2, MOUNTv1 NFSv2, MOUNTv2 as would be more correct. This patch removes the "choose most correct" step and just use the current mouint version for the probe_vers array. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* This means that if mountd is run with "--no-nfs-version 3",Steve Dickson2007-11-031-4/+0
| | | | | | | | | | | | | | | | It will first probe for NFS version 3, which will succeed (assuming the kernel supported NFSv3), then it will check the matching mountd version (3) and probe_port on discovering that isn't supported will try other versions, find "1" is supported will succeed. This leaves up using mount version 1 for an NFSv3 mount, which doesn't work and leads to a SIGSEGV There is no case where trying other versions is needed the request one is not supported, so simply remove that code. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
* The wording in the exportfs man page can be a bit confusing, implyingSteve Dickson2007-11-031-2/+19
| | | | | | | | | | that "exportfs -u :/foo" will unexport /foo from all hosts, which it won't. This patch cleans that wording up and adds a couple examples on how to unexport directories Signed-off-by: Steinar H. Gunderson <sesse@debian.org> Signed-off-by: Steve Dickson <steved@redhat.com>
* Added -S/--since to the nfsstat(1) manpageSteve Dickson2007-10-261-1/+21
| | | | | Author: David Richter <richterd@citi.umich.edu> Signed-off-by: Steve Dickson <steved@redhat.com>
* Remove unnecessary code from idmapd.Kevin Coffman2007-10-153-118/+0
| | | | | | | | | | This patch removes unnecessary code from idmapd. setproctitle is not used anywhere and it can be removed. In addition the kernel section of the nfs_idmap.h header is not used and is out of date and thus is removed. Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Remove old logging implementation for idmapd and rework gssd and idmapd to ↵Kevin Coffman2007-10-153-142/+46
| | | | | | | | | | | | | use the new xlog logging infrastructure. This patch removes all of the old idmap_* logging functions and replaced them with the corresponding xlog functions. In addition that that it also reworks the gssd logging wrappers to use the new xlog_backend. Finally it makes necessary changes to the build files to get the project compiling again. Signed-off-by: David P. Quigley <dpquigl@tycho.nsa.gov> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Remove svcgssd's private version of cacheio.cKevin Coffman2007-10-152-346/+0
| | | | | | | | Now that svcgssd is using the qword_* functions in the support library, remove the private version. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Use nfslib versions of cacheio functionsKevin Coffman2007-10-152-3/+1
| | | | | | | | | | Now that the nfslib library has all the necessary functions and they all operate as needed, use them instead of the private versions in utils/gssd/cacheio.c. The obsolete private versions are removed in the next patch. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Use printerr to print svcgssd downcall debugging infoKevin Coffman2007-10-152-12/+7
| | | | | | | | | | | Rather than depending on modified qword_* functions to print svcgssd debugging information, use printerr in the downcall function. And while we're at it, label things so we know what we're looking at! Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Make print_hexl function write to stdout rather than using printerrKevin Coffman2007-10-151-15/+18
| | | | | | | | | | print_hexl() currently uses printerr, but is really only necessary for local debugging and should simply write to stdout. Also change it to print the description internally. Wrap it and its use in #ifdef DEBUG. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Fix new warning after strict prototype checking enabledKevin Coffman2007-10-151-1/+1
| | | | | | | | Fix function declaration to eliminate compiler warning about it not being a prototype after -Wstrict-prototypes was added. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* text-based mount.nfs: Fix po_rightmost() enum return valuesChuck Lever2007-10-122-32/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Neil observed that po_rightmost() now returns enum values from both enum { PO_NOT_FOUND = 0, PO_FOUND = 1, } and enum { PO_KEY2_RIGHTMOST = 1, PO_KEY1_RIGHTMOST = -1, } It would be cleaner to use a single enum for po_rightmost()'s return value. We take the next logical step and create specific types for the return values in order to ensure we don't mix the enum values, and to document explicitly what return values callers can expect. This could have been a simpler patch, but I think the end result is a cleaner overall parser API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mountd: address a minor compiler warningChuck Lever2007-10-121-1/+1
| | | | | | | | | | | auth.c: In function ‘auth_authenticate’: auth.c:190: warning: ‘error’ may be used uninitialized in this function "error" is used as an output parameter, but the compiler has no way of knowing that. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mountd: eliminate a spurious compiler warningChuck Lever2007-10-121-1/+1
| | | | | | | auth.c:61: warning: function declaration isn’t a prototype Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>