mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-02 15:25:58 +00:00
Add check for initgroups() since old SYSV lacks this.
This commit is contained in:
@@ -188,6 +188,9 @@
|
||||
/* Define if you have innetgr(3). */
|
||||
#undef HAVE_INNETGR
|
||||
|
||||
/* Define if you have initgroups(3). */
|
||||
#undef HAVE_INITGROUPS
|
||||
|
||||
/* Define if you have getdomainname(2). */
|
||||
#undef HAVE_GETDOMAINNAME
|
||||
|
||||
|
2
configure
vendored
2
configure
vendored
@@ -5403,7 +5403,7 @@ EOF
|
||||
|
||||
;;
|
||||
esac
|
||||
for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate strftime setrlimit
|
||||
for ac_func in strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate strftime setrlimit initgroups
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:5410: checking for $ac_func" >&5
|
||||
|
@@ -1333,7 +1333,7 @@ esac
|
||||
dnl
|
||||
dnl Function checks
|
||||
dnl
|
||||
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate strftime setrlimit)
|
||||
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf sigaction tzset seteuid ftruncate strftime setrlimit initgroups)
|
||||
if test -n "$SECUREWARE"; then
|
||||
AC_CHECK_FUNCS(bigcrypt)
|
||||
AC_CHECK_FUNCS(set_auth_parameters)
|
||||
|
4
sudo.c
4
sudo.c
@@ -929,7 +929,7 @@ set_perms(perm, sudo_mode)
|
||||
strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef HAVE_INITGROUPS
|
||||
/*
|
||||
* Initialize group vector only if are
|
||||
* going to run as a non-root user.
|
||||
@@ -942,7 +942,7 @@ set_perms(perm, sudo_mode)
|
||||
Argv[0], strerror(errno));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#endif /* HAVE_INITGROUPS */
|
||||
if (setuid(pw->pw_uid)) {
|
||||
(void) fprintf(stderr,
|
||||
"%s: cannot set uid to %ld: %s\n",
|
||||
|
Reference in New Issue
Block a user