Neil Brown [Thu, 11 Jan 2007 01:51:29 +0000 (12:51 +1100)]
Ensure 'showmount -e' gets current information.
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.
Jeff Layton [Tue, 19 Dec 2006 16:59:07 +0000 (11:59 -0500)]
add missing long option for -r in mountd
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>
Ian Kent [Tue, 19 Dec 2006 11:16:17 +0000 (20:16 +0900)]
Reduce showmount timeouts.
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.
Neil Brown [Mon, 18 Dec 2006 22:44:17 +0000 (09:44 +1100)]
nhfsstone remove due to license uncertainty.
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.
Jeff Layton [Mon, 18 Dec 2006 20:44:11 +0000 (15:44 -0500)]
add -r flag to make mountd do reverse resolve of ipaddress on the fly
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>
Jeff Layton [Mon, 18 Dec 2006 20:43:56 +0000 (15:43 -0500)]
remove extraneous mountlist_add/del calls and change remaining ones to use 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>
Jeff Layton [Mon, 18 Dec 2006 20:43:16 +0000 (15:43 -0500)]
Don't rely on old info in my_client
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>
Ian Kent [Thu, 14 Dec 2006 11:34:52 +0000 (20:34 +0900)]
nfs-utils - mtab locking needed on add as well as update
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.
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.
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.
Kevin Coffman [Fri, 13 Oct 2006 19:36:03 +0000 (15:36 -0400)]
Allow gssd ccaches in MEMORY: rather than FILE:
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Add option to store gssd ccaches in a MEMORY: cache rather
than the default FILE: cache. In response to suggestion
from Steve Dickson <steved@redhat.com> and
Nalin Dahyabhai <nalin@redhat.com>.
Signed-off-by: Olga Kornievskaia <aglo@citi.umich.edu> Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Implement a new version of lucid spkm3 context which is passed
down to the kernel.
J. Bruce Fields [Fri, 13 Oct 2006 19:35:52 +0000 (15:35 -0400)]
Don't always use default mapping to "nobody".
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
We've been ignoring all mapping errors and instead mapping to a "nobody" user
or group.
This is arguably OK for the cases where we're returning a value to the user
(so, id->name mapping on the server or name->id mapping on the client).
But it's a disaster in the other direction (id->name on the server or id->name
on the client): for example, a chown to an unknown user should *not*
automatically be translated into a succesful chown to "nobody".
This patch fixes that problem on the server side.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
did447@gmail.com [Fri, 13 Oct 2006 19:35:38 +0000 (15:35 -0400)]
On a glibc system gethostbyname is in libc not libnsl
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Change configure test for gethostbyname, and properly
determine whether "-lnsl" or "-lsocket" are really
required.
Kevin Coffman [Fri, 13 Oct 2006 19:35:32 +0000 (15:35 -0400)]
Restore extra help for PKG_CONFIG error
Signed-off-by: Kevin Coffman <kwc@citi.umich.edu>
Fix the error message printed when pkg-config is unable to locate
information for librpcsecgss so the message is actually printed.
Neil Brown [Mon, 7 Aug 2006 06:40:50 +0000 (16:40 +1000)]
Set version to 1.0.10
Note: 1.0.10 should be used in preference to
1.0.9 especially with kernels 2.6.18 and later
otherwise 'rpc.nfsd N' won't work to change the
number of threads after nfsd has been started.
Neil Brown [Mon, 7 Aug 2006 06:37:13 +0000 (16:37 +1000)]
"rpc.nfsd XX" should not fail if ports are already open.
support/nfs/nfssvc.c: if any ports are already open,
don't try to open any more.
This means that once nfsd is running
rpc.nfsd X
will just change the number of threads, not the
ports in use.