diff options
author | Link Mauve <linkmauve@example.com> | 2019-02-26 22:36:42 +0100 |
---|---|---|
committer | Link Mauve <linkmauve@example.com> | 2019-02-26 22:36:42 +0100 |
commit | 738dfe0e9af0e82f5e721818763a06b66f219b3b (patch) | |
tree | aebe46413a3aaae247b825de0354267201e6443d | |
parent | cc104f10802721d0a9728f5e55989619c3a4eb1b (diff) | |
parent | 8af787e3781b917e5875127592e4e986677f345a (diff) | |
download | poezio-738dfe0e9af0e82f5e721818763a06b66f219b3b.tar.gz poezio-738dfe0e9af0e82f5e721818763a06b66f219b3b.tar.bz2 poezio-738dfe0e9af0e82f5e721818763a06b66f219b3b.tar.xz poezio-738dfe0e9af0e82f5e721818763a06b66f219b3b.zip |
Merge branch 'root-bailout' into 'master'
Prevent poezio from being run as root
See merge request poezio/poezio!20
-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 |