Bug 338756

Summary: desktopexecparser gives broken exec arguments when kdesu is not present
Product: [Frameworks and Libraries] frameworks-kio Reporter: Harald Sitter <sitter>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: normal CC: de.meyer.maarten, kdelibs-bugs, simonandric5
Priority: NOR    
Version: 5.1.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Harald Sitter 2014-09-02 18:24:05 UTC
in desktopexecparser.cpp there's this line:
            result << QStandardPaths::findExecutable("kdesu") << "-u";

which will lead to bogus paths if kdesu can not be found but a desktop file contains X-KDE-SubstituteUID=true. kdesu lives in kde-cli-tools which is part of the workspace, so a framework very much should not depend on it or at the very least correctly handle it not being there. currently desktopexecparser will return an invalid argument list in this case leading to broken end results as the argument list at that point will no longer constitute a valid command in any form.

e.g. 
args ("", "-u", "root", "-c", "/usr/sbin/synaptic")


(alternatively kdesu perhaps should be moved into a framework)

Reproducible: Always
Comment 1 Maarten De Meyer 2014-09-13 15:59:24 UTC

*** This bug has been marked as a duplicate of bug 338755 ***