-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python: Harden more tools against "rogue" modules
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 <[email protected]> Acked-by: James Carter <[email protected]>
- Loading branch information
Showing
5 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python3 | ||
#!/usr/bin/python3 -EsI | ||
|
||
import dbus | ||
import dbus.service | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python3 -Es | ||
#!/usr/bin/python3 -EsI | ||
# Authors: Dan Walsh <[email protected]> | ||
# Authors: Thomas Liu <[email protected]> | ||
# Authors: Josh Cogliati | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python3 -Es | ||
#!/usr/bin/python3 -EsI | ||
try: | ||
from subprocess import getstatusoutput | ||
except ImportError: | ||
|