mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-09 14:29:59 -04:00
fix: dev: Fix the resesuid() shim implementation for NetBSD
The shim implementation of setresuid() was wrong - there was a copy and paste error and it was calling setresgid() instead. This only affects NetBSD because Linux, FreeBSD and OpenBSD have setresuid() and setresgid() implementation available from the system library. Closes #4862 Merge branch '4862-fix-setresuid-shim' into 'main' Closes #4862 See merge request isc-projects/bind9!9359
This commit is contained in:
commit
5bfed08b25
1 changed files with 5 additions and 5 deletions
|
|
@ -295,11 +295,11 @@ setresuid(uid_t ruid, uid_t euid, uid_t suid) {
|
|||
REQUIRE(ruid == (uid_t)-1);
|
||||
REQUIRE(suid == (uid_t)-1);
|
||||
|
||||
#if HAVE_SETREGID
|
||||
return (setregid(ruid, euid));
|
||||
#else /* HAVE_SETREGID */
|
||||
return (setegid(euid));
|
||||
#endif /* HAVE_SETREGID */
|
||||
#if HAVE_SETREUID
|
||||
return (setreuid(ruid, euid));
|
||||
#else /* HAVE_SETREUID */
|
||||
return (seteuid(euid));
|
||||
#endif /* HAVE_SETREUID */
|
||||
}
|
||||
#endif /* !HAVE_SETRESUID */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue