summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge branch 'branch-1-0'Neil Brown2007-02-278-3/+263
|\
| * Fix silly bug with tcp-wrappers checkNeil Brown2007-02-271-1/+1
| | | | | | | | | | | | A stray '$'. Signed-off-by: Neil Brown <neilb@suse.de>
| * Fix silly bug with gid lookupNeil Brown2007-02-271-1/+1
| | | | | | | | | | | | | | Wrong pointer test meant mountd would alway do gid lookups instead of only if asked to with '-g'. Signed-off-by: Neil Brown <neilb@suse.de>
| * Extend the exportfs/mountd interface to pass fslocations info into the kernelFred Isaman2007-02-275-8/+34
| | | | | | | | | | | | | | | | Fix up a few issues with the fsloc code. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
| * Fix reference error when writing fsloc data to cacheKevin Coffman2007-02-271-1/+1
| | | | | | | | | | | | | | | | Use the correct pointer when writing fslocations data to the cache. Also write the fsloc stuff before the uuid stuff so userland code will work with or without the uuid kernel patches. Signed-off-by: Neil Brown <neilb@suse.de>
| * Add missing fsloc.[ch] files - oops.Neil Brown2007-02-262-0/+234
| |
* | Remove rpc.lockdNeil Brown2007-02-229-165/+1
| | | | | | | | | | | | This was only needed for kernels 2.2.14 through 2.2.17. These have long since been superceded, so remove some dead weight.
* | Change default from subtree_check to no_subtree_checkNeil Brown2007-02-221-3/+3
|/ | | | | | | subtree_check causes more problems than it is worth, and it isn't worth much in the first place.. Signed-off-by: Neil Brown <neilb@suse.de>
* Update version to 1.0.11Neil Brown2007-02-221-1/+1
|
* Extend the exportfs interface to pass fslocations info into the kernel.Fred Isaman2007-02-227-3/+98
| | | | | | | | | | Extend exportfs interface to pass fslocations info into the kernel, using syntax modelled after AIX. Adds "refer=" and "replicas=" options to /etc/exports to enable use of the kernel fslocation code. Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Fix showmount bugs.Neil Brown2007-02-221-3/+6
| | | | | | | When doing a nonblocked connect, we need to select for 'write', not 'read'. Also, when a tcp socket has been connected, we should use clnttcp_create to make a tcp client, not clntudp_bufcreate !!
* Support group-id looks for kernels that ask for them.Neil Brown2007-02-124-4/+78
| | | | | | | With "-g" mountd will listen for uid -> gidlist requests from the kernel and provide the required mapping. This is specific to AUTH_USER (aka AUTH_SYS) and is designed to overcome the 16-gid limit in the AUTH_UNIX protocol.
* Use UUIDs to identify filesystems if kernel supports it.Neil Brown2007-02-128-35/+216
| | | | | | | | | | | This introduces a new dependancy on libblkid. If a filesystem being exported has a UUID that libblkid can extract, then that is passed to the kernel for use in identifying the filesystem in filehandles. This means that 'fsid=' is no longer needed to work around the problem of device numbers changing. fsid= is still needed for fielsystems that have no device, and can now be given 16byute uuid instead of just a 32bit one.
* Correct spelling errorNeil Brown2007-02-121-2/+2
| | | | writting -> writing
* Add option to svcgssd to enable libnfsidmap debugging.Kevin Coffman2007-02-092-4/+20
| | | | | | | | | | Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> As suggested by Glenn Machin <GMachin@sandia.gov>. Allow svcgssd to turn on libnfsidmap debugging. This uses a new command-line parameter so that it can be enabled independently from other debugging. Signed-off-by: Neil Brown <neilb@suse.de>
* Remove duplicated code.Kevin Coffman2007-02-091-17/+20
| | | | | | | | Signed-off-by: Fred Isaman <iisaman@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Remove duplicated code. Signed-off-by: Neil Brown <neilb@suse.de>
* Share handling of lucid_sec_context for Heimdal and MITKevin Coffman2007-02-095-170/+234
| | | | | | | | | | | | Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> The 0.8 release of Heimdal has (will have) support for the lucid context. The handling of lucid_sec_context can be shared between builds with MIT or Heimdal Kerberos. Split out the lucid_sec_context code from context_mit.c and make a new common file, context_lucid.c. Signed-off-by: Neil Brown <neilb@suse.de>
* Use owner rather than filename format in choosing cred cache filesKevin Coffman2007-02-091-56/+50
| | | | | | | | | | | Signed-off-by: Glenn Machin <gmachin@sandia.gov> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Some installations use different name formats for their credentials caches. Instead of checking that the uid is part of the name, just make sure that uid is the owner of the file. This is a modification of the original patch from Glenn. Signed-off-by: Neil Brown <neilb@suse.de>
* Various minor manpage fixes.Kevin Coffman2007-02-091-3/+3
| | | | | | | | | | | | | Signed-off-by: Steinar H. Gunderson <sgunderson@bigfoot.com> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> This mostly takes care of the difference between - and \-; in man pages, the former is hyphen (which indicates, among others, that a line might be split at that point), while the latter is a dash. For options, the latter is correct. There's also one minor grammatical fix. Signed-off-by: Neil Brown <neilb@suse.de>
* Use the gssglue version of gssapi.h for svcgssd_mech2file.cKevin Coffman2007-02-091-5/+1
| | | | | | | Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> Remove Kerberos implementation dependency from svcgssd_mech2file.c Signed-off-by: Neil Brown <neilb@suse.de>
* Stop using storage after freeKevin Coffman2007-02-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> The previous patch seems to expose a use after free bug in dirscancb. At least, I could reliably reproduce a segfault by doing a bunch of mounts and then unmounting them all. The code uses the following list macro: TAILQ_FOREACH(ic, icq, ic_next) { ...to iterate over all of the ic entries and clean up any that no longer have a corresponding directory in rpc_pipefs. This macro unrolls into: for(ic=icq->tqh_first; ic != NULL; ic=ic->ic_next.tqe_next) { ...but within this loop, we can free ic, and then the for loop can trip over that when it tries to do the iteration. The attached patch works around this by not using the TAILQ_FOREACH macro and saving off the tqe_next pointer prior to the free. Again, this was tested on a patched 1.0.6, but the 1.0.10 code is very similar, and I think the problem exists there as well. Signed-off-by: Neil Brown <neilb@suse.de>
* Fix memory leak in idmapd.Kevin Coffman2007-02-091-3/+8
| | | | | | | | | | | | | | | | Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> There is a pretty nasty memory leak in idmapd in dirscancb(). Some of our customers have reported that idmapd can eat gigabytes of memory on machines with a large number of mounts and unmounts and a long uptime. That function uses scandir(), which malloc's an array of strings, but dirscancb() never frees the strings or the array. The following patch should correct this, but I've not yet tested it on 1.0.10 (only on the RHEL4 1.0.6 version). Still, the code is very similar and I'm fairly certain the problem exists in both versions. Signed-off-by: Neil Brown <neilb@suse.de>
* Treat GSSAPI error codes as unsigned.Kevin Coffman2007-02-093-2/+14
| | | | | | | | | | Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> GSSAPI error codes (major and minor) are defined as unsigned values. However, we treat them as signed while passing them down to the kernel where conversion fails if they include the minus sign. Convert them as unsigned. Signed-off-by: Neil Brown <neilb@suse.de>
* Add AM_MAINTAINER_MODE to configure.inKevin Coffman2007-02-091-0/+1
| | | | | | | | | | | | | | | | | | | Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> As requested by "Steinar H. Gunderson" <sgunderson@bigfoot.com>, add AM_MAINTAINER_MODE to configure.in. See the description of this macro below: `AM_MAINTAINER_MODE' disables the so called "rebuild rules" bys default. If you have `AM_MAINTAINER_MODE' in `configure.ac', and run `./configure && make', then `make' will *never* attempt to rebuild `configure', `Makefile.in's, Lex or Yacc outputs, etc. I.e., this disables build rules for files which are usually distributed and that users should normally not have to update. If you run `./configure --enable-maintainer-mode', then these rebuild rules will be active. Signed-off-by: Neil Brown <neilb@suse.de>
* Touch up some of the autotools filesKevin Coffman2007-02-093-2/+12
| | | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu> this patch touches up the autotool code a bit in nfs-utils: - run autogen.sh with -e so if something fails, it'll abort properly - set ACLOCAL_AMFLAGS so that when running autoreconf or when autotools re-runs itself, the m4 files are found properly - make sure we include bsdsignals.m4 in the final tarball - add some cross-compiling fallback logic to bsdsignals.m4 so that when cross-compiling nfs-utils, the configure is a bit more nice than simply: checking for BSD signal semantics... configure: error: cannot run test program while cross compiling Signed-off-by: Neil Brown <neilb@suse.de>
* Make UDP sockets not blockingNeil Brown2007-02-051-4/+15
| | | | | | | | | This is needs if mountd is running multithreaded else multiple threads will be blocked on a UDP port with nothing to read and so won't be able to serve up-calls from the kernel. Thanks to "Murali Krishna V" <vm.krishna@gmail.com> for highlighting the problem.
* Further README updates.Neil Brown2007-02-051-8/+4
|
* Update READMEJ. Bruce Fields2007-02-051-25/+15
| | | | | | | | | The README has bit-rotted: redhat and debian packaging scripts are no longer included, util-linux mount is (in theory) no longer required, and instructions on building from latest git would be useful. Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de>
* Enable tcpwrappers by defaultNeil Brown2007-02-051-13/+11
| | | | This used to be the default but we lost it at about 1.0.8
* Remove explicit path names from man page for showmount and lockd.Neil Brown2007-02-052-2/+2
| | | | | Just like statd, the path isn't needs in the man page and different distros install it in different places.
* Use memset instead of __bzero.Steinar H. Gunderson2007-02-051-1/+1
| | | | | | | | | bzero has been deprecated for years (and anything starting with __ is an internal function anyhow), and __bzero seems to have broken on ia64 not too long ago. Signed-off-by: Neil Brown <neilb@suse.de>
* Add generated files to CLEANFILES in rquotadNeil Brown2007-02-051-0/+2
| | | | Matching utils/statd, make sure generated files get cleaned.
* Remove path name for rpc.statd from manpage.Neil Brown2007-02-051-1/+1
| | | | | As the man page doesn't need it, and different distros put it in different places.
* Fix an off-by-one in the handling of the -d option to rpc.gssdSteinar H. Gunderson2007-02-051-1/+1
| | | | https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/76409
* Various minor manpage fixes.Steinar H. Gunderson2007-02-053-21/+21
| | | | | | | | | | This mostly takes care of the difference between - and \-; in man pages, the former is hyphen (which indicates, among others, that a line might be split at that point), while the latter is a dash. For options, the latter is correct. There's also one minor grammatical fix.
* Remove getkversionNeil Brown2007-02-055-34/+1
| | | | | This is not used, does not seem useful, and causes compile problems on some distgributions.
* Allow default options in /etc/exportsSteinar H. Gunderson2007-02-052-28/+63
| | | | | | | | | | | | | | | | | | | | | | | Implement default options in /etc/exports, to fix a long-standing wishlist bug in Debian. (The user claims the syntax matches that of OpenBSD.) This makes it possible to write "/srv/www -sync,no_subtree_check host1 host2 host3" instead of having to write (sync,no_subtree_check) over and over and over again, driving the administrator slowly mad. Such option lines can be placed anywhere on the line, and affects anything after them (I do not know if OpenBSD allows this). The patch is slightly convoluted in order to avoid triggering spurious warnings; for instance, we want "/srv/www -sync host1" to trigger a warning, but not "/srv/www -sync,no_subtree_check host1" or "/srv/www -sync host1(no_subtree_check)". There was also a suggestion for a truly global (ie. per-file) option list, but this seemed like the safest bet, given that it matches that of other implementations. Also, the man page is updated with information on the new possibilities, and an example. Signed-off-by: Steinar H. Gunderson <sesse@debian.org> Signed-off-by: Neil Brown <neilb@suse.de>
* Make mountd complain on unsupported uid mapping schemesSteinar H. Gunderson2007-02-051-0/+6
| | | | | | | | | | | | | | The NFS kernel server does not support uid mappings, activated with flags such as "map_daemon" in exports. There is already code that parses these flags, and gives an error at mount time if an unsupported flag (ie. any but the default) is given. However, at some point the kernel changed the export interface, and the new code forgot to include the relevant check. Thus, simply copy the check from the old to the new code, which makes sure mountd behaves the same in this aspect regardless of kernel version, and makes sure the admin does not inadvertently use map_daemon and expect it to work. Signed-off-by: Steinar H. Gunderson <sesse@debian.org>
* Never set flushtime for a cache in the future.Neil Brown2007-02-051-1/+4
| | | | | | If 'etab' happens to have a timestamp in the future, this will get copied to the flush-time for various caches, and no exports will work until that time arrives. So clamp the flushtime to 'now'.
* Ensure 'showmount -e' gets current information.Neil Brown2007-01-113-5/+10
| | | | | | If auth_reload has been called by someone else, get_exportlist can incorrectly return old data. So track modify times better and only use cached data if the modify time matches.
* Error check messages sent to the kernel.Neil Brown2007-01-118-25/+37
| | | | | | And make sure that if we fail to export a filesystem in mountd, then we don't try to get a filehandle on it, or a deadlock might occur.
* add missing long option for -r in mountdJeff Layton2006-12-201-0/+1
| | | | | | | | | I forgot a bit of code that needs to go into patch 3 that I posted yesterday. This adds a long option for the -r option. I'll post manpage update patches once I get them written up. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Reduce showmount timeouts.Ian Kent2006-12-201-8/+201
| | | | | | | | | | | | | | | | | | | Showmount itself tries to use a short timeout but the RPC clnttcp_create and clntudp_create calls will call portmap internally to get the port to use if it is set to 0 in the passed address structure. The above calls then use the internal timeouts, basically 60 seconds, which slows things down. Also the for tcp a blocking connect is used which can take quite a while to timeout as well. showmount tries tcp then udp so a fail can go through several lengthy waits before failing. I've grabbed some of the autofs code and put together a patch to allow specification of the timeouts for the portmap getport and to implement a non-blocking connect. Signed-off-by: Neil Brown <neilb@suse.de>
* nhfsstone remove due to license uncertainty.Neil Brown2006-12-1914-2545/+0
| | | | | | | | It isn't clear the the License (See DISCLAIMER) is GPLv2 compatable, and it is believed that the code is largely unused, so get rid of nhfsstone just to be safe. Signed-off-by: NeilBrown <neilb@suse.de>
* add -r flag to make mountd do reverse resolve of ipaddress on the flyJeff Layton2006-12-192-3/+18
| | | | | | | | | | | | | For those that want "traditional" showmount -a behavior from their mountd (hostname:/path instead of ipaddr:/path). This patch adds a '-r' flag that does a reverse-resolve for each IP address listed in the rmtab when a dump operation is called. Probably not a good idea for those concerned about performance, but since it's not the default option, I don't see it being an issue. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* remove extraneous mountlist_add/del calls and change remaining ones to use ↵Jeff Layton2006-12-192-18/+8
| | | | | | | | | | | | | | | | | | | | | | IP addresses Neil suggested a patch to change the mountlist_add and mountlist_del calls to use IP addresses instead of the names returned by client_compose based on a command line option flag. I don't see any real reason to put client_compose strings into the rmtab, so this patch makes it so that it adds IP addresses instead of those strings to the rmtab by default. It also removes all mountlist_add calls that are being done from kernel cache routines. My main concern there is NFSv4. We don't seem to make any upcalls to mountd on NFSv4 unmounts, and I don't see a way to reliably remove NFSv4 entries. So, I figured I'd stick with having mountlist_add only called when a v2 or v3 mount call is made, and mountlist_del called only on the corresponding unmount call. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* Don't rely on old info in my_clientJeff Layton2006-12-191-15/+9
| | | | | | | | | | | | | | | | | | | | | | | Here's a new set of patches to fix up "showmount -a", based on the approach suggested by Neil. This first patch is fairly simple. It just stops the current caching of my_client. For an explanation, consider this situation with the current code: 1) Client mounts an NFS export from server that is restricted to a particular hostname or netgroup. 2) DNS or netgroup changes so that the client would be denied. 3) Client attempts mount again. Mount succeeds, even though it shouldn't due to the fact that mountd relies on cached info in my_client. This situation can occur as long as no other client attempts a mount between 1 and 3 above. The patch below removes this caching, and causes a new invocation of client_compose for each pass through auth_authenticate: Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Neil Brown <neilb@suse.de>
* nfs-utils - mtab locking needed on add as well as updateIan Kent2006-12-191-9/+6
| | | | | | | | | | | | | Hi all, I noticed some mtab corruption the other day when doing some autofs testing but thought nothing of it. When investigating another issue I came across utils/mount.c:add_mtab which looks like it adds an entry to /etc/mtab without performing correct locking. Perhaps this is not needed when adding entries but I think it is.
* Fix -n option to mountdSteinar H. Gunderson2006-10-242-1/+11
| | | | | | | The getopt_long() option string in mountd was having a spurious colon after the 'n', leading to the short form of --no-tcp not being usable (expecting a parameter, contrary to the long form and the documentation). Fix.
* Document sensitive gidsSteinar H. Gunderson2006-10-242-2/+16
| | | | | | | | The exports(8) man page already mentions that some non-root users, such as bin, might be just as sensitive as root, and that root_squash thus might not be as effective as one could hope for. Update the documentation to also mention that this could be the case for non-root groups, such as staff.