Red Hat Bugzilla – Bug 508593
dropped rootprivs patch
Last modified: 2009-06-30 11:56:39 EDT
Looks like as of kdebase-workspace-4.2.85 the rootprivs patch, providing admin/root mode to systemsettings, was dropped.
System Settings has been completely reorganized in 4.3, I need to locate the places to change and then manually apply the changes. I'll do so ASAP.
systemsettings/app/main.cpp is where much of the existing patch still applies, if that helps.
That file is mostly empty in 4.2.95 (there's just a small main function) and doesn't contain any of the code being patched.
OK, I found the code in systemsettings/core/ModuleView.cpp and ported the patch. For reference, the original kdebase-workspace-4.1.2-rootprivs.patch had 5 hunks:
1. adds #include <QProcess>
2. adds #include <KStandardDirs>
3. removes duplicate connection of the selectionChanged slot to prevent kdesu from getting started twice
4. checks X-KDE-RootOnly property and sets bool needsRootPrivs
5. does the actual work based on needsRootPrivs
What I did:
1. dropped, as ModuleView.cpp already includes <QProcess>
2. ported (trivial)
3. dropped as this bug is fixed upstream. The connection is now done in IconMode::initWidget() in systemsettings/icons/IconMode.cpp and it's a single:
connect( tv, SIGNAL( activated( const QModelIndex& ) ),
this, SLOT( changeModule(const QModelIndex& ) ) );
The bogus connections to the clicked or doubleClicked signals are gone.
4. and 5. ported, combined (did away with the unneeded boolean and just checked the property directly)