summaryrefslogtreecommitdiffstats
path: root/utils/idmapd
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Don't always use default mapping to "nobody".J. Bruce Fields2006-10-171-17/+35
| | | | | | | | | | | | | | | | | | 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>
* Merge branch 'master' of git://linux-nfs.org/nfs-utilsGreg Banks2006-07-032-7/+16
|\
| * Further coverity related cleanups.Neil Brown2006-06-231-2/+5
| | | | | | | | | | Greg Banks suggested some variations, particularly improved use of xmalloc/xstrdup functions. Thanks.
| * Fix various issues discovered by CoverityNeil Brown2006-06-232-6/+12
| | | | | | | | Thanks to Michael Halcrow for finding them.
* | Fix a number of the easier compile warnings: unused variables,Greg Banks2006-06-221-3/+4
| | | | | | | | unused labels, constness, signedness.
* | Detect presence of nfs4_set_debug() in libnfsidmap andGreg Banks2006-06-221-0/+2
|/ | | | don't bother calling it if it's missing.
* Minor man page tidyupNeil Brown2006-06-051-6/+6
|
* Remove **/Makefile.in, aclocal.m4, configure, andNeil Brown2006-04-171-659/+0
| | | | | | support/include/config.h.in from source control These are auto autogenerated by aclocal -I aclocal ; autoheader ; automake ; autoconf
* 2006-04-10 NeilBrown <neilb@suse.de>neilbrown2006-04-101-2/+3
| | | | | | | | | | | | | Various paranoia checks: gssd_proc.c: pass max_field sizes to sscanf to avoid buffer overflow svcgssd_proc.c: range_check name.length, to ensure name.length+1 doesn't wrap idmapd.c(nfsdcb): make sure at least one byte is read before zeroing the last byte that was read, otherwise memory corruption is possible. Found by SuSE security audit.
* 2006-04-10 "Kevin Coffman" <kwc@citi.umich.edu>neilbrown2006-04-101-0/+2
| | | | | Check for sufficient version of librpcsecgss and libgssapi in configure.in
* 2006-04-10 "Kevin Coffman" <kwc@citi.umich.edu>neilbrown2006-04-101-0/+2
| | | | | Update aclocal/tcp-wrappers.m4 to define HAVE_LIBWRAP and HAVE_TCP_WRAPPERS as appropriate.
* aclocal/autoconf/automake, properly this time.neilbrown2006-03-281-0/+4
|
* User-selectable idmapping cache lifetimeneilbrown2006-03-281-3/+38
| | | | | | Read and process new configuration option, Cache-Expiration, and use the value to determine how long idmapping entries are cached. (Really this time)
* Set libnfsidmap library debugging level and logging function.neilbrown2006-03-261-1/+7
| | | | | | This patch adds a call to the new libnfsidmap library function nfs4_set_debug(), which defines the verbosity level libnfsidmap should use as well as the logging function.
* Don't close file descriptor until after calling event_del().neilbrown2006-03-261-2/+2
| | | | | Delete event processing for a file descriptor before closing it. This was causing hangs when used in combination with libevent-1.0b.
* Remove all the Makefilesneilbrown2005-12-201-13/+0
|
* More automake stuffneilbrown2005-12-201-0/+651
|
* Autogen updateneilbrown2005-12-201-0/+70
|
* Updates from Kevin Coffman at UMichneilbrown2005-12-161-63/+144
|
* idmapd update from Steve Dicksonneilbrown2005-11-031-23/+24
|
* Assorted changes from Steve Dicksonneilbrown2005-10-062-13/+10
|
* 2005-08-26 Kevin Coffman <kwc@citi.umich.edu>neilbrown2005-08-261-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * utils/exportfs/exports.man: Document the "crossmnt" export export option * utils/gssd/krb5_util.c: Add better debugging and partially revert the function check for gss_krb5_ccache_name. For MIT Kerberos releases up to and including 1.3.1, we *must* use the routine gss_krb5_ccache_name to get the K5 gssapi code to use a different credentials cache. For releases 1.3.2 and on, we want to use the KRB5CCNAME environment variable to tell it what to use. (A problem was reported where 1.3.5 was being used, our code was using gss_krb5_ccache_name, but the underlying code continued to use the first (or default?) credentials cache. Switching to using the env variable fixed the problem. I cannot recreate this problem. *utils/gssd/krb5_util.c: Andrew Mahone <andrew.mahone@gmail.com> reported that reiser4 always has DT_UNKNOWN. He supplied patch to move the check for regular files after the stat() call to correctly find ccache files in reiser4 filesystem. Also change the name comparison so that the wrong file is not selected when the substring comparison is done. *utils/gssd/krb5_util.c: Limit the set of encryption types that can be negotiated by the Kerberos library to those that the kernel code currently supports. This should eventually query the kernel for the list of supported enctypes. *utils/gssd/gss_util.c, utils/svcgssd/svcgssd_main_loop.c: Print more information in error messages to help debugging failures. *utils/svcgssd/svcgssd_proc.c: Increase token buffer size and update error handling so that a response is always sent. *utils/svcgssd/svcgssd_proc.c: Add support to retrieve supplementary groups.
* 2005-08-26 Kevin Coffman <kwc@citi.umich.edu>neilbrown2005-08-261-5/+38
| | | | | | | | | | | | | | | | | | | | | | | | * configure.in etc Consolidate some of the Kerberos checking instead of repeating the same things for MIT and Heimdal. Also adds more checks to distinguish 32-bit from 64-bit (mainly for gssapi.h) Fix svcgssd Makefile so make TOP=../../ works correctly there. Enable running a modern autoheader. * utils/gssd/gss_oids.c: Use correct OID value for SPKM-3 * utils/gssd/gss_util.c: Fix build with older MIT releases that do not define GSS_C_NT_HOSTBASED_SERVICE * utils/gssd/write_bytes.h, support/include/gssapi/gssapi.h: Length of gss_buffer_desc is a size_t which is 64-bits on a 64-bit machine. Kernel code expects 32-bit integer for length. Coerce length value into a 32-bit value when reading from or writing to the kernel. Change gssapi.h to use datatype size values obtained from configure rather than hard-coded values. * utils/idmapd/idmapd.c: The EV_INIT check here was wrong, and was causing idmapd to become unresponsive to server requests after receiving a sighup. * utils/idmapd/idmapd.c: Idmapd should flush the server id<->name caches when its started.
* Added TOP, as needed, for easier compile in subdirectoriesgmorris2005-04-121-1/+2
|
* *** empty log message ***neilbrown2004-11-221-29/+4
|
* further idmapd updateneilbrown2004-11-221-2/+71
|
* more idmapd updatesneilbrown2004-11-221-1/+43
|
* idmapd updatesneilbrown2004-11-221-19/+30
|
* Add the idmapd files...neilbrown2004-09-1513-0/+2808