mirror of https://github.com/procxx/kepka.git
Fix CVE-2016-10351: Insecure cWorkingDir permissions.
Set 700 permisson on dir on every start. Signed-off-by: Alexander GQ Gerasiov <gq@cs.msu.su>
This commit is contained in:
parent
5d5b89c82d
commit
07106897a6
|
@ -79,7 +79,12 @@ DeclareReadSetting(LaunchMode, LaunchMode);
|
||||||
DeclareSetting(QString, WorkingDir);
|
DeclareSetting(QString, WorkingDir);
|
||||||
inline void cForceWorkingDir(const QString &newDir) {
|
inline void cForceWorkingDir(const QString &newDir) {
|
||||||
cSetWorkingDir(newDir);
|
cSetWorkingDir(newDir);
|
||||||
if (!gWorkingDir.isEmpty()) QDir().mkpath(gWorkingDir);
|
if (!gWorkingDir.isEmpty()) {
|
||||||
|
QDir().mkpath(gWorkingDir);
|
||||||
|
QFile::setPermissions(gWorkingDir,
|
||||||
|
QFileDevice::ReadUser | QFileDevice::WriteUser | QFileDevice::ExeUser);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
DeclareReadSetting(QString, ExeName);
|
DeclareReadSetting(QString, ExeName);
|
||||||
DeclareReadSetting(QString, ExeDir);
|
DeclareReadSetting(QString, ExeDir);
|
||||||
|
|
Loading…
Reference in New Issue