Blame SOURCES/autofs-5.1.7-Fix-option-for-master_read_wait.patch

29d2b9
autofs-5.1.7 - Fix option for master read wait
29d2b9
29d2b9
From: Goldwyn Rodrigues <rgoldwyn@suse.de>
29d2b9
29d2b9
The master-wait program option expects a value, and if provided
29d2b9
automount crashes with the following trace:
29d2b9
29d2b9
#0  __GI_____strtoul_l_internal (nptr=0x0, endptr=0x7fffffffe120, base=0, group=<optimized out>,
29d2b9
    loc=0x7ffff77a63a0 <_nl_global_locale>) at ../stdlib/strtol_l.c:292
29d2b9
#1  0x0000555555562c52 in getnumopt ()
29d2b9
#2  0x0000555555564ec0 in main ()
29d2b9
29d2b9
This is because the options string is not correct and does not expect
29d2b9
an argument for master-wait (M), which sets optarg to NULL.
29d2b9
29d2b9
Fixes: e68f07f ("autofs-5.1.2 - add master read wait option")
29d2b9
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
29d2b9
Signed-off-by: Ian Kent <raven@themaw.net>
29d2b9
---
29d2b9
 CHANGELOG          |    1 +
29d2b9
 daemon/automount.c |    2 +-
29d2b9
 2 files changed, 2 insertions(+), 1 deletion(-)
29d2b9
29d2b9
diff --git a/CHANGELOG b/CHANGELOG
29d2b9
index fe49740e..0b577909 100644
29d2b9
--- a/CHANGELOG
29d2b9
+++ b/CHANGELOG
29d2b9
@@ -4,6 +4,7 @@
29d2b9
 - dont use realloc in host exports list processing.
29d2b9
 - use sprintf() when constructing hosts mapent.
29d2b9
 - fix mnts_remove_amdmount() uses wrong list.
29d2b9
+- Fix option for master read wait.
29d2b9
 
29d2b9
 25/01/2021 autofs-5.1.7
29d2b9
 - make bind mounts propagation slave by default.
29d2b9
diff --git a/daemon/automount.c b/daemon/automount.c
29d2b9
index e476f6b2..7fa92877 100644
29d2b9
--- a/daemon/automount.c
29d2b9
+++ b/daemon/automount.c
29d2b9
@@ -2274,7 +2274,7 @@ int main(int argc, char *argv[])
29d2b9
 	time_t timeout;
29d2b9
 	time_t age = monotonic_time(NULL);
29d2b9
 	struct rlimit rlim;
29d2b9
-	const char *options = "+hp:t:vmdD:SfVrO:l:n:CFUM";
29d2b9
+	const char *options = "+hp:t:vmdD:SfVrO:l:n:CFUM:";
29d2b9
 	static const struct option long_options[] = {
29d2b9
 		{"help", 0, 0, 'h'},
29d2b9
 		{"pid-file", 1, 0, 'p'},