Blob Blame History Raw
autofs-5.1.4 - fix age setting at startup

From: Ian Kent <raven@themaw.net>

Commit 2b567ace7d, which resets the master map list on startup
before retrying a read, incorrectly sets age using time() when
it should use monotonic_time().

This causes lookup failures for submounts in cases where a master
map read retry was needed.

The failure happens becuase the mount entry age is greater than
the map entry age which is meant to indicate the map is no longer
valid which is not the case.

Signed-off-by: Ian Kent <raven@themaw.net>
---
 CHANGELOG          |    1 +
 daemon/automount.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- autofs-5.1.4.orig/CHANGELOG
+++ autofs-5.1.4/CHANGELOG
@@ -27,6 +27,7 @@ xx/xx/2018 autofs-5.1.5
 - fix fd leak in rpc_do_create_client().
 - add-man page note about extra slashes in paths.
 - covarity fixes.
+- fix age setting at startup.
 
 19/12/2017 autofs-5.1.4
 - fix spec file url.
--- autofs-5.1.4.orig/daemon/automount.c
+++ autofs-5.1.4/daemon/automount.c
@@ -2606,7 +2606,7 @@ int main(int argc, char *argv[])
 			 * we have anyway.
 			 */
 			do_master_list_reset(master_list);
-			age = time(NULL);
+			age = monotonic_time(NULL);
 			master_read_master(master_list, age, 1);
 		}
 	}