| Summary: | KDE su: "su returned with an error" | ||
|---|---|---|---|
| Product: | [Applications] kdesu | Reporter: | Sylens <oat-lip-confront> |
| Component: | general | Assignee: | kdesu bugs tracker <kdesu-bugs-null> |
| Status: | CONFIRMED --- | ||
| Severity: | normal | CC: | alexandr42suv, amrecio, apn235, blackadderkate, imzeroo, j.d.tanner, kevin, oat-lip-confront, pavlin.marko, rikmills |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Kubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | this is the error it pops up, sometimes it appears 10-20x times at once | ||
Broken for me on Kubuntu 25.10 as well, when trying to open Driver Manager, Operating System: Kubuntu 25.10 KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.2 Kernel Version: 6.17.0-6-generic (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 1700X Eight-Core Processor Memory: 16 GiB of RAM (15.5 GiB usable) Graphics Processor: NVIDIA GeForce RTX 3050 Same thing here, Kubuntu 25.10, fresh install. Happening with the ksystemlog as well. Same here, Kubuntu 25.10, fresh install. Happens when trying to open software sources through Discover. But no problems when opening in terminal using sudo software-properties-qt Same here, and present as a bug even if 6.5.1 is installed via backports Same here. When trying to open KSystemLog or Driver manager So it appears the actual KDESU binary is in kde-cli-tools, not kdesu(!) I have compiled kde-cli-tools manually using kde-builder, and that works perfectly, so it seems that something may have gone wrong during compilation or packaging, and the binary provided in the Kubuntu package is corrupt. As a result I have reported it as a bug on Ubuntu Launchpad: see https://bugs.launchpad.net/ubuntu/+source/kde-cli-tools/+bug/2130805 Dunno if the kdesu programmer is on the cc list for this bug, but I have done a lot of poking around over the last few days and discovered what the problem is.
The hang is due to the settings used by the DebHelper tool, used by Ubuntu/Debian to compile their packages (possibly -DKDESU_USE_SUDO_DEFAULT).
I _think_ this causes kdesu to send different flags to sudo, which in turn changes the authentication text string it returns, which the code does not expect.
As a result, kdesu assumes what is being sent bu sudo is not a prompt for the password - so it continues to wait for something that has actually been received - causing the hang.
These are the authentication prompts received by kdesu, depending on the compiler used:
Prompt received when compiled using make & cmake: Password:
Prompt received when compiled using debhelper: [sudo: authenticate] Password:
Prompt received by the debhelper autotests: [sudo] password for jr:
As you can see, the debhelper prompt has two colons, when it is expecting only one (see line 268 of kdesu/src/suprocess.cpp.)
if (colon == 1 && line[j] == ':') {
To fix it, the detection code for detecting when a password prompt has been received needs to be amended, or the arguments sent to sudo need to be amended so the password prompt request is consistent.
One potential fix is to skip any text in square brackets that was received - I have a patch which does that, that I can attach if required.
|
Created attachment 186094 [details] this is the error it pops up, sometimes it appears 10-20x times at once SUMMARY After doing a sudo or pkexec command, after a few minutes later that command was issued, sometimes kdesu randomly throws up an error window (or sometimes even 10-20 windows at once) STEPS TO REPRODUCE 1. launch a GUI application either with pkexec or sudo 2. give a few minutes 3. kdesu error window(s) start to randomly throw up OBSERVED RESULT random popups EXPECTED RESULT no random popups please SOFTWARE/OS VERSIONS Operating System: Kubuntu 25.10 KDE Plasma Version: 6.5.0 KDE Frameworks Version: 6.19.0 Qt Version: 6.9.2 Kernel Version: 6.17.0-5-generic (64-bit) Graphics Platform: Wayland Processors: 4 × Intel® Core™ i5-3470 CPU @ 3.20GHz Memory: 16 GiB of RAM (15.6 GiB usable) Graphics Processor: Quadro K620 Manufacturer: FUJITSU Product Name: ESPRIMO E510