mirror of
git://git.yoctoproject.org/poky
synced 2026-09-16 23:15:40 +00:00
Recent patches were applied which removed a function which set the xx variable. This means xx can be uninitalised and prerm functions can fail. This adjusts the patch to ensure the xx value isn't used in such a way. (From OE-Core rev: 3feebf7d28ef1049075a9d2ad3d64fc9b35015f2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
41 lines
1.2 KiB
Diff
41 lines
1.2 KiB
Diff
From ffb5301a8594140ad7a58bc0f2053be8ca2b2946 Mon Sep 17 00:00:00 2001
|
|
From: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
Date: Fri, 20 Jan 2017 13:32:06 +0200
|
|
Subject: [PATCH 1/2] Do not reset the PATH environment variable before running
|
|
scriptlets.
|
|
|
|
We add lots of native stuff into it and scriptlets rely on that.
|
|
|
|
Also need to remove the xx test later in the function since the
|
|
value could now be used un-initialised.
|
|
|
|
Upstream-Status: Inappropriate [oe-core specific]
|
|
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
|
|
---
|
|
lib/rpmscript.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/lib/rpmscript.c b/lib/rpmscript.c
|
|
index 92f949fa2..7c1aa75a8 100644
|
|
--- a/lib/rpmscript.c
|
|
+++ b/lib/rpmscript.c
|
|
@@ -201,7 +201,7 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
|
|
if (ipath && ipath[5] != '%')
|
|
path = ipath;
|
|
|
|
- xx = setenv("PATH", path, 1);
|
|
+ //xx = setenv("PATH", path, 1);
|
|
free(ipath);
|
|
}
|
|
|
|
@@ -206,9 +206,7 @@ static void doScriptExec(ARGV_const_t ar
|
|
/* XXX Don't mtrace into children. */
|
|
unsetenv("MALLOC_CHECK_");
|
|
|
|
- if (xx == 0) {
|
|
xx = execv(argv[0], argv);
|
|
- }
|
|
}
|
|
_exit(127); /* exit 127 for compatibility with bash(1) */
|
|
}
|