mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-10 07:29:28 +00:00
94389f2102
Python scripts present in the same directory as the tool override regular modules. Fixes: #cat > /usr/bin/signal.py <<EOF import sys print("BAD GUY!", file=sys.stderr) sys.exit(1) EOF #sandbox date BAD GUY! Signed-off-by: Vit Mojzis <vmojzis@redhat.com> Acked-by: James Carter <jwcart2@gmail.com>
14 lines
250 B
Python
14 lines
250 B
Python
#!/usr/bin/python3 -EsI
|
|
try:
|
|
from subprocess import getstatusoutput
|
|
except ImportError:
|
|
from commands import getstatusoutput
|
|
import sys
|
|
rc = [-1, '']
|
|
try:
|
|
rc = getstatusoutput(sys.argv[1])
|
|
except:
|
|
pass
|
|
if rc[0] == 0:
|
|
print(rc[1])
|