configure.ac, unix/Daemon: check for initgroups() at configure time
The initgroups() manpage says we need to check for _BSD_SOURCE. The thing is that glibc deprecated this macro, and doesn't define it anymore, effectively breaking all MPD supplementary groups. The real fix is to check for initgroups() availability at configure time, instead of relying on the deprecated _BSD_SOURCE macro.
This commit is contained in:
parent
1e0ad1f6bf
commit
b3460f3f54
1
NEWS
1
NEWS
|
@ -3,6 +3,7 @@ ver 0.19.13 (not yet released)
|
||||||
- aiff, riff: fix ID3 chunk padding
|
- aiff, riff: fix ID3 chunk padding
|
||||||
* decoder
|
* decoder
|
||||||
- ffmpeg: support the TAK codec
|
- ffmpeg: support the TAK codec
|
||||||
|
* initialize supplementary groups with glibc 2.19+
|
||||||
|
|
||||||
ver 0.19.12 (2015/12/15)
|
ver 0.19.12 (2015/12/15)
|
||||||
* fix assertion failure on malformed UTF-8 tag
|
* fix assertion failure on malformed UTF-8 tag
|
||||||
|
|
|
@ -206,6 +206,7 @@ if test x$host_is_linux = xyes; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_FUNCS(getpwnam_r getpwuid_r)
|
AC_CHECK_FUNCS(getpwnam_r getpwuid_r)
|
||||||
|
AC_CHECK_FUNCS(initgroups)
|
||||||
AC_CHECK_FUNCS(strndup)
|
AC_CHECK_FUNCS(strndup)
|
||||||
|
|
||||||
if test x$host_is_linux = xyes; then
|
if test x$host_is_linux = xyes; then
|
||||||
|
|
|
@ -110,7 +110,7 @@ daemonize_set_user(void)
|
||||||
(int)user_gid);
|
(int)user_gid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _BSD_SOURCE
|
#ifdef HAVE_INITGROUPS
|
||||||
/* init supplementary groups
|
/* init supplementary groups
|
||||||
* (must be done before we change our uid)
|
* (must be done before we change our uid)
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue