From c731f2a752ee4159b0e74b72b66fdeecf399c844 Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Oct 10 2024 18:52:14 +0000 Subject: shim: Prevent running as root Signed-off-by: Janne Grunau --- diff --git a/shim.py b/shim.py index c6b1423..245caf9 100644 --- a/shim.py +++ b/shim.py @@ -17,6 +17,10 @@ MANIFEST = [ 'steam-launcher/bootstraplinux_ubuntu12_32.tar.xz', ] +# prevent user from running as root +if os.geteuid() == 0: + sys.exit(f"Do not run `{sys.argv[0]}` as root") + # These flags workaround sommelier bugs around both background transparency and # input. STEAM_ARGS = ["-cef-force-occlusion", "-cef-force-opaque-backgrounds", "-gamepadui"] diff --git a/steam.spec b/steam.spec index 61fdb91..25c06e8 100644 --- a/steam.spec +++ b/steam.spec @@ -1,6 +1,6 @@ Name: steam Version: 0 -Release: 10%{?dist} +Release: 11%{?dist} Summary: Steam wrapper for Fedora Asahi Remix License: MIT @@ -69,7 +69,10 @@ appstream-util validate-relax --nonet \ %{_metainfodir}/io.pagure.fedora_asahi.steam.metainfo.xml %changelog -* Wed Oct 09 2024 Janne Grunau - 0-12 +* Thu Oct 10 2024 Janne Grunau - 0-11 +- shim: Prevent running as root + +* Wed Oct 09 2024 Janne Grunau - 0-10 - Require virglrenderer(asahi) to avoid incompatible packages * Wed Oct 09 2024 Alyssa Rosenzweig - 0-9