Version: unspecified (using KDE 4.6.0) OS: Linux kdesu in KDE versions prior to 4.6 used to handle a call like $ kdesu "ls -l" correctly. Since (probably) 4.6.0 this no longer works. Reproducible: Always See discussion in this issue: https://bugs.kde.org/show_bug.cgi?id=264947
*** Bug 264947 has been marked as a duplicate of this bug. ***
Use: kdesu -c "ls -l" If you do not use the -c option, then the argument is now interpreted as the command name (allowing spaces within the name). The change is incompatible to older KDE releases, but makes it compatible with "su". I am closing as WONTFIX, because the incompatibility to previous versions is intended. If you have any reason to disagree with this resolution, please reopen or add a comment. Note that the "kdesu" command is installed into LIBEXEC prefix, so generally, it is not user-callable anyway. WebSVN link: http://websvn.kde.org/?revision=1196645&view=revision
I should have read the discussion in the duplicate before closing ...
Git commit a68bd758ca347a82e19d266f0c8356988d9d7e78 by Oswald Buddenhagen. Committed on 05/03/2011 at 19:09. Pushed by ossi into branch 'KDE/4.6'. properly parse "kdesu command arg1 arg2 ..." syntax BUG: 265026 FIXED-IN: 4.6.2 M +1 -1 kdesu/kdesu/kdesu.cpp http://commits.kde.org/kde-runtime/a68bd758ca347a82e19d266f0c8356988d9d7e78
*** Bug 271264 has been marked as a duplicate of this bug. ***
It appears there's a regression on 4.8.0 (though it seems like it does not work on 4.7.4 either) for this. At least I can reproduce the problem again (Kubuntu packages, after symlinking /usr/lib/kde4/libexec/kdesu-distrib/kdesu to /usr/bin): $ kdesu "ls -l" asks for the password, then bails out with "Cannot execute command ' 'ls -l''." It does work with -c, but we've been through that discussion already and I still would like to avoid adding a special case for kdesu. I'll set #293229 as a duplicate of this one because that's what it probably causes on Fedora to break.
*** Bug 293229 has been marked as a duplicate of this bug. ***
no, it's not. use either kdesu -c "ls -l" or kdesu ls -l everything else is broken by design. this change of behavior has been discussed before.
Like I said, I would like to avoid treating kdesu on from "some version after 4.6" like a special case, if at all possible. Can you point me to where we agreed a change in behaviour, breaking existing solutions, is necessary? My recollection is that we agreed to the opposite.
i think i made it pretty clear in bug 264947 comment 9 that i would do exactly that. there is no way to have the sane semantics without breaking backwards compatibility of the no-"-c" syntax, and i'm not going to back off on the decision to do so. and as was pointed out already, your version dichotomy is invalid anyway: you are using the "-c" syntax (whose semantics did not change), except that you forgot to add the option - kdesu just happened to be forgiving about that previously.
[me in 264947 comment #7] 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? [you in 264947 comment #9] 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 report is the spun-off one. I take from your replies now that you never intended to fix it and this was some sort of communication error. I don't expect discussing this any further will help users of my application, so I'll implement a workaround.