Skip to content

Handle missing user when installing setuid in meson_post_install.py

The logic that sets the dbus-daemon-launcher-helper setuid does not handle the case where the group named the same as the dbus_user does not exist. This makes the assumption that the primary group of the dbus_user has the same name as the dbus_user. This may not be the case.

To remedy these issues, obtain the group id for dbus_user instead of attempting to retrieve the group id by name. To avoid a failure when the user does not exist, handle the KeyError exception from the pwd.getpwnam function by printing a warning and skipping the logic to set the binary setuid.

Resolves: #492

Merge request reports