Compare commits

..

No commits in common. 'master' and 'r14.1.0' have entirely different histories.

@ -7,11 +7,7 @@
############################################ ############################################
##### set project version ######################## cmake_minimum_required( VERSION 3.1 )
include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
tde_set_project_version( )
#### general package setup #### general package setup
@ -35,6 +31,11 @@ include( CheckCXXSourceCompiles )
include( TDEMacros ) include( TDEMacros )
##### set version number ########################
tde_set_project_version( )
##### setup install paths ##### setup install paths
include( TDESetupPaths ) include( TDESetupPaths )

@ -115,7 +115,7 @@ endif( )
tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" ) tde_save_and_set( CMAKE_REQUIRED_INCLUDES "${TDE_INCLUDE_DIR}" )
check_cxx_source_compiles( " check_cxx_source_compiles( "
#include <tdemacros.h> #include <kdemacros.h>
#ifndef __TDE_HAVE_TDEHWLIB #ifndef __TDE_HAVE_TDEHWLIB
#error tdecore is not build with tdehwlib #error tdecore is not build with tdehwlib
#endif #endif

@ -1,7 +1,7 @@
#define VERSION "@VERSION@" #define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support. // Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __TDE_HAVE_GCC_VISIBILITY 1 #cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */

@ -23,13 +23,13 @@
#include <tqmap.h> #include <tqmap.h>
#include <tdeapplication.h> #include <tdeapplication.h>
#include <tdesimpleconfig.h> #include <ksimpleconfig.h>
#include <tdelocale.h> #include <tdelocale.h>
#include <kdebug.h> #include <kdebug.h>
#include <tdestandarddirs.h> #include <kstandarddirs.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <tdeprocess.h> #include <kprocess.h>
#include <kcombobox.h> #include <kcombobox.h>
#include "ldaplogindlg.h" #include "ldaplogindlg.h"

@ -30,7 +30,7 @@ class TQStringList;
*/ */
class LDAPLogin : public LDAPLoginDlg { class LDAPLogin : public LDAPLoginDlg {
TQ_OBJECT Q_OBJECT
public: public:
LDAPLogin(TQWidget *parent=0, const char *name=0); LDAPLogin(TQWidget *parent=0, const char *name=0);
~LDAPLogin(); ~LDAPLogin();

@ -26,9 +26,9 @@
class LDAPLogin; class LDAPLogin;
class TDE_EXPORT LDAPPasswordDialog : public KDialogBase class KDE_EXPORT LDAPPasswordDialog : public KDialogBase
{ {
TQ_OBJECT Q_OBJECT
public: public:
LDAPPasswordDialog(TQWidget* parent = 0, const char* name = 0, bool allowGSSAPI = true, bool allowSmartCard = false); LDAPPasswordDialog(TQWidget* parent = 0, const char* name = 0, bool allowGSSAPI = true, bool allowSmartCard = false);

@ -35,7 +35,7 @@
#include <tdemessagebox.h> #include <tdemessagebox.h>
#include <klineedit.h> #include <klineedit.h>
#include <kpassdlg.h> #include <kpassdlg.h>
#include <tdesimpleconfig.h> #include <ksimpleconfig.h>
#include <tdesu/process.h> #include <tdesu/process.h>
#include <ksslcertificate.h> #include <ksslcertificate.h>
#include <krfcdate.h> #include <krfcdate.h>
@ -1081,7 +1081,7 @@ int LDAPManager::updateUserInfo(LDAPUserInfo user, TQString *errstr) {
KSSLCertificate* cert = KSSLCertificate::fromString(ssldata); KSSLCertificate* cert = KSSLCertificate::fromString(ssldata);
if (cert) { if (cert) {
bool expired = false; bool expired = false;
if (TQDateTime::currentDateTime(TQt::UTC) > cert->getQDTNotAfter()) { if (TQDateTime::currentDateTime(Qt::UTC) > cert->getQDTNotAfter()) {
expired = true; expired = true;
} }
@ -1592,7 +1592,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
} }
else if (line.startsWith(KLIST_FLAGS_STRING)) { else if (line.startsWith(KLIST_FLAGS_STRING)) {
line.remove(0, strlen(KLIST_FLAGS_STRING)); line.remove(0, strlen(KLIST_FLAGS_STRING));
TQStringList flags = TQStringList::split(",", line, false); TQStringList flags = TQStringList::split(",", line, FALSE);
for (TQStringList::Iterator it = flags.begin(); it != flags.end(); ++it) { for (TQStringList::Iterator it = flags.begin(); it != flags.end(); ++it) {
if ((*it) == KLIST_KRB5_TICKET_RESERVED) { if ((*it) == KLIST_KRB5_TICKET_RESERVED) {
ticket.flags = ticket.flags | KRB5_TICKET_RESERVED; ticket.flags = ticket.flags | KRB5_TICKET_RESERVED;
@ -1663,7 +1663,7 @@ KerberosTicketInfoList LDAPManager::getKerberosTicketList(TQString cache, TQStri
LDAPRealmConfigList LDAPManager::fetchAndReadTDERealmList(TQString *defaultRealm) LDAPRealmConfigList LDAPManager::fetchAndReadTDERealmList(TQString *defaultRealm)
{ {
TDESimpleConfig* systemconfig = new TDESimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig* systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
if (defaultRealm != NULL) { if (defaultRealm != NULL) {
*defaultRealm = systemconfig->readEntry("DefaultRealm", TQString::null); *defaultRealm = systemconfig->readEntry("DefaultRealm", TQString::null);
@ -1728,7 +1728,7 @@ int LDAPManager::obtainKerberosTicket(LDAPCredentials creds, TQString principal,
QCStringList args; QCStringList args;
if (creds.use_smartcard) { if (creds.use_smartcard) {
// Get PKCS#11 slot number from the LDAP configuration file // Get PKCS#11 slot number from the LDAP configuration file
TDESimpleConfig* systemconfig = new TDESimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig* systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
int pkcs11_login_card_slot = systemconfig->readNumEntry("PKCS11LoginCardSlot", 0); int pkcs11_login_card_slot = systemconfig->readNumEntry("PKCS11LoginCardSlot", 0);
delete systemconfig; delete systemconfig;
@ -3296,7 +3296,7 @@ int LDAPManager::moveKerberosEntries(TQString newSuffix, TQString* errstr) {
} }
int LDAPManager::writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole machineRole, TQString *errstr) { int LDAPManager::writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole machineRole, TQString *errstr) {
TDESimpleConfig* systemconfig; KSimpleConfig* systemconfig;
TQString m_defaultRealm; TQString m_defaultRealm;
int m_ldapVersion; int m_ldapVersion;
int m_ldapTimeout; int m_ldapTimeout;
@ -3306,7 +3306,7 @@ int LDAPManager::writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole mac
TQString m_ignoredUsers; TQString m_ignoredUsers;
TQCString command; TQCString command;
systemconfig = new TDESimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
m_defaultRealm = systemconfig->readEntry("DefaultRealm", TQString::null); m_defaultRealm = systemconfig->readEntry("DefaultRealm", TQString::null);
@ -3491,7 +3491,7 @@ LDAPMasterReplicationInfo LDAPManager::parseLDAPMasterReplicationRecord(LDAPMast
if (ldap_field == "olcServerID") { if (ldap_field == "olcServerID") {
i=0; i=0;
while (vals[i] != NULL) { while (vals[i] != NULL) {
TQStringList serverIDMapping = TQStringList::split(" ", TQString(vals[i]->bv_val), false); TQStringList serverIDMapping = TQStringList::split(" ", TQString(vals[i]->bv_val), FALSE);
LDAPMasterReplicationMapping mapping; LDAPMasterReplicationMapping mapping;
mapping.id = serverIDMapping[0].toInt(); mapping.id = serverIDMapping[0].toInt();
mapping.fqdn = serverIDMapping[1]; mapping.fqdn = serverIDMapping[1];
@ -4301,7 +4301,7 @@ int LDAPManager::installCACertificateInHostCAStore(TQString *errstr) {
int LDAPManager::retrieveAndInstallCaCrl(LDAPManager* manager, TQString *errstr) { int LDAPManager::retrieveAndInstallCaCrl(LDAPManager* manager, TQString *errstr) {
int retcode = 0; int retcode = 0;
LDAPManager* ldap_mgr = manager; LDAPManager* ldap_mgr = manager;
TDESimpleConfig* systemconfig = new TDESimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig* systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
LDAPRealmConfigList realms = LDAPManager::readTDERealmList(systemconfig, false); LDAPRealmConfigList realms = LDAPManager::readTDERealmList(systemconfig, false);
if (!ldap_mgr) { if (!ldap_mgr) {
@ -4336,7 +4336,7 @@ int LDAPManager::retrieveAndInstallCaCrl(LDAPManager* manager, TQString *errstr)
return retcode; return retcode;
} }
LDAPRealmConfigList LDAPManager::readTDERealmList(TDESimpleConfig* config, bool disableAllBonds) { LDAPRealmConfigList LDAPManager::readTDERealmList(KSimpleConfig* config, bool disableAllBonds) {
LDAPRealmConfigList realms; LDAPRealmConfigList realms;
TQStringList cfgRealms = config->groupList(); TQStringList cfgRealms = config->groupList();
@ -4375,7 +4375,7 @@ LDAPRealmConfigList LDAPManager::readTDERealmList(TDESimpleConfig* config, bool
return realms; return realms;
} }
int LDAPManager::writeTDERealmList(LDAPRealmConfigList realms, TDESimpleConfig* config, TQString *errstr) { int LDAPManager::writeTDERealmList(LDAPRealmConfigList realms, KSimpleConfig* config, TQString *errstr) {
Q_UNUSED(errstr) Q_UNUSED(errstr)
LDAPRealmConfigList::Iterator it; LDAPRealmConfigList::Iterator it;
@ -4766,7 +4766,7 @@ int LDAPManager::generatePKICRL(int expirydays, LDAPRealmConfig realmcfg, TQStri
KSSLCertificate* cert = KSSLCertificate::fromString(ssldata); KSSLCertificate* cert = KSSLCertificate::fromString(ssldata);
if (cert) { if (cert) {
bool expired = false; bool expired = false;
if (TQDateTime::currentDateTime(TQt::UTC) > cert->getQDTNotAfter()) { if (TQDateTime::currentDateTime(Qt::UTC) > cert->getQDTNotAfter()) {
expired = true; expired = true;
} }
@ -4860,7 +4860,7 @@ TQString LDAPManager::getMachineFQDN() {
return fqdn; return fqdn;
} }
LDAPClientRealmConfig LDAPManager::loadClientRealmConfig(TDESimpleConfig* config, bool useDefaults) { LDAPClientRealmConfig LDAPManager::loadClientRealmConfig(KSimpleConfig* config, bool useDefaults) {
LDAPClientRealmConfig clientRealmConfig; LDAPClientRealmConfig clientRealmConfig;
config->setReadDefaults(useDefaults); config->setReadDefaults(useDefaults);
@ -4894,7 +4894,7 @@ LDAPClientRealmConfig LDAPManager::loadClientRealmConfig(TDESimpleConfig* config
return clientRealmConfig; return clientRealmConfig;
} }
int LDAPManager::saveClientRealmConfig(LDAPClientRealmConfig clientRealmConfig, TDESimpleConfig* config, TQString *errstr) { int LDAPManager::saveClientRealmConfig(LDAPClientRealmConfig clientRealmConfig, KSimpleConfig* config, TQString *errstr) {
Q_UNUSED(errstr) Q_UNUSED(errstr)
config->setGroup(NULL); config->setGroup(NULL);
@ -4936,7 +4936,7 @@ int LDAPManager::writeClientKrb5ConfFile(LDAPClientRealmConfig clientRealmConfig
stream << "\n"; stream << "\n";
// Get PKCS#11 slot number from the LDAP configuration file // Get PKCS#11 slot number from the LDAP configuration file
TDESimpleConfig* systemconfig = new TDESimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig* systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
int pkcs11_login_card_slot = systemconfig->readNumEntry("PKCS11LoginCardSlot", 0); int pkcs11_login_card_slot = systemconfig->readNumEntry("PKCS11LoginCardSlot", 0);
delete systemconfig; delete systemconfig;
@ -5560,7 +5560,7 @@ int LDAPManager::writeOpenSSLConfigurationFile(LDAPRealmConfig realmcfg, LDAPUse
bool LDAPManager::pkcsLoginEnabled() { bool LDAPManager::pkcsLoginEnabled() {
bool enabled; bool enabled;
TDESimpleConfig* systemconfig = new TDESimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" )); KSimpleConfig* systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
systemconfig->setGroup(NULL); systemconfig->setGroup(NULL);
enabled = systemconfig->readBoolEntry("EnablePKCS11Login", false); enabled = systemconfig->readBoolEntry("EnablePKCS11Login", false);
delete systemconfig; delete systemconfig;

@ -33,7 +33,7 @@
#include <tqvaluelist.h> #include <tqvaluelist.h>
#include <tqfile.h> #include <tqfile.h>
#include <tdesimpleconfig.h> #include <ksimpleconfig.h>
// FIXME // FIXME
// Connect this to CMake/Automake // Connect this to CMake/Automake
@ -168,7 +168,7 @@ typedef TQValueList<TQByteArray> TQByteArrayList;
typedef TQPair<uint32_t, TQByteArray> PKICertificateEntry; typedef TQPair<uint32_t, TQByteArray> PKICertificateEntry;
typedef TQValueList<PKICertificateEntry> PKICertificateEntryList; typedef TQValueList<PKICertificateEntry> PKICertificateEntryList;
class TDE_EXPORT LDAPCredentials class KDE_EXPORT LDAPCredentials
{ {
public: public:
LDAPCredentials(); LDAPCredentials();
@ -185,7 +185,7 @@ class TDE_EXPORT LDAPCredentials
}; };
// PRIVATE // PRIVATE
class TDE_EXPORT LDAPRealmConfig class KDE_EXPORT LDAPRealmConfig
{ {
public: public:
TQString name; TQString name;
@ -205,7 +205,7 @@ class TDE_EXPORT LDAPRealmConfig
}; };
// PRIVATE // PRIVATE
class TDE_EXPORT LDAPCertConfig class KDE_EXPORT LDAPCertConfig
{ {
public: public:
LDAPCertConfig(); LDAPCertConfig();
@ -235,7 +235,7 @@ class TDE_EXPORT LDAPCertConfig
}; };
// PRIVATE // PRIVATE
class TDE_EXPORT LDAPPamConfig class KDE_EXPORT LDAPPamConfig
{ {
public: public:
LDAPPamConfig(); LDAPPamConfig();
@ -251,7 +251,7 @@ class TDE_EXPORT LDAPPamConfig
}; };
// PRIVATE // PRIVATE
class TDE_EXPORT LDAPClientRealmConfig class KDE_EXPORT LDAPClientRealmConfig
{ {
public: public:
bool enable_bonding; bool enable_bonding;
@ -274,7 +274,7 @@ class TDE_EXPORT LDAPClientRealmConfig
typedef TQMap<TQString, LDAPRealmConfig> LDAPRealmConfigList; typedef TQMap<TQString, LDAPRealmConfig> LDAPRealmConfigList;
class TDE_EXPORT LDAPUserInfo class KDE_EXPORT LDAPUserInfo
{ {
public: public:
LDAPUserInfo(); LDAPUserInfo();
@ -357,7 +357,7 @@ class TDE_EXPORT LDAPUserInfo
PKICertificateEntryList pkiCertificates; PKICertificateEntryList pkiCertificates;
}; };
class TDE_EXPORT LDAPGroupInfo class KDE_EXPORT LDAPGroupInfo
{ {
public: public:
LDAPGroupInfo(); LDAPGroupInfo();
@ -374,7 +374,7 @@ class TDE_EXPORT LDAPGroupInfo
TQStringList userlist; TQStringList userlist;
}; };
class TDE_EXPORT LDAPMachineInfo class KDE_EXPORT LDAPMachineInfo
{ {
public: public:
LDAPMachineInfo(); LDAPMachineInfo();
@ -391,7 +391,7 @@ class TDE_EXPORT LDAPMachineInfo
LDAPKRB5Flags status; // Default is 126 [KRB5_MACHINE_ACCOUNT_DEFAULT] LDAPKRB5Flags status; // Default is 126 [KRB5_MACHINE_ACCOUNT_DEFAULT]
}; };
class TDE_EXPORT LDAPServiceInfo class KDE_EXPORT LDAPServiceInfo
{ {
public: public:
LDAPServiceInfo(); LDAPServiceInfo();
@ -409,7 +409,7 @@ class TDE_EXPORT LDAPServiceInfo
LDAPKRB5Flags status; // Default is 126 [KRB5_SERVICE_PRINCIPAL_DEFAULT] LDAPKRB5Flags status; // Default is 126 [KRB5_SERVICE_PRINCIPAL_DEFAULT]
}; };
class TDE_EXPORT LDAPTDEBuiltinsInfo class KDE_EXPORT LDAPTDEBuiltinsInfo
{ {
public: public:
LDAPTDEBuiltinsInfo(); LDAPTDEBuiltinsInfo();
@ -423,7 +423,7 @@ class TDE_EXPORT LDAPTDEBuiltinsInfo
TQString builtinStandardUserGroup; TQString builtinStandardUserGroup;
}; };
class TDE_EXPORT LDAPMasterReplicationMapping class KDE_EXPORT LDAPMasterReplicationMapping
{ {
public: public:
LDAPMasterReplicationMapping(); LDAPMasterReplicationMapping();
@ -436,7 +436,7 @@ class TDE_EXPORT LDAPMasterReplicationMapping
typedef TQValueList<LDAPMasterReplicationMapping> LDAPMasterReplicationMap; typedef TQValueList<LDAPMasterReplicationMapping> LDAPMasterReplicationMap;
class TDE_EXPORT LDAPMasterReplicationInfo class KDE_EXPORT LDAPMasterReplicationInfo
{ {
public: public:
LDAPMasterReplicationInfo(); LDAPMasterReplicationInfo();
@ -457,7 +457,7 @@ class TDE_EXPORT LDAPMasterReplicationInfo
bool replicate_olcGlobal; bool replicate_olcGlobal;
}; };
class TDE_EXPORT KerberosTicketInfo class KDE_EXPORT KerberosTicketInfo
{ {
public: public:
KerberosTicketInfo(); KerberosTicketInfo();
@ -488,8 +488,8 @@ typedef TQValueList<KerberosTicketInfo> KerberosTicketInfoList;
class PtyProcess; class PtyProcess;
class TDE_EXPORT LDAPManager : public TQObject { class KDE_EXPORT LDAPManager : public TQObject {
TQ_OBJECT Q_OBJECT
public: public:
LDAPManager(TQString realm, TQString host, TQObject *parent=0, const char *name=0); LDAPManager(TQString realm, TQString host, TQObject *parent=0, const char *name=0);
@ -548,9 +548,9 @@ class TDE_EXPORT LDAPManager : public TQObject {
static int installCACertificateInHostCAStore(TQString *errstr=0); static int installCACertificateInHostCAStore(TQString *errstr=0);
static int retrieveAndInstallCaCrl(LDAPManager* manager=0, TQString *errstr=0); static int retrieveAndInstallCaCrl(LDAPManager* manager=0, TQString *errstr=0);
static TQString getMachineFQDN(); static TQString getMachineFQDN();
static int writeTDERealmList(LDAPRealmConfigList realms, TDESimpleConfig* config, TQString *errstr=0); static int writeTDERealmList(LDAPRealmConfigList realms, KSimpleConfig* config, TQString *errstr=0);
static LDAPRealmConfigList fetchAndReadTDERealmList(TQString *defaultRealm=0); static LDAPRealmConfigList fetchAndReadTDERealmList(TQString *defaultRealm=0);
static LDAPRealmConfigList readTDERealmList(TDESimpleConfig* config, bool disableAllBonds=false); static LDAPRealmConfigList readTDERealmList(KSimpleConfig* config, bool disableAllBonds=false);
static TQDateTime getCertificateExpiration(TQString certfile); static TQDateTime getCertificateExpiration(TQString certfile);
static TQDateTime getCertificateExpiration(TQByteArray certfileContents); static TQDateTime getCertificateExpiration(TQByteArray certfileContents);
@ -577,8 +577,8 @@ class TDE_EXPORT LDAPManager : public TQObject {
static TQString detailedKAdminErrorMessage(TQString initialMessage); static TQString detailedKAdminErrorMessage(TQString initialMessage);
static TQString readFullLineFromPtyProcess(PtyProcess* proc); static TQString readFullLineFromPtyProcess(PtyProcess* proc);
static LDAPClientRealmConfig loadClientRealmConfig(TDESimpleConfig* config, bool useDefaults=false); static LDAPClientRealmConfig loadClientRealmConfig(KSimpleConfig* config, bool useDefaults=false);
static int saveClientRealmConfig(LDAPClientRealmConfig clientRealmConfig, TDESimpleConfig* config, TQString *errstr=0); static int saveClientRealmConfig(LDAPClientRealmConfig clientRealmConfig, KSimpleConfig* config, TQString *errstr=0);
static int writeClientKrb5ConfFile(LDAPClientRealmConfig clientRealmConfig, LDAPRealmConfigList realmList, TQString *errstr=0); static int writeClientKrb5ConfFile(LDAPClientRealmConfig clientRealmConfig, LDAPRealmConfigList realmList, TQString *errstr=0);
static int writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole machineRole, TQString *errstr=0); static int writeLDAPConfFile(LDAPRealmConfig realmcfg, LDAPMachineRole machineRole, TQString *errstr=0);
static int writeNSSwitchFile(TQString *errstr=0); static int writeNSSwitchFile(TQString *errstr=0);

Loading…
Cancel
Save