aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorshnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-07-10 21:52:44 +0000
committershnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8>2007-07-10 21:52:44 +0000
commitb3ef33f3600b706b01356634d69e0ceb97bfa3d8 (patch)
tree835325160f1077810051c4490922a58dc2d32007 /src
parent80238fcec1e6929033e477dfe7179adf31a93874 (diff)
downloadsos-b3ef33f3600b706b01356634d69e0ceb97bfa3d8.tar.gz
* allow non-users to run with --help or --list-plugins (-l)
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@193 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src')
-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]