blob: 99cf23fbb21ffc8a89cf4c6175e43cc9e457f1c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
fix regexp match against `file /proc/$$/exe` for -fPIE bash
Now that bash is built with PIE enabled, keyutils' check for endianness
fails because file no longer returns "executable", but instead returns
"shared object" for file << 5.33 and "pie executable" for file >= 5.33.
--- a/tests/toolbox.inc.sh
+++ b/tests/toolbox.inc.sh
@@ -13,10 +13,10 @@
echo === $OUTPUTFILE ===
endian=`file -L /proc/$$/exe`
-if expr "$endian" : '.* MSB \+\(executable\|shared object).*' >&/dev/null
+if expr "$endian" : '.* MSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null
then
endian=BE
-elif expr "$endian" : '.* LSB \+\(executable\|shared object\).*' >&/dev/null
+elif expr "$endian" : '.* LSB \+\(executable\|shared object\|pie executable\).*' >&/dev/null
then
endian=LE
else
|