Skip to content

Commit

Permalink
umu_run: enforce not running the script as root
Browse files Browse the repository at this point in the history
- Related to #73 (comment)
  • Loading branch information
R1kaB3rN committed Mar 28, 2024
1 parent 7371829 commit cc901ce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions umu/umu_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,11 @@ def main() -> int: # noqa: D103
thread: Thread = None
args: Union[Namespace, Tuple[str, List[str]]] = parse_args()

if os.geteuid() == 0:
err: str = "This script should never be run as the root user"
log.error(err)
sys.exit(1)

if "musl" in os.environ.get("LD_LIBRARY_PATH", ""):
err: str = "This script is not designed to run on musl-based systems"
log.error(err)
Expand Down

0 comments on commit cc901ce

Please sign in to comment.