diff options
| author | Chris Simons <35010457+simons-public@users.noreply.github.com> | 2022-08-24 17:22:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-24 17:22:07 -0700 |
| commit | b9a87cd78587d606a250415e3681d5e306f98db9 (patch) | |
| tree | 181ab9cce7f725dfe871e3d0b2bdad7e718c003d /backend/plugin.py | |
| parent | 98e9ce881f8df4647be2181f4af379a86bfb090e (diff) | |
| download | decky-loader-b9a87cd78587d606a250415e3681d5e306f98db9.tar.gz decky-loader-b9a87cd78587d606a250415e3681d5e306f98db9.zip | |
set gid along with uid (#152)
Diffstat (limited to 'backend/plugin.py')
| -rw-r--r-- | backend/plugin.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/backend/plugin.py b/backend/plugin.py index f55e398c..04ba285d 100644 --- a/backend/plugin.py +++ b/backend/plugin.py @@ -5,7 +5,7 @@ from asyncio import (Lock, get_event_loop, new_event_loop, from concurrent.futures import ProcessPoolExecutor from importlib.util import module_from_spec, spec_from_file_location from json import dumps, load, loads -from os import path, setuid +from os import path, setgid, setuid from signal import SIGINT, signal from sys import exit from time import time @@ -49,6 +49,7 @@ class PluginWrapper: set_event_loop(new_event_loop()) if self.passive: return + setgid(0 if "root" in self.flags else 1000) setuid(0 if "root" in self.flags else 1000) spec = spec_from_file_location("_", self.file) module = module_from_spec(spec) |
