From c59e73e2c1a5ec12fda190dce0dafe5dfe9fef99 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Wed, 24 Sep 2008 19:38:23 +0200 Subject: ipa-change-master-key: Really exit when not run as root Also fix this for ipa-fix-CVE-2008-3274 --- ipa-admintools/ipa-change-master-key | 1 + ipa-server/ipa-fix-CVE-2008-3274 | 1 + 2 files changed, 2 insertions(+) diff --git a/ipa-admintools/ipa-change-master-key b/ipa-admintools/ipa-change-master-key index 9ab5a96e8..a4e943992 100644 --- a/ipa-admintools/ipa-change-master-key +++ b/ipa-admintools/ipa-change-master-key @@ -156,6 +156,7 @@ def main(): if os.getuid() != 0: print "ERROR: This command must be run as root" + sys.exit(1) print "DANGER: This is a dangerous operation, make sure you backup all your IPA data before running the tool" print "This command will restart your Directory and KDC Servers." diff --git a/ipa-server/ipa-fix-CVE-2008-3274 b/ipa-server/ipa-fix-CVE-2008-3274 index 3d8324e00..41d3abc96 100644 --- a/ipa-server/ipa-fix-CVE-2008-3274 +++ b/ipa-server/ipa-fix-CVE-2008-3274 @@ -170,6 +170,7 @@ def change_mkey(password = None, quiet = False): if os.getuid() != 0: print "ERROR: This command must be run as root" + sys.exit(1) print "DANGER: This is a dangerous operation, make sure you backup all your IPA data before running the tool" print "This command will restart your Directory and KDC Servers." -- cgit