summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libtdeldap.cpp11
-rw-r--r--src/libtdeldap.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp
index 823ff75..2ba3923 100644
--- a/src/libtdeldap.cpp
+++ b/src/libtdeldap.cpp
@@ -5467,6 +5467,17 @@ int LDAPManager::writeOpenSSLConfigurationFile(LDAPRealmConfig realmcfg, LDAPUse
return 0;
}
+bool LDAPManager::pkcsLoginEnabled() {
+ bool enabled;
+
+ KSimpleConfig* systemconfig = new KSimpleConfig( TQString::fromLatin1( KDE_CONFDIR "/ldap/ldapconfigrc" ));
+ systemconfig->setGroup(NULL);
+ enabled = systemconfig->readBoolEntry("EnablePKCS11Login", false);
+ delete systemconfig;
+
+ return enabled;
+}
+
int LDAPManager::bondRealm(TQString adminUserName, const char * adminPassword, TQString adminRealm, TQString *errstr) {
LDAPCredentials admincreds;
admincreds.username = adminUserName;
diff --git a/src/libtdeldap.h b/src/libtdeldap.h
index 4c249e1..e8515f2 100644
--- a/src/libtdeldap.h
+++ b/src/libtdeldap.h
@@ -587,6 +587,7 @@ class LDAPManager : public TQObject {
static int writeClientCronFiles(TQString *errstr=0);
static int rehashClientPKCSCertificates(TQString *errstr=0);
static int writePAMFiles(LDAPPamConfig pamConfig, TQString *errstr=0);
+ static bool pkcsLoginEnabled();
static int bondRealm(TQString adminUserName, const char * adminPassword, TQString adminRealm, TQString *errstr=0);
static int unbondRealm(LDAPRealmConfig realmcfg, TQString adminUserName, const char * adminPassword, TQString adminRealm, TQString *errstr=0);