Be a bit more strict in root helper when checking path to /etc/fstab.
This commit is contained in:
parent
e2f097fce8
commit
1502494eda
|
@ -136,7 +136,7 @@ bool ExternalCommandHelper::CreateFile(const QString &filePath, const QByteArray
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
// Do not allow using this helper for writing to arbitrary location
|
// Do not allow using this helper for writing to arbitrary location
|
||||||
if ( !filePath.contains(QStringLiteral("/etc/fstab")) )
|
if ( filePath != QStringLiteral("/etc/fstab") )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
QFile device(filePath);
|
QFile device(filePath);
|
||||||
|
|
Loading…
Reference in New Issue