aboutsummaryrefslogtreecommitdiffstats
path: root/src/sosreport
diff options
context:
space:
mode:
Diffstat (limited to 'src/sosreport')
-rwxr-xr-xsrc/sosreport11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/sosreport b/src/sosreport
index dbfd368d..34f6172f 100755
--- a/src/sosreport
+++ b/src/sosreport
@@ -74,11 +74,6 @@ signal.signal(signal.SIGTERM, exittermhandler)
## multiple SIGTERMs.
## FIXME: Need to figure out how to handle SIGKILL - we can't intercept it.
-
-if os.getuid() != 0:
- print 'You must run sosreport as root!'
- sys.exit(1)
-
# for debugging
__raisePlugins__ = 1
@@ -395,6 +390,12 @@ def sosreport():
print
sys.exit()
+ # to go anywhere further than listing the plugins we will need root permissions.
+ #
+ if os.getuid() != 0:
+ print 'You must run sosreport as root!'
+ sys.exit(1)
+
# validate and load plugins
for plug in plugins:
plugbase = plug[:-3]