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;
|
||||
}
|
||||
// Do not allow using this helper for writing to arbitrary location
|
||||
if ( !filePath.contains(QStringLiteral("/etc/fstab")) )
|
||||
if ( filePath != QStringLiteral("/etc/fstab") )
|
||||
return false;
|
||||
|
||||
QFile device(filePath);
|
||||
|
|
Loading…
Reference in New Issue