aboutsummaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorNeula <thomas@famsim.de>2018-10-28 14:45:08 +0100
committerAnthony G. Basile <blueness@gentoo.org>2018-10-29 07:42:31 -0400
commit7b16ed130f2ab2a38562726023fda23d40634038 (patch)
tree57dba1472ed4b7fa39dae1f7d6ea128bb3085a03 /net-fs
parentsys-libs/compiler-rt-sanitizers: sync KEYWORDS with tree (diff)
downloadmusl-7b16ed130f2ab2a38562726023fda23d40634038.tar.gz
musl-7b16ed130f2ab2a38562726023fda23d40634038.tar.bz2
musl-7b16ed130f2ab2a38562726023fda23d40634038.zip
net-fs/autofs: fix segfault when using automount with --debug flag
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/autofs/autofs-5.1.4.ebuild3
-rw-r--r--net-fs/autofs/files/autofs-early-pthread_key_create.patch42
2 files changed, 44 insertions, 1 deletions
diff --git a/net-fs/autofs/autofs-5.1.4.ebuild b/net-fs/autofs/autofs-5.1.4.ebuild
index 3546185..71bf379 100644
--- a/net-fs/autofs/autofs-5.1.4.ebuild
+++ b/net-fs/autofs/autofs-5.1.4.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
@@ -47,6 +47,7 @@ CONFIG_CHECK="~AUTOFS4_FS"
PATCHES=(
"${FILESDIR}"/${PN}-musl.patch
+ "${FILESDIR}"/${PN}-early-pthread_key_create.patch
)
src_prepare() {
diff --git a/net-fs/autofs/files/autofs-early-pthread_key_create.patch b/net-fs/autofs/files/autofs-early-pthread_key_create.patch
new file mode 100644
index 0000000..6e59812
--- /dev/null
+++ b/net-fs/autofs/files/autofs-early-pthread_key_create.patch
@@ -0,0 +1,42 @@
+Fixes segfault when launching autofs with debugging info
+
+--- autofs-5.1.4/daemon/automount.c 2017-12-19 03:46:44.000000000 +0100
++++ autofs-5.1.4/daemon/automount.c 2018-10-28 12:45:28.388254819 +0100
+@@ -2495,16 +2495,10 @@ int main(int argc, char *argv[])
+ macro_free_global_table();
+ exit(1);
+ }
+-
+- info(logging, "Starting automounter version %s, master map %s",
+- version, master_list->name);
+- info(logging, "using kernel protocol version %d.%02d",
+- get_kver_major(), get_kver_minor());
+-
+- status = pthread_key_create(&key_thread_stdenv_vars,
+- key_thread_stdenv_vars_destroy);
++
++ status = pthread_key_create(&key_thread_attempt_id, free);
+ if (status) {
+- logerr("%s: failed to create thread data key for std env vars!",
++ logerr("%s: failed to create thread data key for attempt ID!",
+ program);
+ master_kill(master_list);
+ res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));
+@@ -2513,10 +2507,15 @@ int main(int argc, char *argv[])
+ macro_free_global_table();
+ exit(1);
+ }
++ info(logging, "Starting automounter version %s, master map %s",
++ version, master_list->name);
++ info(logging, "using kernel protocol version %d.%02d",
++ get_kver_major(), get_kver_minor());
+
+- status = pthread_key_create(&key_thread_attempt_id, free);
++ status = pthread_key_create(&key_thread_stdenv_vars,
++ key_thread_stdenv_vars_destroy);
+ if (status) {
+- logerr("%s: failed to create thread data key for attempt ID!",
++ logerr("%s: failed to create thread data key for std env vars!",
+ program);
+ master_kill(master_list);
+ res = write(start_pipefd[1], pst_stat, sizeof(*pst_stat));