|
|
|
@ -317,12 +317,16 @@ int LDAPManager::bind(TQString* errstr) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
// All done!
|
|
|
|
|
ldap_unbind_ext_s(ldapconn, NULL, NULL);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_unbind_ext_s(ldapconn, NULL, NULL);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -655,7 +659,7 @@ LDAPUserInfoList LDAPManager::users(int* mretcode, TQString *errstr) {
|
|
|
|
|
users.append(parseLDAPUserRecord(entry));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
if (mretcode) *mretcode = 0;
|
|
|
|
@ -733,7 +737,7 @@ LDAPUserInfoList LDAPManager::users(int* mretcode, TQString *errstr) {
|
|
|
|
|
users.append(parseLDAPUserRecord(entry));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
} while (morePages);
|
|
|
|
|
|
|
|
|
@ -766,7 +770,7 @@ LDAPUserInfo LDAPManager::getUserByDistinguishedName(TQString dn) {
|
|
|
|
|
userinfo = parseLDAPUserRecord(entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return userinfo;
|
|
|
|
@ -797,7 +801,7 @@ LDAPGroupInfo LDAPManager::getGroupByDistinguishedName(TQString dn, TQString *er
|
|
|
|
|
groupinfo = parseLDAPGroupRecord(entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return groupinfo;
|
|
|
|
@ -2205,7 +2209,7 @@ LDAPGroupInfoList LDAPManager::groups(int* mretcode, TQString *errstr) {
|
|
|
|
|
groups.append(parseLDAPGroupRecord(entry));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
if (mretcode) *mretcode = 0;
|
|
|
|
@ -2283,7 +2287,7 @@ LDAPGroupInfoList LDAPManager::groups(int* mretcode, TQString *errstr) {
|
|
|
|
|
groups.append(parseLDAPGroupRecord(entry));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
} while (morePages);
|
|
|
|
|
|
|
|
|
@ -2326,7 +2330,7 @@ LDAPMachineInfoList LDAPManager::machines(int* mretcode, TQString *errstr) {
|
|
|
|
|
machines.append(parseLDAPMachineRecord(entry));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
if (mretcode) *mretcode = 0;
|
|
|
|
@ -2404,7 +2408,7 @@ LDAPMachineInfoList LDAPManager::machines(int* mretcode, TQString *errstr) {
|
|
|
|
|
machines.append(parseLDAPMachineRecord(entry));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
} while (morePages);
|
|
|
|
|
|
|
|
|
@ -2486,7 +2490,7 @@ LDAPServiceInfoList LDAPManager::machineServices(TQString machine_dn, int* mretc
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
if (mretcode) *mretcode = 0;
|
|
|
|
@ -2684,7 +2688,7 @@ TQString LDAPManager::getRealmCAMaster(TQString* errstr) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return realmCAMaster;
|
|
|
|
@ -2763,7 +2767,7 @@ int LDAPManager::moveKerberosEntries(TQString newSuffix, TQString* errstr) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
@ -3048,7 +3052,7 @@ LDAPTDEBuiltinsInfo LDAPManager::getTDEBuiltinMappings(TQString *errstr) {
|
|
|
|
|
builtininfo = parseLDAPTDEBuiltinsRecord(entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return builtininfo;
|
|
|
|
@ -3084,7 +3088,7 @@ LDAPMasterReplicationInfo LDAPManager::getLDAPMasterReplicationSettings(TQString
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
// Set OpenLDAP defaults
|
|
|
|
@ -3103,7 +3107,7 @@ LDAPMasterReplicationInfo LDAPManager::getLDAPMasterReplicationSettings(TQString
|
|
|
|
|
replicationinfo = parseLDAPMasterReplicationRecord(replicationinfo, entry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return replicationinfo;
|
|
|
|
@ -3429,7 +3433,7 @@ int LDAPManager::setLDAPMasterReplicationSettings(LDAPMasterReplicationInfo repl
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
if (!haveOlcOverlaySyncProv) {
|
|
|
|
@ -3479,7 +3483,7 @@ int LDAPManager::setLDAPMasterReplicationSettings(LDAPMasterReplicationInfo repl
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
if (!haveOlcOverlaySyncProv) {
|
|
|
|
@ -3591,7 +3595,7 @@ int LDAPManager::getTDECertificate(TQString certificateName, TQString fileName,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// clean up
|
|
|
|
|
// Clean up
|
|
|
|
|
ldap_msgfree(msg);
|
|
|
|
|
|
|
|
|
|
return returncode;
|
|
|
|
|