diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2014-08-18 19:21:59 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2014-08-18 19:21:59 -0300 |
commit | 95a38ad9f37dcfa806f90879bccbccc3c1adae85 (patch) | |
tree | 648a16d379479e757011826b17bf86928a0f34c8 /libre/kdelibs-libre/kdelibs-cve-2014-5033.patch | |
parent | 01f574d3db4fb3b74bc43b1c8743c886ea203c6f (diff) | |
parent | 8452da624e99b276d0f8da2e6c6900915fc15546 (diff) | |
download | abslibre-95a38ad9f37dcfa806f90879bccbccc3c1adae85.tar.gz abslibre-95a38ad9f37dcfa806f90879bccbccc3c1adae85.tar.bz2 abslibre-95a38ad9f37dcfa806f90879bccbccc3c1adae85.zip |
Merge branch 'master' of ssh://lukeshu.com:1863/srv/git/mirror/parabola/abslibre
Diffstat (limited to 'libre/kdelibs-libre/kdelibs-cve-2014-5033.patch')
-rw-r--r-- | libre/kdelibs-libre/kdelibs-cve-2014-5033.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/libre/kdelibs-libre/kdelibs-cve-2014-5033.patch b/libre/kdelibs-libre/kdelibs-cve-2014-5033.patch new file mode 100644 index 000000000..c85eccd6b --- /dev/null +++ b/libre/kdelibs-libre/kdelibs-cve-2014-5033.patch @@ -0,0 +1,36 @@ +--- a/kdecore/auth/backends/polkit-1/Polkit1Backend.cpp ++++ b/kdecore/auth/backends/polkit-1/Polkit1Backend.cpp +@@ -144,7 +144,7 @@ + + Action::AuthStatus Polkit1Backend::actionStatus(const QString &action) + { +- PolkitQt1::UnixProcessSubject subject(QCoreApplication::applicationPid()); ++ PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID())); + PolkitQt1::Authority::Result r = PolkitQt1::Authority::instance()->checkAuthorizationSync(action, subject, + PolkitQt1::Authority::None); + switch (r) { +@@ -160,21 +160,12 @@ + + QByteArray Polkit1Backend::callerID() const + { +- QByteArray a; +- QDataStream s(&a, QIODevice::WriteOnly); +- s << QCoreApplication::applicationPid(); +- +- return a; ++ return QDBusConnection::systemBus().baseService().toUtf8(); + } + + bool Polkit1Backend::isCallerAuthorized(const QString &action, QByteArray callerID) + { +- QDataStream s(&callerID, QIODevice::ReadOnly); +- qint64 pid; +- +- s >> pid; +- +- PolkitQt1::UnixProcessSubject subject(pid); ++ PolkitQt1::SystemBusNameSubject subject(QString::fromUtf8(callerID)); + PolkitQt1::Authority *authority = PolkitQt1::Authority::instance(); + + PolkitResultEventLoop e; + |