rpms/kdebase-workspace/devel kdebase-workspace-4.4.90-rootprivs.patch, NONE, 1.1 kdebase-workspace.spec, 1.412, 1.413 kdebase-workspace-4.3.75-rootprivs.patch, 1.1, NONE
Kevin Kofler
kkofler at fedoraproject.org
Fri Jun 25 22:51:25 UTC 2010
Author: kkofler
Update of /cvs/pkgs/rpms/kdebase-workspace/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv23146/devel
Modified Files:
kdebase-workspace.spec
Added Files:
kdebase-workspace-4.4.90-rootprivs.patch
Removed Files:
kdebase-workspace-4.3.75-rootprivs.patch
Log Message:
* Fri Jun 25 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.4.90-2
- port and reapply rootprivs (#434824) patch
kdebase-workspace-4.4.90-rootprivs.patch:
ModuleView.cpp | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
--- NEW FILE kdebase-workspace-4.4.90-rootprivs.patch ---
diff -ur kdebase-workspace-4.4.90/systemsettings/core/ModuleView.cpp kdebase-workspace-4.4.90-rootprivs/systemsettings/core/ModuleView.cpp
--- kdebase-workspace-4.4.90/systemsettings/core/ModuleView.cpp 2010-06-24 18:28:10.000000000 +0200
+++ kdebase-workspace-4.4.90-rootprivs/systemsettings/core/ModuleView.cpp 2010-06-26 00:47:30.000000000 +0200
@@ -41,6 +41,7 @@
#include <KCModuleProxy>
#include <KStandardGuiItem>
#include <KDialogButtonBox>
+#include <KStandardDirs>
#include <kauthaction.h>
#include "MenuItem.h"
@@ -131,6 +132,35 @@
return;
}
+ {
+ MenuItem *menuItemPtr = menuItem.data( Qt::UserRole ).value<MenuItem*>();
+ if ( menuItemPtr->service()->property( "X-KDE-RootOnly", QVariant::Bool ).toBool() ) {
+ QString kdesu = KStandardDirs::findExe( "kdesu" );
+ QString cmd = menuItemPtr->service()->exec().trimmed();
+
+ /* Prepare the process to run the kcmshell */
+ if ( cmd.left(5) == "kdesu" )
+ {
+ cmd = cmd.remove(0,5).trimmed();
+
+ /* Remove all kdesu switches */
+ while ( cmd.length() > 1 && cmd[ 0 ] == '-' )
+ cmd = cmd.remove( 0, cmd.indexOf( ' ' ) ).trimmed();
+ }
+
+ if ( cmd.left(9) == "kcmshell4" )
+ cmd = cmd.remove(0,9).trimmed();
+
+ QStringList args;
+ args << "-i" << QString( menuItemPtr->service()->icon() ) << "-c" << QString( "%1 %2 --lang %3" ).arg( KStandardDirs::locate("exe", "kcmshell4") ).arg( cmd ).arg( KGlobal::locale()->language() );
+
+ kDebug() << "Starting root module: " << args;
+ QProcess::startDetached( kdesu, args );
+
+ return;
+ }
+ }
+
QList<QModelIndex> indexes;
for ( int done = 0; menuItem.model()->rowCount( menuItem ) > done; done = 1 + done ) {
indexes << menuItem.model()->index( done, 0, menuItem );
Index: kdebase-workspace.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kdebase-workspace/devel/kdebase-workspace.spec,v
retrieving revision 1.412
retrieving revision 1.413
diff -u -p -r1.412 -r1.413
--- kdebase-workspace.spec 25 Jun 2010 18:33:42 -0000 1.412
+++ kdebase-workspace.spec 25 Jun 2010 22:51:24 -0000 1.413
@@ -13,7 +13,7 @@
Summary: KDE Workspace
Name: kdebase-workspace
Version: 4.4.90
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Group: User Interface/Desktops
@@ -35,7 +35,7 @@ Patch4: kdebase-workspace-4.2.85-ck-shut
Patch7: kdebase-workspace-4.0.3-krdb.patch
Patch8: kdebase-workspace-4.2.85-klipper-url.patch
# 434824: KDE4 System Settings - No Method To Enter Administrative Mode
-Patch9: kdebase-workspace-4.3.75-rootprivs.patch
+Patch9: kdebase-workspace-4.4.90-rootprivs.patch
Patch11: kdebase-workspace-4.1.96-font.patch
Patch14: kdebase-workspace-4.2.0-klipper-arora.patch
Patch15: kdebase-workspace-4.3.75-kio_sysinfo.patch
@@ -293,8 +293,7 @@ Requires: akonadi
%patch4 -p1 -b .ck-shutdown
%patch7 -p0 -b .krdb
%patch8 -p1 -b .klipper-url
-## FIXME/TODO for jreznik :)
-#patch9 -p1 -b .rootprivs
+%patch9 -p1 -b .rootprivs
%patch11 -p1 -b .font
# kio_sysinfo based on OpenSUSE's patch
%patch15 -p1 -b .kio_sysinfo
@@ -690,6 +689,9 @@ fi
%changelog
+* Fri Jun 25 2010 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.4.90-2
+- port and reapply rootprivs (#434824) patch
+
* Fri Jun 25 2010 Jaroslav Reznik <jreznik at redhat.com> - 4.4.90-1
- 4.5 RC1 (4.4.90)
--- kdebase-workspace-4.3.75-rootprivs.patch DELETED ---
More information about the scm-commits
mailing list