summaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-02-10 14:46:38 -0500
committerRob Crittenden <rcritten@redhat.com>2011-02-14 10:13:52 -0500
commit76f2d2eac2188fc7929bb07ab6bba7af745e8998 (patch)
treee27ad11965025418f40de3905d07e9d7d8b2bad1 /install
parent6880daefee19f164ff3c03f6f761558f0ecc0a7f (diff)
downloadfreeipa-76f2d2eac2188fc7929bb07ab6bba7af745e8998.tar.gz
freeipa-76f2d2eac2188fc7929bb07ab6bba7af745e8998.tar.xz
freeipa-76f2d2eac2188fc7929bb07ab6bba7af745e8998.zip
Handle bad DM password in ipa-host-net-manage & ipa-copmat-manage.
This was resulting in a traceback because while conn was not None it wasn't connected either. ticket 920
Diffstat (limited to 'install')
-rwxr-xr-xinstall/tools/ipa-compat-manage4
-rwxr-xr-xinstall/tools/ipa-host-net-manage4
2 files changed, 6 insertions, 2 deletions
diff --git a/install/tools/ipa-compat-manage b/install/tools/ipa-compat-manage
index bc88cd3a7..c990f9d42 100755
--- a/install/tools/ipa-compat-manage
+++ b/install/tools/ipa-compat-manage
@@ -101,6 +101,8 @@ def main():
)
except errors.LDAPError, lde:
sys.exit("An error occurred while connecting to the server.\n%s\n" % str(lde))
+ except errors.ACIError, e:
+ sys.exit("Authentication failed: %s" % e.info)
if args[0] == "status":
try:
@@ -165,7 +167,7 @@ def main():
retval = 1
finally:
- if conn:
+ if conn.isconnected():
conn.disconnect()
return retval
diff --git a/install/tools/ipa-host-net-manage b/install/tools/ipa-host-net-manage
index 8a8267f1f..ae8a224aa 100755
--- a/install/tools/ipa-host-net-manage
+++ b/install/tools/ipa-host-net-manage
@@ -105,6 +105,8 @@ def main():
except errors.LDAPError, lde:
sys.exit("An error occurred while connecting to the server.\n%s\n" %
str(lde))
+ except errors.ACIError, e:
+ sys.exit("Authentication failed: %s" % e.info)
if args[0] == "status":
try:
@@ -191,7 +193,7 @@ def main():
retval = 1
finally:
- if conn:
+ if conn.isconnected():
conn.disconnect()
return retval