Prevent poezio from being run as root

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-02-26 21:32:26 +00:00
parent 4e231185f5
commit 8af787e378
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

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