autofs-5.1.8 - fix additional tsv invalid access From: Ian Kent When using the --dumpmaps option of automount(8) a SEGV can occur because a thread specific data variable accessed in the code hasn't yet been created. There is another thread specific data variable that is accessed when dumping the maps so it needs to be created too. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index af95ba1f..4658deed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -49,6 +49,7 @@ - fix memory leak in update_hosts_mounts(). - fix minus only option handling in concat_options(). - fix incorrect path for is_mounted() in try_remount(). +- fix additional tsv invalid access. 19/10/2021 autofs-5.1.8 - add xdr_exports(). diff --git a/daemon/automount.c b/daemon/automount.c index f550bc8f..64e95ee9 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -2569,6 +2569,14 @@ int main(int argc, char *argv[]) exit(1); } + status = pthread_key_create(&key_thread_attempt_id, free); + if (status) { + logerr("%s: failed to create thread data key for attempt ID!", + program); + macro_free_global_table(); + exit(1); + } + if (master) master_list = master_new(NULL, timeout, flags); else