Root plugins (#35)

* root plugins

plugins can now specify if they want their methods to be ran as root. this is done via the multiprocess module. method calls are delegated to a separate process that is then down-privileged by default to user 1000, so the loader can safely be ran as root

except it isn't really safe because the plugin is imported as root anyway

* working implementation

- follows the new plugin format with the plugin.json file
- plugins are loaded in their own isolated process along with their own event loop and unix socket server for calling methods
- private methods are now prepended with _ instead of __

* converted format to f-strings
This commit is contained in:
marios
2022-04-13 02:14:44 +03:00
committed by GitHub
parent 0359fd966a
commit e3d7b50bd9
3 changed files with 105 additions and 29 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
aiohttp==3.8.1
aiohttp-jinja2==1.5.0
watchdog==2.1.7
watchdog==2.1.7
multiprocess==0.70.12.2