diff --git a/seafile-ldap.py b/seafile-ldap.py index 27b2298..13d9574 100644 --- a/seafile-ldap.py +++ b/seafile-ldap.py @@ -101,20 +101,20 @@ dbCharset = config['Database']['CONNECTION_CHARSET'] logger.debug("DB Engine: {0}, DB Host: {1}, DB Port: {2}, DB User: {3}, DB Name: {4}, DB Connection Charset: {5}".format(dbEngine, dbHost, dbPort, dbUser, dbName, dbCharset)) # ldap Config -ldapServer = config['LDAP']['HOST'] +ldapHost = config['LDAP']['HOST'] #ldapPort = config['LDAP SERVER'].getint('port') #ldapSSL = config['LDAP SERVER'].getboolean('ssl') ldapBase = config['LDAP']['BASE'] ldapUserDN = config['LDAP']['USER_DN'] ldapUserPassword = config['LDAP']['PASSWORD'] ldapFilter = config['LDAP']['FILTER'] -logger.debug("LDAP Server: {0}, LDAP Base: {1}, LDAP User DN: {2}, LDAP Filter: {3}".format(ldapServer, ldapBase, ldapUserDN, ldapFilter)) +logger.debug("LDAP Host: {0}, LDAP Base: {1}, LDAP User DN: {2}, LDAP Filter: {3}".format(ldapHost, ldapBase, ldapUserDN, ldapFilter)) logger.debug("Finished reading the config.") # setup the server -server = Server(serverDNS, port=serverPort, use_ssl=serverSSL) -logger.debug("Setup server connection uri: {0}".format(server)) +ldapServer = Server(ldapHost) +logger.debug("Setup server connection uri: {0}".format(ldapServer)) try: ldap = Connection(server, bindAccount, bindPassword, auto_bind=True) except core.exceptions.LDAPBindError as e: