From b3ef33f3600b706b01356634d69e0ceb97bfa3d8 Mon Sep 17 00:00:00 2001 From: shnavid Date: Tue, 10 Jul 2007 21:52:44 +0000 Subject: * 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 --- src/sosreport | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') 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] -- cgit