|
|
|
@ -2509,6 +2509,15 @@ int LDAPManager::writeClientCronFiles(TQString *errstr) {
|
|
|
|
|
stream << CRON_UPDATE_NSS_COMMAND << "\n";
|
|
|
|
|
|
|
|
|
|
file.close();
|
|
|
|
|
|
|
|
|
|
if (chmod(CRON_UPDATE_NSS_FILE, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) < 0) {
|
|
|
|
|
if (errstr) *errstr = TQString("Unable to change permissions of \"%1\"").arg(CRON_UPDATE_NSS_FILE);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (errstr) *errstr = TQString("Unable to write file \"%1\"").arg(CRON_UPDATE_NSS_FILE);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (system(CRON_UPDATE_NSS_COMMAND) < 0) {
|
|
|
|
@ -2519,7 +2528,7 @@ int LDAPManager::writeClientCronFiles(TQString *errstr) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void LDAPManager::writePrimaryRealmCertificateUpdateCronFile() {
|
|
|
|
|
int LDAPManager::writePrimaryRealmCertificateUpdateCronFile(TQString *errstr) {
|
|
|
|
|
TQFile file(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_FILE);
|
|
|
|
|
if (file.open(IO_WriteOnly)) {
|
|
|
|
|
TQTextStream stream( &file );
|
|
|
|
@ -2531,12 +2540,23 @@ void LDAPManager::writePrimaryRealmCertificateUpdateCronFile() {
|
|
|
|
|
stream << CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_COMMAND << "\n";
|
|
|
|
|
|
|
|
|
|
file.close();
|
|
|
|
|
|
|
|
|
|
if (chmod(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_FILE, S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) < 0) {
|
|
|
|
|
if (errstr) *errstr = TQString("Unable to change permissions of \"%1\"").arg(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_FILE);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
if (errstr) *errstr = TQString("Unable to write file \"%1\"").arg(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_FILE);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (system(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_COMMAND) < 0) {
|
|
|
|
|
printf("ERROR: Execution of \"%s\" failed!\n\r", CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_COMMAND);
|
|
|
|
|
return;
|
|
|
|
|
if (errstr) *errstr = TQString("Execution of \"%s\" failed").arg(CRON_UPDATE_PRIMARY_REALM_CERTIFICATES_COMMAND);
|
|
|
|
|
return -1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LDAPRealmConfigList LDAPManager::readTDERealmList(KSimpleConfig* config, bool disableAllBonds) {
|
|
|
|
|