Bug 447768 - The GUI should not be run as root but only prompt for the root password for loading the logs (security & Wayland issues)
Summary: The GUI should not be run as root but only prompt for the root password for l...
Status: REPORTED
Alias: None
Product: KSystemLog
Classification: Applications
Component: general (show other bugs)
Version: 20.08
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Nicolas Ternisien
URL:
Keywords:
: 456793 486442 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-01-01 10:51 UTC by myndstream
Modified: 2024-05-02 20:11 UTC (History)
3 users (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 myndstream 2022-01-01 10:51:04 UTC
SUMMARY
KSystemLog is started as root to read the log files. However, it is bad practice to  run GUIs with root privileges due to security vulnerability issues and because this doesn't work in Wayland. I recently switched to Wayland and KSystemLog doesn't work anymore.

Relevant info can be found here for example: https://wiki.archlinux.org/title/Running_GUI_applications_as_root

Here is a bug report about Wayland not running applications as root: https://bugzilla.gnome.org/show_bug.cgi?id=772875

STEPS TO REPRODUCE
1. Switch to Wayland on Debian11/KDE (upper left of the login screen)
2. Try to run KSystemLog, entering the root password

OBSERVED RESULT
Does not start. (It only starts when starting without sudo from the console, not via the .desktop entry in the menu or via the root GUI Wayland workaround.)

EXPECTED RESULT
It should start and after starting prompt the user for the root password to read the root-owned log files.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian 11
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
KSystemLog: "4:20.12.0-1"

ADDITIONAL INFORMATION
Comment 1 Fabian Vogt 2022-01-29 20:53:55 UTC
For making kdesu/xdg-su work with XWayland at least you need https://invent.kde.org/plasma/kwin/-/merge_requests/665 (5.22+).
Comment 2 fanzhuyifan 2024-05-02 20:11:52 UTC
*** Bug 456793 has been marked as a duplicate of this bug. ***
Comment 3 fanzhuyifan 2024-05-02 20:11:58 UTC
*** Bug 486442 has been marked as a duplicate of this bug. ***