summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-14 10:07:33 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-04-14 23:25:54 +0100
commitc5269fd2108d66623515291481c4c24e93be805b (patch)
tree6f8d37404a10be228b88d96d4dabc47e6db6343b /meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
parent0bf9cb2272448adb25d0d9786d069cb004c6c21b (diff)
downloadpoky-c5269fd2108d66623515291481c4c24e93be805b.tar.gz
pseudo: Backport two upstream fixes
Backport fixes from pseudo master for an acl issue and more importantly, a segfault issue with bash which can be triggered by the recent useradd changes. (From OE-Core rev: 949214761998a93fc6b8b009f1cdad0db3bfa5db) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch')
-rw-r--r--meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch b/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
new file mode 100644
index 0000000000..3045a3b736
--- /dev/null
+++ b/meta/recipes-devtools/pseudo/files/b6b68db896f9963558334aff7fca61adde4ec10f.patch
@@ -0,0 +1,48 @@
1From b6b68db896f9963558334aff7fca61adde4ec10f Mon Sep 17 00:00:00 2001
2From: Seebs <seebs@seebs.net>
3Date: Thu, 13 Apr 2017 18:12:01 -0500
4Subject: Prevent bash from segfaulting when unloading pseudo
5
6bash's extremely fancy internal awareness of how the environment looks
7means that, if you directly call the underlying libc "unsetenv" on
8a variable, bash can end up trying to access a null pointer. Fixing
9this generically is actually rather hard; you can't really avoid
10writing to environ on fork() or popen(), even if you change all
11execv*() functions to use the execv*e() variants. So for now, instead
12of unsetting the variable, set it to an empty string.
13
14Thanks to Saur in IRC for spotting this and helping debug it.
15
16Signed-off-by: Seebs <seebs@seebs.net>
17
18Upstream-Status: Backport
19
20diff --git a/ChangeLog.txt b/ChangeLog.txt
21index a2d30e9..8ba1ffa 100644
22--- a/ChangeLog.txt
23+++ b/ChangeLog.txt
24@@ -1,3 +1,8 @@
25+2017-04-13:
26+ * (seebs) don't unset LD_PRELOAD or the like, because if you
27+ do that, bash can segfault because it "knows" how many
28+ fields are in environ.
29+
30 2017-02-24:
31 * (seebs) import posix_acl_default fix from Anton Gerasimov
32 <anton@advancedtelematic.com>
33diff --git a/pseudo_util.c b/pseudo_util.c
34index 172990b..6a1fac2 100644
35--- a/pseudo_util.c
36+++ b/pseudo_util.c
37@@ -844,7 +844,7 @@ void pseudo_dropenv() {
38 if (ld_preload && strlen(ld_preload)) {
39 SETENV(PRELINK_LIBRARIES, ld_preload, 1);
40 } else {
41- UNSETENV(PRELINK_LIBRARIES);
42+ SETENV(PRELINK_LIBRARIES, "", 1);
43 }
44 }
45 }
46--
47cgit v0.10.2
48