summaryrefslogtreecommitdiffstats
path: root/src/libtdeldap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtdeldap.cpp')
-rw-r--r--src/libtdeldap.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libtdeldap.cpp b/src/libtdeldap.cpp
index 6d78cf7..c8957cd 100644
--- a/src/libtdeldap.cpp
+++ b/src/libtdeldap.cpp
@@ -5136,6 +5136,14 @@ int LDAPManager::writePAMFiles(LDAPPamConfig pamConfig, TQString *errstr) {
}
if (pamConfig.enable_pkcs11_login) {
+ TQDir pkcs11dir(PAMD_PKCS11_CONFIG_DIRECTORY);
+ if (!pkcs11dir.exists()) {
+ if (mkdir(PAMD_PKCS11_CONFIG_DIRECTORY, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) < 0) {
+ if (errstr) {
+ *errstr = i18n("Could not create directoy '%1'").arg(PAMD_PKCS11_CONFIG_DIRECTORY);
+ }
+ }
+ }
TQFile file4(PAMD_PKCS11_CONFIG_DIRECTORY PAMD_PKCS11_CONFIG_FILE);
if (file4.open(IO_WriteOnly)) {
TQTextStream stream( &file4 );