diff options
author | Maxime “pep” Buquet <pep@bouah.net> | 2019-02-26 21:32:26 +0000 |
---|---|---|
committer | Maxime “pep” Buquet <pep@bouah.net> | 2019-02-26 21:33:50 +0000 |
commit | 8af787e3781b917e5875127592e4e986677f345a (patch) | |
tree | 28e3395a9988bc0d364f48adb430713f144e12da | |
parent | 4e231185f5569a3caf8acd347cd5d7e652ab0ce4 (diff) | |
download | poezio-8af787e3781b917e5875127592e4e986677f345a.tar.gz poezio-8af787e3781b917e5875127592e4e986677f345a.tar.bz2 poezio-8af787e3781b917e5875127592e4e986677f345a.tar.xz poezio-8af787e3781b917e5875127592e4e986677f345a.zip |
Prevent poezio from being run as root
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r-- | poezio/poezio.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/poezio/poezio.py b/poezio/poezio.py index 05c8ceed..82403fdb 100644 --- a/poezio/poezio.py +++ b/poezio/poezio.py @@ -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 |