summaryrefslogtreecommitdiff
path: root/scheduler
diff options
context:
space:
mode:
authormbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-30 00:51:18 +0000
committermbligh <mbligh@592f7852-d20e-0410-864c-8624ca9c26a4>2009-01-30 00:51:18 +0000
commitd97e755475e35183d3439b84533b4531f495eb31 (patch)
tree8398505eeb811bf12c42090080c8a556aa7422cc /scheduler
parent9abeb7f6da86d4670308b759463227788bdd2684 (diff)
Fail quickly if we are accidentally started as root
Signed-off-by: Rachel Kroll <rkroll@google.com> git-svn-id: svn://test.kernel.org/autotest/trunk@2714 592f7852-d20e-0410-864c-8624ca9c26a4
Diffstat (limited to 'scheduler')
-rw-r--r--scheduler/monitor_db_babysitter5
1 files changed, 5 insertions, 0 deletions
diff --git a/scheduler/monitor_db_babysitter b/scheduler/monitor_db_babysitter
index 86bd6e73..0e0e2773 100644
--- a/scheduler/monitor_db_babysitter
+++ b/scheduler/monitor_db_babysitter
@@ -89,6 +89,11 @@ class MonitorProc:
bprint("initializing")
+
+if os.getuid() == 0:
+ print "run as root! aborting!"
+ sys.exit(1)
+
while True:
proc = MonitorProc(do_recovery=recover)
time.sleep(PAUSE_LENGTH)