[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdecore/config
From: Luboš Luňák <l.lunak () kde ! org>
Date: 2010-11-19 13:42:13
Message-ID: 20101119134213.70590AC8A0 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1198726 by lunakl:
Nice try in r930095, but this is not what 'run_desktop_files' from kiosk
is about - it disables only .desktop files outside of standard locations
(see e.g. kiosktool description), not all .desktop files altogether
(which would be the 'break a lot of things' kiosk option).
M +7 -9 kdesktopfile.cpp
--- trunk/KDE/kdelibs/kdecore/config/kdesktopfile.cpp #1198725:1198726
@@ -137,14 +137,6 @@
bool KDesktopFile::isAuthorizedDesktopFile(const QString& path)
{
- // Explicitly forbid desktop files if Kiosk does not allow. There
- // may be other reasons that desktop files are forbidden so keep
- // checking otherwise.
- if (!KAuthorized::authorize(QLatin1String("run_desktop_files"))) {
- kWarning() << "Access to '" << path << "' denied because of 'run_desktop_files' restriction." << endl;
- return false;
- }
-
if (path.isEmpty())
return false; // Empty paths are not ok.
@@ -166,13 +158,19 @@
return true;
}
+ // Forbid desktop files outside of standard locations if kiosk is set so
+ if (!KAuthorized::authorize(QLatin1String("run_desktop_files"))) {
+ kWarning() << "Access to '" << path << "' denied because of 'run_desktop_files' restriction." << endl;
+ return false;
+ }
+
// Not otherwise permitted, so only allow if the file is executable, or if
// owned by root (uid == 0)
QFileInfo entryInfo( path );
if (entryInfo.isExecutable() || entryInfo.ownerId() == 0)
return true;
- kWarning() << "Access to '" << path << "' denied because of 'non_executable_desktop_file' restriction." << endl;
+ kWarning() << "Access to '" << path << "' denied, not owned by root, executable flag not set." << endl;
return false;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic