From b65c7c3182441543cc00fedda5af87612e218bde Mon Sep 17 00:00:00 2001 From: bnewbold Date: Wed, 11 Jul 2012 17:03:38 -0400 Subject: root check --- exmachina.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'exmachina.py') diff --git a/exmachina.py b/exmachina.py index cb909ef..254fc10 100755 --- a/exmachina.py +++ b/exmachina.py @@ -122,6 +122,9 @@ class ExMachinaClient(): def run_server(socket_path="/tmp/exmachina.sock"): # TODO: check for root permissions, warn if not root + if not 0 == os.geteuid(): + log.warn("Expected to be running as root!") + if os.path.exists(socket_path): os.unlink(socket_path) sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) -- cgit v1.2.3