mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-01 23:08:09 +00:00
python: Harden tools against "rogue" modules
Python scripts present in "/usr/sbin" override regular modules. Make sure /usr/sbin is not present in PYTHONPATH. Fixes: #cat > /usr/sbin/audit.py <<EOF import sys print("BAD GUY!", file=sys.stderr) sys.exit(1) EOF #semanage boolean -l BAD GUY! Signed-off-by: Vit Mojzis <vmojzis@redhat.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
950cc5b54a
commit
48602370ac
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3 -Es
|
||||
#!/usr/bin/python3 -EsI
|
||||
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
|
||||
# Authors: Dan Walsh <dwalsh@redhat.com>
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3 -Es
|
||||
#!/usr/bin/python3 -EsI
|
||||
#
|
||||
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3 -Es
|
||||
#!/usr/bin/python3 -EsI
|
||||
# Copyright (C) 2005 Red Hat
|
||||
# see file 'COPYING' for use and warranty information
|
||||
#
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3 -Es
|
||||
#!/usr/bin/python3 -EsI
|
||||
# Copyright (C) 2012-2013 Red Hat
|
||||
# AUTHOR: Miroslav Grepl <mgrepl@redhat.com>
|
||||
# AUTHOR: David Quigley <selinux@davequigley.com>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/python3 -Es
|
||||
#!/usr/bin/python3 -EsI
|
||||
# Copyright (C) 2012 Red Hat
|
||||
# AUTHOR: Dan Walsh <dwalsh@redhat.com>
|
||||
# see file 'COPYING' for use and warranty information
|
||||
|
Loading…
Reference in New Issue
Block a user