File autofs-5.0.6-fix-fix-map-source-check-in-file-lookup.patch of Package autofs.import5769

commit 939b1e8973becb8497645fd5af75511004fd96d8
Author: Ian Kent <raven@themaw.net>
Date:   Thu Dec 1 15:28:08 2011 +0800

    autofs-5.0.6 - fix fix map source check in file lookup
    
    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.

Index: autofs-5.0.5/CHANGELOG
===================================================================
--- autofs-5.0.5.orig/CHANGELOG
+++ autofs-5.0.5/CHANGELOG
@@ -88,6 +88,7 @@
 - code analysis fixes part 1.
 - fix wait for master source mutex.
 - fix submount shutdown race.
+- fix fix map source check in file lookup.
 
 03/09/2009 autofs-5.0.5
 -----------------------
Index: autofs-5.0.5/modules/lookup_file.c
===================================================================
--- autofs-5.0.5.orig/modules/lookup_file.c
+++ autofs-5.0.5/modules/lookup_file.c
@@ -1046,7 +1046,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;
openSUSE Build Service is sponsored by