Set proper permissions on root certificate files

pull/1/head
Timothy Pearson 11 years ago
parent f101efbd4d
commit 1e9b683727

@ -2695,7 +2695,14 @@ int LDAPManager::getTDECertificate(TQString certificateName, TQString fileName,
TQByteArray ba;
ba.duplicate(vals[i]->bv_val, vals[i]->bv_len);
file.writeBlock(ba);
returncode = 0;
file.close();
if (chmod(fileName.ascii(), S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) < 0) {
if (errstr) *errstr = i18n("Unable to change permissions of \"%1\"").arg(fileName.ascii());
returncode = -1;
}
else {
returncode = 0;
}
}
}
ldap_value_free_len(vals);

Loading…
Cancel
Save