mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-15 09:03:48 +00:00
0b5bcd88a2
https://github.com/sddm/sddm/releases/tag/v0.19.0 Fixes: CVE-2020-28049
46 lines
2 KiB
Diff
46 lines
2 KiB
Diff
diff --git a/src/common/ConfigReader.cpp b/src/common/ConfigReader.cpp
|
|
index 041e5ed..efb1324 100644
|
|
--- a/src/common/ConfigReader.cpp
|
|
+++ b/src/common/ConfigReader.cpp
|
|
@@ -148,17 +148,14 @@ namespace SDDM {
|
|
// * m_path (classic fallback /etc/sddm.conf)
|
|
|
|
QStringList files;
|
|
- QDateTime latestModificationTime = QFileInfo(m_path).lastModified();
|
|
|
|
if (!m_sysConfigDir.isEmpty()) {
|
|
//include the configDir in modification time so we also reload on any files added/removed
|
|
QDir dir(m_sysConfigDir);
|
|
if (dir.exists()) {
|
|
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_sysConfigDir).lastModified());
|
|
const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
|
|
for (const QFileInfo &file : dirFiles) {
|
|
files << (file.absoluteFilePath());
|
|
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
|
|
}
|
|
}
|
|
}
|
|
@@ -166,22 +163,15 @@ namespace SDDM {
|
|
//include the configDir in modification time so we also reload on any files added/removed
|
|
QDir dir(m_configDir);
|
|
if (dir.exists()) {
|
|
- latestModificationTime = std::max(latestModificationTime, QFileInfo(m_configDir).lastModified());
|
|
const auto dirFiles = dir.entryInfoList(QDir::Files | QDir::NoDotAndDotDot, QDir::LocaleAware);
|
|
for (const QFileInfo &file : dirFiles) {
|
|
files << (file.absoluteFilePath());
|
|
- latestModificationTime = std::max(latestModificationTime, file.lastModified());
|
|
}
|
|
}
|
|
}
|
|
|
|
files << m_path;
|
|
|
|
- if (latestModificationTime <= m_fileModificationTime) {
|
|
- return;
|
|
- }
|
|
- m_fileModificationTime = latestModificationTime;
|
|
-
|
|
for (const QString &filepath : qAsConst(files)) {
|
|
loadInternal(filepath);
|
|
}
|