aboutsummaryrefslogtreecommitdiffstats
path: root/exmachina.py
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2012-07-11 17:03:38 -0400
committerbnewbold <bnewbold@robocracy.org>2012-07-11 17:03:38 -0400
commitb65c7c3182441543cc00fedda5af87612e218bde (patch)
treeb905f2630ee3abac3791fdc9093c4a2d5ae779f5 /exmachina.py
parent6c5af08378219dd6d740d004b891befb8a98b764 (diff)
downloadexmachina-b65c7c3182441543cc00fedda5af87612e218bde.tar.gz
exmachina-b65c7c3182441543cc00fedda5af87612e218bde.zip
root check
Diffstat (limited to 'exmachina.py')
-rwxr-xr-xexmachina.py3
1 files changed, 3 insertions, 0 deletions
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)