autofs-5.1.6 - check defaults_read_config() return From: Ian Kent The calls made to defaults_read_config() don't check the return, fix that. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e38a1dc5..23114e7f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -70,6 +70,7 @@ xx/xx/2020 autofs-5.1.7 - move lib/master.c to daemon/master.c. - use master_list_empty() for list empty check. - add helper to construct mount point path. +- check defaults_read_config() return. 07/10/2019 autofs-5.1.6 - support strictexpire mount option. diff --git a/daemon/automount.c b/daemon/automount.c index 5b8e04d8..e476f6b2 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -1510,7 +1510,11 @@ static void *do_read_master(void *arg) if (status) fatal(status); - defaults_read_config(1); + if (!defaults_read_config(1)) { + error(logopt, "failed to read configuration, exiting"); + master->reading = 0; + pthread_exit(NULL); + } info(logopt, "re-reading master map %s", master->name); @@ -2305,7 +2309,11 @@ int main(int argc, char *argv[]) program = argv[0]; - defaults_read_config(0); + if (!defaults_read_config(0)) { + printf("%s: failed to read configuration, exiting", + program); + exit(1); + } nfs_mount_uses_string_options = check_nfs_mount_version(&vers, &check);