summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-nis-manage
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2010-11-04 15:23:25 -0400
committerRob Crittenden <rcritten@redhat.com>2010-11-09 13:33:04 -0500
commitfcf3cbbe8b70b889c7949273f878d69e03e48b58 (patch)
tree063999a392fbe51c1150e0024306f2df9612fee2 /install/tools/ipa-nis-manage
parenta3c4c7e891b6a6a31e3991f2908d25f7d4a02518 (diff)
downloadfreeipa-fcf3cbbe8b70b889c7949273f878d69e03e48b58.tar.gz
freeipa-fcf3cbbe8b70b889c7949273f878d69e03e48b58.tar.xz
freeipa-fcf3cbbe8b70b889c7949273f878d69e03e48b58.zip
Fix NotFound exception in ipa-nis-manage.
The signature of ldap2.get_entry() changed so normalize wasn't being handled properly so the basedn was always being appended causing our entry in cn=config to be not found. ticket 414
Diffstat (limited to 'install/tools/ipa-nis-manage')
-rwxr-xr-xinstall/tools/ipa-nis-manage6
1 files changed, 4 insertions, 2 deletions
diff --git a/install/tools/ipa-nis-manage b/install/tools/ipa-nis-manage
index 706b0e630..6448d1735 100755
--- a/install/tools/ipa-nis-manage
+++ b/install/tools/ipa-nis-manage
@@ -37,7 +37,7 @@ error was:
""" % sys.exc_value
sys.exit(1)
-nis_config_dn = "cn=NIS Server, cn=plugins, cn=config"
+nis_config_dn = "cn=NIS Server,cn=plugins,cn=config"
compat_dn = "cn=Schema Compatibility,cn=plugins,cn=config"
def parse_options():
@@ -115,6 +115,8 @@ def main():
conn.connect(
bind_dn='cn=directory manager', bind_pw=dirman_password
)
+ except errors.ACIError:
+ sys.exit("Incorrect password")
except errors.LDAPError, lde:
print "An error occurred while connecting to the server."
print lde
@@ -205,7 +207,7 @@ def main():
print "The %s service may need to be started." % servicemsg
finally:
- if conn:
+ if conn and conn.isconnected():
conn.disconnect()
return retval