Neil Brown [Mon, 12 Feb 2007 05:30:23 +0000 (16:30 +1100)]
Support group-id looks for kernels that ask for them.
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.
Neil Brown [Mon, 12 Feb 2007 01:25:03 +0000 (12:25 +1100)]
Use UUIDs to identify filesystems if kernel supports it.
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.
Kevin Coffman [Thu, 8 Feb 2007 22:27:51 +0000 (17:27 -0500)]
Add option to svcgssd to enable libnfsidmap debugging.
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:45 +0000 (17:27 -0500)]
Remove duplicated code.
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:40 +0000 (17:27 -0500)]
Share handling of lucid_sec_context for Heimdal and MIT
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:35 +0000 (17:27 -0500)]
Use owner rather than filename format in choosing cred cache files
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:30 +0000 (17:27 -0500)]
Various minor manpage fixes.
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:25 +0000 (17:27 -0500)]
Use the gssglue version of gssapi.h for svcgssd_mech2file.c
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:19 +0000 (17:27 -0500)]
Stop using storage after free
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:14 +0000 (17:27 -0500)]
Fix memory leak in idmapd.
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>
Kevin Coffman [Thu, 8 Feb 2007 22:27:09 +0000 (17:27 -0500)]
Treat GSSAPI error codes as unsigned.
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>
Kevin Coffman [Thu, 8 Feb 2007 22:26:59 +0000 (17:26 -0500)]
Add AM_MAINTAINER_MODE to configure.in
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>
Kevin Coffman [Thu, 8 Feb 2007 22:26:53 +0000 (17:26 -0500)]
Touch up some of the autotools files
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>
Neil Brown [Mon, 5 Feb 2007 04:37:55 +0000 (15:37 +1100)]
Make UDP sockets not blocking
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.
J. Bruce Fields [Thu, 1 Feb 2007 17:38:47 +0000 (12:38 -0500)]
Update README
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>
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.