Blame SOURCES/autofs-5.1.4-fix-age-setting-at-startup.patch

d5dcad
autofs-5.1.4 - fix age setting at startup
d5dcad
d5dcad
From: Ian Kent <raven@themaw.net>
d5dcad
d5dcad
Commit 2b567ace7d, which resets the master map list on startup
d5dcad
before retrying a read, incorrectly sets age using time() when
d5dcad
it should use monotonic_time().
d5dcad
d5dcad
This causes lookup failures for submounts in cases where a master
d5dcad
map read retry was needed.
d5dcad
d5dcad
The failure happens because the mount entry age is greater than
d5dcad
the map entry age which is meant to indicate the map is no longer
d5dcad
valid which is not the case.
d5dcad
d5dcad
Signed-off-by: Ian Kent <raven@themaw.net>
d5dcad
---
d5dcad
 CHANGELOG          |    1 +
d5dcad
 daemon/automount.c |    2 +-
d5dcad
 2 files changed, 2 insertions(+), 1 deletion(-)
d5dcad
d5dcad
--- autofs-5.1.4.orig/CHANGELOG
d5dcad
+++ autofs-5.1.4/CHANGELOG
d5dcad
@@ -32,6 +32,7 @@ xx/xx/2018 autofs-5.1.5
d5dcad
 - mark removed cache entry negative.
d5dcad
 - set bind mount as propagation slave.
d5dcad
 - add master map pseudo options for mount propagation.
d5dcad
+- fix age setting at startup.
d5dcad
 
d5dcad
 19/12/2017 autofs-5.1.4
d5dcad
 - fix spec file url.
d5dcad
--- autofs-5.1.4.orig/daemon/automount.c
d5dcad
+++ autofs-5.1.4/daemon/automount.c
d5dcad
@@ -2610,7 +2610,7 @@ int main(int argc, char *argv[])
d5dcad
 			 * we have anyway.
d5dcad
 			 */
d5dcad
 			do_master_list_reset(master_list);
d5dcad
-			age = time(NULL);
d5dcad
+			age = monotonic_time(NULL);
d5dcad
 			master_read_master(master_list, age, 1);
d5dcad
 		}
d5dcad
 	}