summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ldap.cpp18
-rw-r--r--src/ldap.h1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/ldap.cpp b/src/ldap.cpp
index 31b2b0c..1e8356f 100644
--- a/src/ldap.cpp
+++ b/src/ldap.cpp
@@ -59,6 +59,7 @@
#define PAMD_DIRECTORY "/etc/pam.d/"
#define PAMD_COMMON_ACCOUNT "common-account"
#define PAMD_COMMON_AUTH "common-auth"
+#define CRON_UPDATE_NSS_FILE "/etc/cron.daily/upd-local-nss-db"
#define DEFAULT_IGNORED_USERS_LIST "avahi,avahi-autoipd,backup,bin,colord,daemon,games,gnats,haldaemon,hplip,irc,klog,landscape,libuuid,list,lp,mail,man,messagebus,news,ntp,polkituser,postfix,proxy,pulse,root,rtkit,saned,sshd,statd,sync,sys,syslog,timidity,usbmux,uucp,www-data"
typedef KGenericFactory<LDAPConfig, TQWidget> ldapFactory;
@@ -345,6 +346,8 @@ void LDAPConfig::save() {
writeNSSwitchFile();
// Write the PAM configuration files
writePAMFiles();
+ // Write the cron files
+ writeCronFiles();
}
load();
@@ -742,6 +745,21 @@ void LDAPConfig::writePAMFiles() {
}
}
+void LDAPConfig::writeCronFiles() {
+ TQFile file(CRON_UPDATE_NSS_FILE);
+ if (file.open(IO_WriteOnly)) {
+ TQTextStream stream( &file );
+
+ stream << "# This file was automatically generated by TDE\n";
+ stream << "# All changes will be lost!\n";
+ stream << "\n";
+ stream << "#!/bin/sh" << "\n";
+ stream << "/usr/sbin/nss_updatedb ldap" << "\n";
+
+ file.close();
+ }
+}
+
int LDAPConfig::buttons() {
return KCModule::Apply|KCModule::Help;
}
diff --git a/src/ldap.h b/src/ldap.h
index 38d576c..d0b0c4e 100644
--- a/src/ldap.h
+++ b/src/ldap.h
@@ -95,6 +95,7 @@ class LDAPConfig: public KCModule
void writeLDAPConfFile();
void writeNSSwitchFile();
void writePAMFiles();
+ void writeCronFiles();
private:
KAboutData *myAboutData;