autofs-5.0.5 - fix direct map not updating on reread From: Ian Kent 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. --- CHANGELOG | 1 + daemon/lookup.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e05038b..46eb3ce 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -51,6 +51,7 @@ - fix init script restart option. - fix init script status privilege error. - always read file maps mount lookup map read fix. +- fix direct map not updating on reread. 03/09/2009 autofs-5.0.5 ----------------------- diff --git a/daemon/lookup.c b/daemon/lookup.c index a4bd07f..a9a1f4d 100644 --- a/daemon/lookup.c +++ b/daemon/lookup.c @@ -295,7 +295,8 @@ static int do_read_map(struct autofs_point *ap, struct map_source *map, time_t a 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