Commit 956dea7a authored by Marco Mariani's avatar Marco Mariani

program fails if run as root

parent 13de3916
......@@ -103,6 +103,10 @@ def run():
config = Config()
config.setConfig(*Parser(usage=usage).check_args())
if os.getuid() == 0:
# avoid mistakes (mainly in development mode)
raise Exception('Do not run SlapRunner as root.')
serve(config)
return_code = 0
except SystemExit, err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment