Hello,

I have a fix for https://fedorahosted.org/freeipa/ticket/4089

thanks,

Gabe
From 0e5937d00ed65d945c1c5ab68429ae5ccbd80936 Mon Sep 17 00:00:00 2001
From: Gabe <redhatri...@gmail.com>
Date: Sun, 23 Nov 2014 20:33:57 -0700
Subject: [PATCH] ipa-managed-entries requires password with bad password

- Add try/except when trying -p option to catch bad password

https://fedorahosted.org/freeipa/ticket/4089
---
 install/tools/ipa-managed-entries | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/install/tools/ipa-managed-entries b/install/tools/ipa-managed-entries
index 85ef597ca04cdadcd1543b86588562607a51dbdc..8ef82eca74c23786c0be0c95496e4bac492fbbfa 100755
--- a/install/tools/ipa-managed-entries
+++ b/install/tools/ipa-managed-entries
@@ -88,7 +88,10 @@ def main():
         conn = ipaldap.IPAdmin(host, 636, cacert=CACERT)
 
         if options.dirman_password:
-            conn.do_simple_bind(bindpw=options.dirman_password)
+            try:
+                conn.do_simple_bind(bindpw=options.dirman_password)
+            except errors.ACIError:
+                sys.exit("Invalid credentials")
         else:
             conn.do_sasl_gssapi_bind()
     except errors.ACIError:
-- 
2.0.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to