summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2016-09-06 14:23:36 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2016-09-06 14:23:36 -0500
commite7fe109b399e0350aa592c5300ee6bbd329fd21a (patch)
tree9f29e214a75a596637b48f99934ab6a6c4036ba1 /src
parente7d00722ef7eeac9082bada4d1bae24964b58210 (diff)
downloadlibtdeldap-e7fe109b399e0350aa592c5300ee6bbd329fd21a.tar.gz
libtdeldap-e7fe109b399e0350aa592c5300ee6bbd329fd21a.zip
Add method to get PKCS enablement status
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);