Be a bit more strict in root helper when checking path to /etc/fstab.

This commit is contained in:
Andrius Štikonas 2022-02-05 13:13:12 +00:00
parent e2f097fce8
commit 1502494eda
1 changed files with 1 additions and 1 deletions

View File

@ -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);