Summary: | partitionmanager / kdesu : cannot run with root privileges | ||
---|---|---|---|
Product: | [Applications] partitionmanager | Reporter: | Mark <markotahal> |
Component: | general | Assignee: | Volker Lanz <vl> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | ossi |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Mark
2011-01-31 13:19:57 UTC
called with kdesu directly it works ok. So $ partitionmanager opens a password dialog and fails $ kdesu partitionmanager opens the same dialog and succeeds. Thank you for your interest in KDE Partition Manager and taking the time to submit this tracker entry. It appears some recent commits to kdesu's source code brought about a change in behaviour for kdesu that KDE Partition Manager is not prepared for. Background: When you run KDE Partition Manager as non-root user it internally re-runs itself with any of kdesu, kdesudo, gksudo or gksu (in this order) asking for privileges. On ArchLinux, the first one to be found is kdesu, so it is being used. To avoid endless redirects when elevating privileges fails KDE Partition Manager passes a "--dontsu" argument to the new instance of itself to remember not to ask again in that case. Now kdesu seems to have changed how it handles arguments from the command line with 4.6.0 and thus KDE Partition Manager fails to get root privileges for you. What KDE Partition Manager actually calls is this command: $ kdesu "/usr/bin/partitionmanager-bin --dontsu" If you run this from a shell you will find it does not work. So much for the analysis and the background; about what needs fixing I'm not yet sure. Ossi, can I have your input on this? It seems you're maintaining kdesu from recent commits. please post the *exact* arguments you are passing to kdesu and i may be able to tell you what to fix. Thanks for trying to help, Ossi. I don't quite see what additional information you're asking for. Let me repeat: This fails from a shell: $ kdesu "/usr/bin/partitionmanager --dontsu" To get KDE Partition Manager out of the picture, this also does not work: $ kdesu "ls -l" Just in case, this is the relevant code from KDE Partition Manager (line 86ff): http://websvn.kde.org/branches/partitionmanager/1.0/partitionmanager/src/util/helpers.cpp?revision=1113777&view=markup use either kdesu -c "ls -l" or kdesu ls -l The former suggestion would lead to a special case just for kdesu in the code. That would be unfortunate, but I'll consider it if we don't reach any other solution here. The latter obviously does not work: $ kdesu ls -l kdesu: Unknown option 'l'. kdesu: Use --help to get a list of available command line options. As far as I can remember it, the kdesu "ls -l" approach worked when I implemented the code in question in KDE Partition Manager early in 2010. It still works with the other three privilege-elevation-methods, afaict. My suspicion is that maybe one of the patches to kdesu to change its escaping behaviour unintentionally broke this. Is this possible? Guys, thank you both for such a quick support, this is really amazing! :) Good job and many thanks. well, the -c syntax is quite like plain su. the argv-style syntax does indeed not quite work according to plan ... :} please spin off a bug report for that if you want to. *** This bug has been marked as a duplicate of bug 265026 *** |