Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 298359 Details for
Bug 428212
unable to mount partitions in dolphin
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Untested port of the Kubuntu patch
kdelibs-4.0.2-userdiskmount.patch (text/plain), 4.79 KB, created by
Kevin Kofler
on 2008-03-18 10:04:33 UTC
(
hide
)
Description:
Untested port of the Kubuntu patch
Filename:
MIME Type:
Creator:
Kevin Kofler
Created:
2008-03-18 10:04:33 UTC
Size:
4.79 KB
patch
obsolete
>diff -ur kdelibs-4.0.2/solid/solid/backends/hal/halstorageaccess.cpp kdelibs-4.0.2-userdiskmount/solid/solid/backends/hal/halstorageaccess.cpp >--- kdelibs-4.0.2/solid/solid/backends/hal/halstorageaccess.cpp 2008-01-05 01:00:10.000000000 +0100 >+++ kdelibs-4.0.2-userdiskmount/solid/solid/backends/hal/halstorageaccess.cpp 2008-03-18 11:00:40.000000000 +0100 >@@ -20,6 +20,7 @@ > #include "halstorageaccess.h" > > #include <QtCore/QDebug> >+#include <QtCore/QProcess> > #include <QtDBus/QDBusConnection> > #include <QtDBus/QDBusInterface> > #include <QtDBus/QDBusReply> >@@ -131,11 +132,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, > 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, > error.name()+": "+error.message(), >@@ -229,8 +240,10 @@ > "Mount"); > QStringList options; > QStringList halOptions = m_device->property("volume.mount.valid_options").toStringList(); >+ QString fstype = m_device->property("volume.fstype").toString(); > >- if (halOptions.contains("uid=")) { >+ if (halOptions.contains("uid=") >+ && (fstype == "vfat" || fstype == "iso9660" || fstype == "hfs" || fstype == "udf")) { > options << "uid="+QString::number(::getuid()); > } > >@@ -256,6 +269,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 Solid::Backends::Hal::StorageAccess::callSystemMount() > { > const QString device = m_device->property("block.device").toString(); >diff -ur kdelibs-4.0.2/solid/solid/backends/hal/halstorageaccess.h kdelibs-4.0.2-userdiskmount/solid/solid/backends/hal/halstorageaccess.h >--- kdelibs-4.0.2/solid/solid/backends/hal/halstorageaccess.h 2008-01-05 01:00:11.000000000 +0100 >+++ kdelibs-4.0.2-userdiskmount/solid/solid/backends/hal/halstorageaccess.h 2008-03-18 09:26:39.000000000 +0100 >@@ -69,6 +69,9 @@ > bool callSystemMount(); > bool callSystemUnmount(); > >+ bool callPrivilegedMount(); >+ bool callPrivilegedUnmount(); >+ > bool requestPassphrase(); > void callCryptoSetup(const QString &passphrase); > bool callCryptoTeardown();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 428212
:
298357
| 298359