setreuid() are available. At this point we are already root so
setuid() must succeed. Bug #713
goto done;
}
#else
- if (seteuid(details->euid) != 0 || setuid(details->euid) != 0) {
+ /* Cannot support real user ID that is different from effective user ID. */
+ if (setuid(details->euid) != 0) {
sudo_warn(U_("unable to change to runas uid (%u, %u)"),
- (unsigned int)details->uid, (unsigned int)details->euid);
+ (unsigned int)details->euid, (unsigned int)details->euid);
goto done;
}
#endif /* !HAVE_SETRESUID && !HAVE_SETREUID */