summaryrefslogtreecommitdiffstats
path: root/stap-serverd
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2010-02-02 08:28:16 -0500
committerDave Brolley <brolley@redhat.com>2010-02-02 08:28:16 -0500
commit743757687f9c09bf9ef84b576bc0aa0fc19dea4c (patch)
treebe77bd3f7d03be09774a25f7260182941e99907a /stap-serverd
parent241443ad36a5a2cacb9e8e6f12f808d304835f2a (diff)
parentcc57beca8d9d168ef42edb1f8b43f594105dfdf2 (diff)
downloadsystemtap-steved-743757687f9c09bf9ef84b576bc0aa0fc19dea4c.tar.gz
systemtap-steved-743757687f9c09bf9ef84b576bc0aa0fc19dea4c.tar.xz
systemtap-steved-743757687f9c09bf9ef84b576bc0aa0fc19dea4c.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'stap-serverd')
-rwxr-xr-xstap-serverd13
1 files changed, 12 insertions, 1 deletions
diff --git a/stap-serverd b/stap-serverd
index 4d8a10ce..fc186233 100755
--- a/stap-serverd
+++ b/stap-serverd
@@ -2,7 +2,7 @@
# Compile server manager for systemtap
#
-# Copyright (C) 2008, 2009 Red Hat Inc.
+# Copyright (C) 2008-2010 Red Hat Inc.
#
# This file is part of systemtap, and is free software. You can
# redistribute it and/or modify it under the terms of the GNU General
@@ -19,6 +19,17 @@ trap 'terminate' SIGTERM SIGINT
# Initialize the environment
. ${PKGLIBEXECDIR}stap-env
+# PR11197: security prophylactics
+if [ -z "$STAP_PR11197_OVERRIDE" ]; then
+ # 1) reject use as root, except via a special environment variable
+ if [ `id -u` -eq 0 ]; then
+ echo "For security reasons, invocation of stap-server as root is not supported." 1>&2
+ exit 1
+ fi
+ # 2) ... etc ...
+fi
+
+
#-----------------------------------------------------------------------------
# Helper functions.
#-----------------------------------------------------------------------------