kdecore: drop reliance on wheel group for KAuthorization helpers

groups are obsolete thing (e.g. disk, optical, power, etc.)

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2023-07-10 02:54:21 +03:00
parent f3b9c12f45
commit c4d7fcfaa8
4 changed files with 9 additions and 13 deletions

View file

@ -229,14 +229,14 @@ macro(KDE4_ADD_WIDGET _sources)
endforeach()
endmacro(KDE4_ADD_WIDGET)
# KDE4_INSTALL_AUTH_HELPER_FILES(HELPER_TARGET HELPER_ID HELPER_USER)
# KDE4_INSTALL_AUTH_HELPER_FILES(HELPER_TARGET HELPER_ID)
# This macro adds the needed files for an helper executable meant to be used
# by applications using KAuth. It accepts the helper target, the helper ID
# (the D-Bus name) and the user under which the helper will run on.
# by applications using KAuth. It accepts the helper target and the helper ID
# (the D-Bus name).
#
# *WARNING* You have to install the helper in ${KDE4_LIBEXEC_INSTALL_DIR} to
# make sure everything will work.
function(KDE4_INSTALL_AUTH_HELPER_FILES HELPER_TARGET HELPER_ID HELPER_USER)
function(KDE4_INSTALL_AUTH_HELPER_FILES HELPER_TARGET HELPER_ID)
if(_kdeBootStrapping)
set(_stubFilesDir ${CMAKE_SOURCE_DIR}/kdecore)
else()

View file

@ -4,16 +4,12 @@
<busconfig>
<!-- Only user root can own the foo helper -->
<policy user="@HELPER_USER@">
<policy user="root">
<allow own="@HELPER_ID@"/>
</policy>
<!-- Only members of the wheel group and root can send messages to the foo helper -->
<policy user="root">
<allow send_destination="@HELPER_ID@"/>
<allow send_interface="@HELPER_ID@"/>
</policy>
<policy group="wheel">
<!-- Anyone can send messages to the foo helper -->
<policy context="default">
<allow send_destination="@HELPER_ID@"/>
<allow send_interface="@HELPER_ID@"/>
</policy>

View file

@ -1,4 +1,4 @@
[D-BUS Service]
Name=@HELPER_ID@
Exec=@KDE4_LIBEXEC_INSTALL_DIR@/@HELPER_TARGET@
User=@HELPER_USER@
User=root

View file

@ -63,5 +63,5 @@ install(
DESTINATION ${KDE4_LIBEXEC_INSTALL_DIR}
)
kde4_install_auth_helper_files(kpowermanager_helper org.kde.kpowermanager.helper root)
kde4_install_auth_helper_files(kpowermanager_helper org.kde.kpowermanager.helper)