Print deprecation notice when running SUID

Tracking swaywm/sway@e1db1f8

Add soft deprecation warning to highlight future intent of removing the
code which drops SUID privileges. libseat now has a better alternative in
the form of seatd-launch which uses the normal seatd daemon & libseat
backend and takes care of SUID.

Fixes issue #212
This commit is contained in:
Johan Malm 2022-04-20 18:17:39 +01:00
parent fa37fba0b0
commit c7aaa8dd61

View file

@ -69,6 +69,9 @@ static void
drop_permissions(void)
{
if (getuid() != geteuid() || getgid() != getegid()) {
wlr_log(WLR_ERROR, "!!! DEPRECATION WARNING: "
"SUID privilege drop will be removed in future releases; "
"Please migrate to seatd-launch");
if (setgid(getgid())) {
wlr_log(WLR_ERROR, "unable to drop root group");
exit(EXIT_FAILURE);