From 1502494edaae8eee0baeb4484a0b49fa0b93b871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sat, 5 Feb 2022 13:13:12 +0000 Subject: [PATCH] Be a bit more strict in root helper when checking path to /etc/fstab. --- src/util/externalcommandhelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/externalcommandhelper.cpp b/src/util/externalcommandhelper.cpp index 62290b0..84a1e97 100644 --- a/src/util/externalcommandhelper.cpp +++ b/src/util/externalcommandhelper.cpp @@ -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);