mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-31 06:15:37 +00:00
Add check for initgroups() since old SYSV lacks this.
This commit is contained in:
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