Subordinate IDs require 32bit uid_t/gid_t
* configure.in: Check if sizeof uid_t and gid_t is larger than 32 bit to support subordinate IDs.
This commit is contained in:
parent
0f26591422
commit
1a8d386288
@ -1,3 +1,8 @@
|
||||
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* configure.in: Check if sizeof uid_t and gid_t is larger than 32
|
||||
bit to support subordinate IDs.
|
||||
|
||||
2013-08-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* lib/subordinateio.c: Avoid dead branches.
|
||||
|
24
configure.in
24
configure.in
@ -244,7 +244,7 @@ AC_ARG_ENABLE(subordinate-ids,
|
||||
[AC_HELP_STRING([--enable-subordinate-ids],
|
||||
[support subordinate ids @<:@default=yes@:>@])],
|
||||
[enable_subids="${enableval}"],
|
||||
[enable_subids="yes"]
|
||||
[enable_subids="maybe"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(audit,
|
||||
@ -331,12 +331,28 @@ if test "$enable_man" = "yes"; then
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_REGENERATE_MAN, test "x$enable_man" != "xno")
|
||||
|
||||
if test "$enable_subids" = "yes"; then
|
||||
if test "$enable_subids" != "no"; then
|
||||
dnl
|
||||
dnl FIXME: check if 32 bit UIDs/GIDs are supported by libc
|
||||
dnl
|
||||
AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
|
||||
enable_subids="yes"
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([
|
||||
#include <sys/types.h>
|
||||
int main(void) {
|
||||
uid_t u;
|
||||
gid_t g;
|
||||
return (sizeof u < 4) || (sizeof g < 4);
|
||||
}
|
||||
])], [id32bit="yes"], [id32bit="no"])
|
||||
|
||||
if test "x$id32bit" = "xyes"; then
|
||||
AC_DEFINE(ENABLE_SUBIDS, 1, [Define to support the subordinate IDs.])
|
||||
enable_subids="yes"
|
||||
else
|
||||
if test "x$enable_subids" = "xyes"; then
|
||||
AC_MSG_ERROR([Cannot enable support the subordinate IDs on systems where gid_t or uid_t has less than 32 bits])
|
||||
fi
|
||||
enable_subids="no"
|
||||
fi
|
||||
fi
|
||||
AM_CONDITIONAL(ENABLE_SUBIDS, test "x$enable_subids" != "xno")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user