BuddiesOfBudgie / budgie-screensaver

Budgie Screensaver is a fork of old gnome screensaver for purposes of providing an authentication prompt on wake.
GNU General Public License v2.0
15 stars 2 forks source link

Dubious removal of setgroups from setuid.c #19

Open fweimer-rh opened 1 year ago

fweimer-rh commented 1 year ago

#ifdef _BSD_SOURCE (added in 78799a0c4861d8e5577b80952c7407bd002f7f9a) is never true during the build because _BSD_SOURCE is not defined.

The root cause for the implicit declaration of setgroups is in meson.build, where c_std=c11 is specified. This results in building with -std=c11, which turns on strict POSIX mode in glibc, so setgroups is no longer declared in <grp.h>.

You probably should not downgrade the C compiler defaults using -std=c11, or define _DEFAULT_SOURCE (and perhaps _BSD_SOURCE for really old glibc) at the start of setuid.c.

serebit commented 1 year ago

I don't think we care about really old glibc, so we can probably ditch _BSD_SOURCE.