diff options
-rwxr-xr-x | install/tools/ipa-nis-manage | 6 | ||||
-rw-r--r-- | ipaserver/plugins/ldap2.py | 2 |
2 files changed, 5 insertions, 3 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 diff --git a/ipaserver/plugins/ldap2.py b/ipaserver/plugins/ldap2.py index b5efc428e..cbb8ddb63 100644 --- a/ipaserver/plugins/ldap2.py +++ b/ipaserver/plugins/ldap2.py @@ -702,7 +702,7 @@ class ldap2(CrudBackend, Encoder): def _generate_modlist(self, dn, entry_attrs, normalize): # get original entry - (dn, entry_attrs_old) = self.get_entry(dn, entry_attrs.keys(), normalize) + (dn, entry_attrs_old) = self.get_entry(dn, entry_attrs.keys(), normalize=normalize) # get_entry returns a decoded entry, encode it back # we could call search_s directly, but this saves a lot of code at # the expense of a little bit of performace |