|
|
1ae48f |
autofs-5.1.8 - fix invalid tsv access
|
|
|
1ae48f |
|
|
|
1ae48f |
From: Ian Kent <raven@themaw.net>
|
|
|
1ae48f |
|
|
|
1ae48f |
When using the --dumpmaps option of automount(8) a SEGV can occur
|
|
|
1ae48f |
because a thread specific data variable accessed in the code hasn't
|
|
|
1ae48f |
yet been created.
|
|
|
1ae48f |
|
|
|
1ae48f |
The thread specific data doesn't need to be set to list the maps
|
|
|
1ae48f |
so we can create the key and rely on pthread_getspecific() returning
|
|
|
1ae48f |
NULL when the value hasn't been set as this case is handled correctly.
|
|
|
1ae48f |
|
|
|
1ae48f |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
1ae48f |
---
|
|
|
1ae48f |
CHANGELOG | 1 +
|
|
|
1ae48f |
daemon/automount.c | 9 +++++++++
|
|
|
1ae48f |
2 files changed, 10 insertions(+)
|
|
|
1ae48f |
|
|
|
1ae48f |
--- autofs-5.1.7.orig/CHANGELOG
|
|
|
1ae48f |
+++ autofs-5.1.7/CHANGELOG
|
|
|
1ae48f |
@@ -102,6 +102,7 @@
|
|
|
1ae48f |
- bailout on rpc systemerror.
|
|
|
1ae48f |
- fix nfsv4 only mounts should not use rpcbind.
|
|
|
1ae48f |
- dont use initgroups() at spawn.
|
|
|
1ae48f |
+- fix invalid tsv access.
|
|
|
1ae48f |
|
|
|
1ae48f |
25/01/2021 autofs-5.1.7
|
|
|
1ae48f |
- make bind mounts propagation slave by default.
|
|
|
1ae48f |
--- autofs-5.1.7.orig/daemon/automount.c
|
|
|
1ae48f |
+++ autofs-5.1.7/daemon/automount.c
|
|
|
1ae48f |
@@ -2518,6 +2518,15 @@ int main(int argc, char *argv[])
|
|
|
1ae48f |
master = argv[2];
|
|
|
1ae48f |
}
|
|
|
1ae48f |
|
|
|
1ae48f |
+ status = pthread_key_create(&key_thread_stdenv_vars,
|
|
|
1ae48f |
+ key_thread_stdenv_vars_destroy);
|
|
|
1ae48f |
+ if (status) {
|
|
|
1ae48f |
+ logerr("%s: failed to create thread data key for std env vars!",
|
|
|
1ae48f |
+ program);
|
|
|
1ae48f |
+ macro_free_global_table();
|
|
|
1ae48f |
+ exit(1);
|
|
|
1ae48f |
+ }
|
|
|
1ae48f |
+
|
|
|
1ae48f |
if (master)
|
|
|
1ae48f |
master_list = master_new(NULL, timeout, flags);
|
|
|
1ae48f |
else
|