Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit 233c373b authored by Michael Ott's avatar Michael Ott
Browse files

Fix NULL pointer and file name generation issues in SensorConfigImpl::findSensorCachePath()

parent 3c263553
......@@ -1946,18 +1946,24 @@ SCError SensorConfigImpl::findSensorCachePath() {
return SC_OK;
}
// Retrieving name of the cluster (just once)
if(_clusterName == "" && getClusterName(_clusterName) != SC_OK) {
_clusterName = "";
return SC_UNKNOWNERROR;
}
// Create list of candidates to store the cache file at
std::list<std::string> candidates;
if (libConfig.getTempDir().size() > 0) {
candidates.push_back(libConfig.getTempDir());
}
std::string homeDir = getenv("HOME");
if (homeDir.size() > 0) {
candidates.push_back(homeDir + "/.cache");
char* homeDir = getenv("HOME");
if (homeDir != nullptr) {
candidates.push_back(homeDir + std::string("/.cache"));
}
std::string tempDir = getenv("TMPDIR");
if (tempDir.size() > 0) {
candidates.push_back(tempDir);
char* tempDir = getenv("TMPDIR");
if (tempDir != nullptr) {
candidates.push_back(std::string(tempDir));
}
candidates.push_back(std::string("/tmp"));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment