Bug 344233 - desktopexecparser spits out bogus arguments
Summary: desktopexecparser spits out bogus arguments
Status: REPORTED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-16 11:37 UTC by Harald Sitter
Modified: 2025-03-24 22:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Sitter 2015-02-16 11:37:57 UTC
using a desktop file with substituteuid=true and an exec line that contains option switches screws with both su -c and kdesu -c as both need to be quoted (one presumes anyway)

e.g. argumentList is:
> /usr/bin/kdesu -u root -c /usr/bin/do-release-upgrade -m desktop -f DistUpgradeViewKDE
but should be something like
> /usr/bin/kdesu -u root -c '/usr/bin/do-release-upgrade -m desktop -f DistUpgradeViewKDE'

cat ~/.local/share/applications/muon-release-upgrade.desktop
[Desktop Entry]
Categories=Qt;KDE;System;
Exec=do-release-upgrade -m desktop -f DistUpgradeViewKDE
GenericName=Release Upgrader
Icon=system-software-update
Name=Release Upgrader
NoDisplay=true
Type=Application
X-KDE-SubstituteUID=true

    KService::Ptr service = KService::serviceByDesktopName(QLatin1String("muon-release-upgrade"));
    KIO::DesktopExecParser parser(*service, QList<QUrl>());
    QProcess::startDetached(parser.resultingArguments().join(' '));

leads to 
Unknown option 'm'.


Reproducible: Always
Comment 1 Justin Zobel 2021-03-09 05:54:07 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.