Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dubious removal of setgroups from setuid.c #19

Open
fweimer-rh opened this issue Feb 7, 2023 · 1 comment
Open

Dubious removal of setgroups from setuid.c #19

fweimer-rh opened this issue Feb 7, 2023 · 1 comment

Comments

@fweimer-rh
Copy link

fweimer-rh commented Feb 7, 2023

#ifdef _BSD_SOURCE (added in 78799a0) 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
Copy link
Member

serebit commented Feb 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants