glibc and getgrouplist
- From: Roland Illig <roland illig gmx de>
- To: MC Devel <mc-devel gnome org>
- Subject: glibc and getgrouplist
- Date: Wed, 20 Jul 2005 21:08:27 +0200
and, in src/utilunix.c, write
#if defined(HAVE_GETGROUPLIST) && !defined(HAVE_GLIBC_2_3_2)
...
#endif
Roland
Index: configure.ac
===================================================================
RCS file: /cvsroot/mc/mc/configure.ac,v
retrieving revision 1.30
diff -u -p -r1.30 configure.ac
--- configure.ac 10 Jul 2005 10:45:28 -0000 1.30
+++ configure.ac 20 Jul 2005 19:06:02 -0000
@@ -179,6 +179,25 @@ AC_CHECK_FUNCS([atoll cfgetospeed getsid
putenv setreuid setuid statfs strerror strftime \
sysconf tcgetattr tcsetattr truncate getgrouplist])
+dnl The GNU libc, version 2.3.2 has a buffer overflow in the getgrouplist(3)
+dnl function, so we cannot use that function.
+AC_MSG_CHECKING([for glibc version])
+AC_LINK_IFELSE([
+#include <gnu/libc-version.h>
+#include <stdio.h>
+int main(void) {
+ return puts(gnu_get_libc_version());
+}
+], [
+mc_glibc_version=`./conftest$ac_exeext`
+if test x"${mc_glibc_version}" = x"2.3.2"; then
+ AC_DEFINE([HAVE_GLIBC_2_3_2], 1, [Define this if you have glibc-2.3.2])
+fi
+AC_MSG_RESULT([${mc_glibc_version}])
+], [
+AC_MSG_RESULT([none])
+])
+
dnl S-Lang needs all four functions to be defined to use POSIX signal API
AC_CHECK_FUNCS([sigaction sigemptyset sigprocmask sigaddset], , [slang_signals=no])
if test x$slang_signals != xno; then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]