autofs-5.0.1 - fix direct map not updating on reread From: Ian Kent <raven@themaw.net> If the map type is explicitly specified for a map the map isn't properly updated when a re-read is requested. This is because the map stale flag is incorrectly cleared after after the lookup module reads the map instead of at the completion of the update procedure. The map stale flag should only be cleared if the map read fails for some reason, otherwise it is updated when the refresh is completed. --- daemon/lookup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- autofs-5.0.1.orig/daemon/lookup.c +++ autofs-5.0.1/daemon/lookup.c @@ -287,7 +287,8 @@ static int do_read_map(struct autofs_poi status = lookup->lookup_read_map(ap, age, lookup->context); - map->stale = 0; + if (status != NSS_STATUS_SUCCESS) + map->stale = 0; /* * For maps that don't support enumeration return success