Merge branch 'root-bailout' into 'master'

Prevent poezio from being run as root

See merge request poezio/poezio!20
This commit is contained in:
Link Mauve 2019-02-26 22:36:42 +01:00
commit 738dfe0e9a

View file

@ -72,6 +72,11 @@ def main():
"""
Entry point.
"""
if os.geteuid() == 0:
sys.stdout.write("Please do not run poezio as root.\n")
sys.exit(0)
sys.stdout.write("\x1b]0;poezio\x07")
sys.stdout.flush()
from poezio import config