[yum-cvs] debuginfo-install.py

Seth Vidal skvidal at linux.duke.edu
Fri Dec 21 18:45:50 UTC 2007


 debuginfo-install.py |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e35b3c1e662586d86ac211295cb5e4c13e9d6ab3
Author: Seth Vidal <skvidal at fedoraproject.org>
Date:   Fri Dec 21 13:42:31 2007 -0500

    make sure we're root to run debuginfo-install
    closes rh bug #426470

diff --git a/debuginfo-install.py b/debuginfo-install.py
index 4845e80..78c1975 100755
--- a/debuginfo-install.py
+++ b/debuginfo-install.py
@@ -15,6 +15,7 @@
 # Copyright 2007 Seth Vidal
 
 import sys
+import os
 sys.path.insert(0,'/usr/share/yum-cli/')
 
 import yum
@@ -46,7 +47,10 @@ class DebugInfoInstall(YumUtilBase):
         if len(self.cmds) < 1: 
             parser.print_help()
             sys.exit(0)
-
+        if os.geteuid() != 0:
+            print >> sys.stderr, "You must be root to run this command."
+            sys.exit(1)
+            
         # Setup yum (Ts, RPM db, Repo & Sack)
         self.doUtilYumSetup()
         



More information about the Yum-cvs-commits mailing list