summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* mount.nfs: Error handling clean-upChuck Lever2007-07-202-24/+33
| | | | | | | | | o Use nfs_error( _() ) instead of fprintf(stderr, o Use the mount return code macros instead of bare integers o Free mount_point after it has been canonicalized Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: When -v is set and the mount succeeds, print the mount infoChuck Lever2007-07-201-0/+15
| | | | | | | Add a bit of logic that appears to be in other mount helpers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Remove the running_bg parameterChuck Lever2007-07-205-7/+7
| | | | | | | | Clean up: when nfsmount and nfs4mount are called, running_bg is always set to zero. Remove the parameter from the call. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Change *flags to flagsChuck Lever2007-07-205-9/+9
| | | | | | | | | It's not necessary to treat the *flags parameter to nfsmount and nfs4mount as an output parameter. Nothing is passed back. Replace it with a normal call-by-value. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: No need to return nfs_mount_data structsChuck Lever2007-07-205-31/+24
| | | | | | | | | | | | | | | | Refactor mount processing slightly to remove an output parameter and an unnecessary type cast. The mount syscall is now made from inside nfs_mount or nfs4mount, rather than in common code after those are called. Code review suggests that EX_BG was never returned by mount.nfs because the logic I just replaced was always returning EX_FAIL. The new logic should properly return EX_BG when appropriate. However, it is unclear whether /bin/mount handles backgrounding the mount request, or whether mount.nfs should. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Move MS_DUMMY and friends to header fileChuck Lever2007-07-202-5/+12
| | | | | | | | | We move the definitions of MS_USER and friends to our local copy of mount_constants.h. These will need to be available in nfsmount.c and nfs4mount.c when we move the mount system call out of mount.c. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Move start_statd into nfs_mountChuck Lever2007-07-205-64/+65
| | | | | | | | | | | | | | Move start_startd into network.c, and move the call inside of nfs_mount, instead of immediately after - conceptually a better place for it. Also fix a minor nit: Since the mount actually fails if start_statd doesn't work, cause mount.nfs to exit with a status of EX_FAIL. Still need to do something about "running_bg" in nfsmount.c:nfsmount(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Move network functions into a common source moduleChuck Lever2007-07-206-274/+354
| | | | | | | | Separate network oriented functions from filesystem oriented functions, for general cleanliness. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Eliminate some C macros that use implicit argumentsChuck Lever2007-07-201-78/+81
| | | | | | | | Get rid of nfs_probelist, mnt_probelist, and proto_probelist in order to remove the use of HAVE_RELIABLE_TCP, MAX_NFSPROT, and MAX_MNTPROT. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Always preset nfs_mount_versionChuck Lever2007-07-203-72/+64
| | | | | | | | | | | | nfs_mount_version is a global integer that is set based on a guess about which nfs_mount_data version is appropriate for the kernel we're running on. Make it always available and have the correct value before calling mount and unmount so they don't have to worry about setting it themselves. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Create a common source module for reporting mount errorsChuck Lever2007-07-208-183/+277
| | | | | | | Clean up, and pre-requisite for subsequent fixes. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: clean-up add_mtabChuck Lever2007-07-201-24/+28
| | | | | | | | | | Clean up add_mtab(), and make /sbin/mount.nfs[4] return a proper error if it fails. Also include an unbalanced unlock_mtab() noticed by Steve D. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: /bin/mount already handles --bind & friendsChuck Lever2007-07-201-30/+0
| | | | | | | | | | | | | Clean-up: remove logic to handle --bind and other such command-line options from mount.nfs[4]. These options are already handled in /bin/mount, and the logic for handling them in the NFS helper is currently disabled. Other helpers such as mount.ocfs2 appear not to support --bind (ie. they rely on /bin/mount to do it). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Remove support for "-t" optionChuck Lever2007-07-201-36/+26
| | | | | | | | /bin/mount will never pass "-t" to a mount helper, since it passes the fs-type in the name of the program it is executing. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Simplify generation of prognameChuck Lever2007-07-201-7/+2
| | | | | | | Use basename() instead of our own majick. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* rpcdebug: Update 'rpcdebug' tool with recently added debugging flagsChuck Lever2007-07-202-2/+6
| | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Fix umount.nfs exit statusSteinar H. Gunderson2007-07-161-1/+1
| | | | | | | | | | | | | | | | Hi, As per a bug report from a user: mount.c seems to assume that nfsumount() uses standard C true/false return values, and inverts them for the exit status (where 0 is traditionally considered success). However, nfsumount() consistently seems to use 0 for success, and thus a success gets returned as exit status 1 and a failure as exit status 0. This confuses at least the GNOME drive manager applet, and probably others as well. Signed-off-by: Steinar H. Gunderson <sesse@debian.org> Signed-off-by: Neil Brown <neilb@suse.de>
* Added missing unlock_mtab() call in the add_mtab()Steve Dickson2007-07-161-0/+1
| | | | | | routine. Signed-off-by: Steve Dickson <steved@redhat.com>
* The wrong bit field is being passed to NFSCTL_TCPISSET()Steve Dickson2007-07-161-1/+2
| | | | | | during one of the sanity checks in rpc.nfsd. Signed-off-by: Steve Dickson <steved@redhat.com>
* document the sec= optionJ. Bruce Fields2007-07-101-3/+18
| | | | | | | | | | | Document the sec= option in the exports man page. Not done: it would be nice to have an example or two here (and not just in the final "EXAMPLE" section, though that would be nice too). I was just too lazy to figure out the formatting. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Support sec= option to specify export securityJ. Bruce Fields2007-07-104-8/+163
| | | | | | | | | | | This adds support for reading sec= option and sending security data through cache via "... secinfo n flavor1 flag1 ... flavorN flagN". If sec= is missing, no secinfo option will be passed down. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* move pseudoflavor information to common codeJ. Bruce Fields2007-07-103-35/+23
| | | | | | | | I'd like to be able to use the same pseudoflavor data in exportfs and mountd; so move it to nfslib and a common include. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* fix warnings in mount.cJ. Bruce Fields2007-07-101-1/+1
| | | | | | | | The compiler is warning because we aren't properly specifying the type of the chk_mountpoint argument. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* gitignore updatesJ. Bruce Fields2007-07-102-0/+4
| | | | | | | Update gitignore to ignore some generated files. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Fix retry= to handle lack of reserved port situationFlavio Leitner2007-07-101-0/+8
| | | | | | | | | | In the case of several (>500) mounts running at the same time with -o tcp, the number of attempts that succeed is about 300-500 because it run out of priviledged port (they are busy in TIME_WAIT state). Signed-off-by: Flavio Leitner <flavio.leitner@gmail.com> Signed-off-by: Neil Brown <neilb@suse.de>
* configure changed to corrently report the default for --enable-mountNeil Brown2007-07-101-1/+1
| | | | | | | | | The default for "--enable-mount" was changed to 'yes' sometime ago, but the help message in ./configure wasn't updated to match this. Thanks to Chuck Level for pointing this out. Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs: Add the mount option "nosharecache"Trond Myklebust2007-07-105-4/+50
| | | | | | | | | | | | | | | | | | | | | | Prior to David Howell's mount changes in 2.6.18, users who mounted different directories which happened to be from the same filesystem on the server would get different super blocks, and hence could choose different mount options. As long as there were no hard linked files that crossed from one subtree to another, this was quite safe. Post the changes, if the two directories are on the same filesystem (have the same 'fsid'), they will share the same super block, and hence the same mount options. Add a flag to allow users to elect not to share the NFS super block with another mount point, even if the fsids are the same. This will allow users to set different mount options for the two different super blocks, as was previously possible. It is still up to the user to ensure that there are no cache coherency issues when doing this, however the default behaviour will be to share super blocks whenever two paths result in the same fsid. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Neil Brown <neilb@suse.de>
* mount.nfs - NFSv4 mounts give wrong error message when server denies the mountSteve Dickson2007-05-171-5/+35
| | | | | | | | | | When nfs4 mount fail because the exported directory does not exist, the mount command claims the local mount point does not exist which is wrong. This patch fixes that problem as well as makes the v4 mount failures look like v3/v2 failures. Signed-off-by: Steve Dickson <steved@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Memory leak in mountdSteinar H. Gunderson2007-05-111-0/+1
| | | | | | | | | | In client_compose(), free() the hostent structure returned before exiting. Normally, gethostbyaddr() returns a pointer to a static struct, but this hostent comes from either get_reliable_hostbyaddr() or get_hostent(), both which return a pointer they privately xmalloc()ed, which thus can and should be free()d. Signed-Off-By: Steinar H. Gunderson <sesse@debian.org>
* Release 1.1.0Neil Brown2007-05-113-4/+7
| | | | Update verison numbers(s) and make sure NEWS is uptodate.
* nfs-utils: have mountd hold open etab file to force inode number to changeJeff Layton2007-05-114-15/+32
| | | | | | | | | | | | | This patch changes mountd to hold the etab file open so that when it's changed by exportfs, the inode number should change. We then change auth_reload to reload the file based on whether st_ino is different from the last time it was checked. It also changes auth_reload to maintain a static counter value and return it instead of a timestamp and fixes up get_exportlist accordingly. Finally, it adds some comments to xtab_write to warn people about editing the etab in place. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
* mount.nfs4: Remove checks for idmapd and gssd running.Neil Brown2007-05-111-0/+5
| | | | | | While it is nice to have the checks, nothing in this package creates the files that are checked, so we shouldn't check them yet.
* Remove rquotadNeil Brown2007-05-0812-1087/+0
| | | | | | | | rquotad isn't really used by anyone - as you can tell by the fact that it only works for ext2 and ext3 (if those). The 'quota' package contains a working and maintained rquota and all distros appear to use that one. So remove rquotad from this package to avoid confusion.
* update manpages for showmount and mountdJeff Layton2007-05-082-2/+11
| | | | | | | | This patch updates the manpages for showmount and mountd. It adds a description of the new mountd -r option, and a caveat about the unreliability of showmount -a. Signed-off-by: Jeff Layton <jlayton@redhat.com>
* Detect version of libblkid and act accordingly.Neil Brown2007-05-032-6/+38
| | | | | | | libblkid earlier than 1.40 has a memory leak bug that make it unsuitable for use in mountd. So detect the version and default to not using it if too old. Give appropriate warnings in various cases.
* Always get addressless ticketsKevin Coffman2007-05-032-2/+36
| | | | | | | | Make sure we get addressless tickets so we can function behind a NAT. (Must use a different function to accomplish this with Heimdal.) Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* statd - the files created are named for dns_name, so use that when unlinking.Neil Brown2007-05-032-2/+3
| | | | Also free dns_name when freeing an 'nlist', so do the unlink before the free.
* Change version to 1.1.0-rc2Neil Brown2007-04-201-1/+1
|
* Don't hide my_name in statd.Neil Brown2007-04-201-7/+22
| | | | | statd now passes the 'my_name' from the SM_MON call faithfully to the ha-callout and records it in the sm/ files.
* Release notes updates: portmap and kerberos versions.Neil Brown2007-04-201-0/+6
|
* Update libgssapi requirementsKevin Coffman2007-04-201-1/+1
| | | | | | | Update the required version of libgssapi from 0.9 to 0.11. (Working with Heimdal requires 0.11. Symbol versioning was introduced in 0.10 and should be used everywhere, although not absolutely required.)
* Factor out error message printing differences between MIT and HeimdalKevin Coffman2007-04-204-23/+55
| | | | | | | | | | Use a common function that factors out differences between MIT and Heimdal in getting the right error message printed. Add an autoconf check to see if the newer error message function is available. Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
* Tell Heimdal gss code the correct credential to useKevin Coffman2007-04-201-0/+2
| | | | | Always use the gss_krb5_ccache_name() function to tell Heimdal which credentials to use.
* Make that last patch compile...Neil Brown2007-04-161-2/+3
|
* Be more cautious about use for privilege ports (<1024).Neil Brown2007-04-163-14/+33
| | | | | | | | | | | | | Ports < 1024 are a scarce resource and should not be used carelessly. Technically they should be not used at all without registration with IANA, but sometimes we need them despite that. So: for the socket that RPC services listen on, don't use a <1024 port by default. There is no need. For sockets that we send messages on, that are long-lived, and that might need to appear 'privileged', avoid using a number that is registered in /etc/services if possible.
* README - updates to daemon start order.Kevin Coffman2007-04-041-5/+13
|
* NEWS - add info about gssd changes.Kevin Coffman2007-04-041-0/+20
|
* NEWS and README updates.Neil Brown2007-04-032-17/+114
| | | | Particularly details of daemon startup order have been added to README.
* statd - fix some compile warningsNeil Brown2007-04-031-0/+2
|
* exportfs - test exportability of filesystems when exportfs is run.Neil Brown2007-04-021-1/+85
| | | | | | | | | When exporting a filesystem test to see if the kernel is likely to accept the export and print suitable warning message if not. Don't actually fail the 'exportfs' as by the time a MOUNT request arrives, the filesystem might be exportable. Signed-off-by: Neil Brown <neilb@suse.de>