Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 533aea79872ccd7be2635d272acbf7ea > files > 58

autofs-5.0.1-0.rc2.163.el5.src.rpm

autofs-5.0.1 - fix fix map source check in file lookup

From: Ian Kent <raven@themaw.net>

A recent change to correct a problem with included map entry removal
has broken a different case of included map key lookup. The check in
previous patch was too broad and caused map key lookup for keys in an
included multi-mount map entrys to not be found.
---

 modules/lookup_file.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--- autofs-5.0.1.orig/modules/lookup_file.c
+++ autofs-5.0.1/modules/lookup_file.c
@@ -1124,7 +1124,7 @@ do_cache_lookup:
 	 * instance (same map entry cache), not in a distinct source.
 	 */
 	if (me && (!me->mapent || 
-	   (ap->type == LKP_INDIRECT && me->source != source))) {
+	   (me->source != source && *me->key != '/'))) {
 		while ((me = cache_lookup_key_next(me)))
 			if (me->source == source)
 				break;