summaryrefslogtreecommitdiffstats
path: root/scripts/pkg-config-wrapper
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-10-12 16:08:01 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-10-12 22:48:15 +0200
commit974f2aa064fc302be9cd5250a761d16b3993ceb0 (patch)
treeb661ac662d26c0a9df4f644220ccffc059d6f8ef /scripts/pkg-config-wrapper
parent8f532a4d98012db192a45e7a4e3e703879e42340 (diff)
downloadptxdist-974f2aa064fc302be9cd5250a761d16b3993ceb0.tar.gz
ptxdist-974f2aa064fc302be9cd5250a761d16b3993ceb0.tar.xz
pkg-config-wrapper: don't use check_pipe_status
With the latest bash security fixes, exported shell functions get lost when a script is called indirectly, e.g. bash -> dash -> bash. This can happen when pkg-config-wrapper is called from a configure script. In this case check_pipe_status is no longer defined. Avoid the problem by replacing check_pipe_status with its content. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/pkg-config-wrapper')
-rwxr-xr-xscripts/pkg-config-wrapper6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/pkg-config-wrapper b/scripts/pkg-config-wrapper
index bfd4e4893..b19a845d0 100755
--- a/scripts/pkg-config-wrapper
+++ b/scripts/pkg-config-wrapper
@@ -55,4 +55,8 @@ else
fi
"${PKG_CONFIG}" "${@}" | sed "${args[@]}"
-check_pipe_status
+for _pipe_status in "${PIPESTATUS[@]}"; do
+ if [ ${_pipe_status} -ne 0 ]; then
+ exit ${_pipe_status}
+ fi
+done