* Tue Feb 09 2010 Rex Dieter <rdieter@fedoraproject.org> - 6:4.4.0-4 - depend on version of phonon,strigi,soprano built against * Tue Feb 09 2010 Rex Dieter <rdieter@fedoraproject.org> - 6:4.4.0-3 - respin * Mon Feb 08 2010 Rex Dieter <rdieter@fedoraproject.org> - 6:4.4.0-2 - respin * Fri Feb 05 2010 Than Ngo <than@redhat.com> - 6:4.4.0-1 - 4.4.0 * Tue Feb 02 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.98-4 - -apidocs: build as normal noarch subpkg * Tue Feb 02 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.98-3 - respin no_rpath patch, add LIB_INSTALL_DIR rpath only if not in CMAKE_SYSTEM_LIBRARY_PATH. added some status messages to help debug. * Mon Feb 01 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.98-2 - no_rpath patch, goodbye -DCMAKE_SKIP_RPATH:BOOL=ON, it's been fun * Sun Jan 31 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.98-1 - KDE 4.3.98 (4.4rc3) * Wed Jan 27 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.95-3 - patch for kde4-config --kde-version option (kde#224540) * Tue Jan 26 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.95-2 - -devel: Obsoletes: webkitkde-devel * Wed Jan 20 2010 Lukas Tinkl <ltinkl@redhat.com> - 4.3.95-1 - KDE 4.3.95 (4.4rc2) * Thu Jan 14 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.90-6 - use %%_polkit_qt_policydir - strigi_ver 0.7.1 * Mon Jan 11 2010 Jaroslav Reznik <jreznik@redhat.com> - 4.3.90-5 - hopefully correct kauth fix (old polkit cmake module is broken) * Fri Jan 08 2010 Jaroslav Reznik <jreznik@redhat.com> - 4.3.90-4 - fix kauth polkit policies installation * Thu Jan 07 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.90-3 - bump min polkit-qt version(s) * Wed Jan 06 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.90-2 - -devel: Requires: shared-desktop-ontologies-devel * Wed Jan 06 2010 Rex Dieter <rdieter@fedoraproject.org> - 4.3.90-1 - 4.3.90 (4.4rc1) - drop openssl patch (no longer needed since bug #429846 fixed) * Tue Jan 05 2010 Jaroslav Reznik <jreznik@redhat.com> - 4.3.85-7 - PolkitQt rebuild * Sun Dec 27 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.85-6 - Conflicts: kdebase-workspace(-libs,-devel) < 4.3.80 * Sat Dec 26 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.85-5 - move kdecmake,makekdewidgets manpages to -devel (#549947) * Sat Dec 19 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.85-4 - tarball respin * Fri Dec 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.85-3 - -devel: Requires: attica-devel * Fri Dec 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.85-2 - plasma_scrollwidget patch * Fri Dec 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.85-1 - 4.3.85 (4.4 beta2) * Wed Dec 16 2009 Jaroslav Reznik <jreznik@redhat.com> - 4.3.80-5 - Repositioning the KDE Brand (#547361) * Wed Dec 09 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.80-4 - BR: attica-devel shared-desktop-ontologies-devel - phonon_ver 4.3.80 - soprano_ver 2.3.70 * Fri Dec 04 2009 Than Ngo <than@redhat.com> - 4.3.80-3 - respin * Thu Dec 03 2009 Kevin Kofler <Kevin@tigcc.ticalc.org> - 4.3.80-2 - BR polkit-qt-devel - fix the build of the KAuth PolkitQt-1 backend (upstream patch) * Tue Dec 01 2009 Ben Boeckel <MathStuf@gmail.com> - 4.3.80-1 - KDE 4.4 beta1 (4.3.80) * Wed Nov 25 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.75-0.2.svn1048496 - -devel: Provides: kdelibs4-devel%{?_isa} ... - Obsoletes: kdelibs-experimental(-devel) < 4.3.75 * Fri Nov 20 2009 Ben Boeckel <MathStuf@gmail.com> - 4.3.75-0.1.svn1048496 - Update to 4.3.75 snapshot * Wed Nov 18 2009 Rex Dieter <rdieter@fedoraproject.org> - 4.3.3-6 - rebuild (for qt-4.6.0-rc1, f13+) - fix/revert soprano_ver change in -5
120 lines
4.6 KiB
Diff
120 lines
4.6 KiB
Diff
diff -ur kdelibs-4.3.80/solid/solid/backends/hal/halstorageaccess.cpp kdelibs-4.3.80-policykit-workaround/solid/solid/backends/hal/halstorageaccess.cpp
|
|
--- kdelibs-4.3.80/solid/solid/backends/hal/halstorageaccess.cpp 2009-12-01 01:27:28.000000000 +0100
|
|
+++ kdelibs-4.3.80-policykit-workaround/solid/solid/backends/hal/halstorageaccess.cpp 2009-12-03 03:49:55.000000000 +0100
|
|
@@ -17,6 +17,8 @@
|
|
|
|
*/
|
|
|
|
+#include <config-prefix.h> // for LIBEXEC_INSTALL_DIR
|
|
+
|
|
#include "halstorageaccess.h"
|
|
|
|
#include "halfstabhandling.h"
|
|
@@ -177,11 +179,21 @@
|
|
{
|
|
// TODO: Better error reporting here
|
|
if (m_setupInProgress) {
|
|
+ if (error.name() == "org.freedesktop.Hal.Device.PermissionDeniedByPolicy") {
|
|
+ if (callPrivilegedMount())
|
|
+ return;
|
|
+ // if we fail to run kdesu, fall through and emit the original PermissionDeniedByPolicy error
|
|
+ }
|
|
m_setupInProgress = false;
|
|
emit setupDone(Solid::UnauthorizedOperation,
|
|
QString(error.name()+": "+error.message()),
|
|
m_device->udi());
|
|
} else if (m_teardownInProgress) {
|
|
+ if (error.name() == "org.freedesktop.Hal.Device.PermissionDeniedByPolicy") {
|
|
+ if (callPrivilegedUnmount())
|
|
+ return;
|
|
+ // if we fail to run kdesu, fall through and emit the original PermissionDeniedByPolicy error
|
|
+ }
|
|
m_teardownInProgress = false;
|
|
emit teardownDone(Solid::UnauthorizedOperation,
|
|
QString(error.name()+": "+error.message()),
|
|
@@ -311,8 +323,9 @@
|
|
#else
|
|
QString uid="uid=";
|
|
#endif
|
|
- if (halOptions.contains(uid)) {
|
|
- options << uid+QString::number(::getuid());
|
|
+ if (halOptions.contains(uid) &&
|
|
+ (fstype == "vfat" || fstype == "iso9660" || fstype == "hfs" || fstype == "udf")) {
|
|
+ options << uid+QString::number(::getuid());
|
|
}
|
|
|
|
#ifdef Q_OS_FREEBSD
|
|
@@ -354,6 +367,59 @@
|
|
SLOT(slotDBusError(const QDBusError &)));
|
|
}
|
|
|
|
+bool Solid::Backends::Hal::StorageAccess::callPrivilegedMount()
|
|
+{
|
|
+ QString udi = m_device->udi();
|
|
+ QString options;
|
|
+ QStringList halOptions = m_device->property("volume.mount.valid_options").toStringList();
|
|
+ QString fstype = m_device->property("volume.fstype").toString();
|
|
+
|
|
+ if (halOptions.contains("uid=")
|
|
+ && (fstype == "vfat" || fstype == "iso9660" || fstype == "hfs" || fstype == "udf")) {
|
|
+ options = "uid="+QString::number(::getuid());
|
|
+ }
|
|
+
|
|
+ m_process = new QProcess(this);
|
|
+
|
|
+ connect(m_process, SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
+ this, SLOT(slotProcessFinished(int, QProcess::ExitStatus)));
|
|
+
|
|
+ m_process->start(LIBEXEC_INSTALL_DIR "/kdesu", QStringList() << "-d" << "-t"
|
|
+ << "--noignorebutton" << "-c"
|
|
+ << QString::fromLatin1("dbus-send --system --print-reply --dest=org.freedesktop.Hal %1 "
|
|
+ "org.freedesktop.Hal.Device.Volume.Mount string: string: "
|
|
+ "array:string:%2").arg(udi).arg(options));
|
|
+
|
|
+ if (m_process->waitForStarted()) {
|
|
+ return true;
|
|
+ } else {
|
|
+ delete m_process;
|
|
+ return false;
|
|
+ }
|
|
+}
|
|
+
|
|
+bool Solid::Backends::Hal::StorageAccess::callPrivilegedUnmount()
|
|
+{
|
|
+ QString udi = m_device->udi();
|
|
+
|
|
+ m_process = new QProcess(this);
|
|
+
|
|
+ connect(m_process, SIGNAL(finished(int, QProcess::ExitStatus)),
|
|
+ this, SLOT(slotProcessFinished(int, QProcess::ExitStatus)));
|
|
+
|
|
+ m_process->start(LIBEXEC_INSTALL_DIR "/kdesu", QStringList() << "-d" << "-t"
|
|
+ << "--noignorebutton" << "-c"
|
|
+ << QString::fromLatin1("dbus-send --system --print-reply --dest=org.freedesktop.Hal %1 "
|
|
+ "org.freedesktop.Hal.Device.Volume.Unmount array:string:").arg(udi));
|
|
+
|
|
+ if (m_process->waitForStarted()) {
|
|
+ return true;
|
|
+ } else {
|
|
+ delete m_process;
|
|
+ return false;
|
|
+ }
|
|
+}
|
|
+
|
|
bool StorageAccess::callHalVolumeUnmount()
|
|
{
|
|
QDBusConnection c = QDBusConnection::systemBus();
|
|
diff -ur kdelibs-4.3.80/solid/solid/backends/hal/halstorageaccess.h kdelibs-4.3.80-policykit-workaround/solid/solid/backends/hal/halstorageaccess.h
|
|
--- kdelibs-4.3.80/solid/solid/backends/hal/halstorageaccess.h 2009-12-01 01:27:28.000000000 +0100
|
|
+++ kdelibs-4.3.80-policykit-workaround/solid/solid/backends/hal/halstorageaccess.h 2009-12-03 03:49:55.000000000 +0100
|
|
@@ -70,6 +70,9 @@
|
|
bool callSystemMount();
|
|
bool callSystemUnmount();
|
|
|
|
+ bool callPrivilegedMount();
|
|
+ bool callPrivilegedUnmount();
|
|
+
|
|
bool requestPassphrase();
|
|
void callCryptoSetup(const QString &passphrase);
|
|
bool callCryptoTeardown();
|