From: Todd C. Miller Date: Fri, 22 Nov 2002 19:05:02 +0000 (+0000) Subject: No long need to emulate set*[ug]id() via setres[ug]id() or setre[ug]id(). X-Git-Tag: SUDO_1_6_7~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=351fcc13863ed4f2dfaf36ae5a642b8769288681;p=sudo No long need to emulate set*[ug]id() via setres[ug]id() or setre[ug]id(). The new set_perms stuff only uses things it knows are there. --- diff --git a/compat.h b/compat.h index 57241b3a3..06c92c9ca 100644 --- a/compat.h +++ b/compat.h @@ -167,32 +167,6 @@ # define memset(_s, _x, _n) (bzero(_s, _n)) #endif -/* - * Emulate sete[ug]id() via setres[ug]id(2) or setre[ug]id(2) - */ -#ifndef HAVE_SETEUID -# ifdef __hpux -# define seteuid(_EUID) (setresuid((uid_t) -1, _EUID, (uid_t) -1)) -# else -# define seteuid(_EUID) (setreuid((uid_t) -1, _EUID)) -# endif /* __hpux */ -#endif /* HAVE_SETEUID */ -#ifndef HAVE_SETEGID -# ifdef __hpux -# define setegid(_EGID) (setresgid((gid_t) -1, _EGID, (gid_t) -1)) -# else -# define setegid(_EGID) (setregid((gid_t) -1, _EGID)) -# endif /* __hpux */ -#endif /* HAVE_SETEGID */ - -/* - * Emulate setreuid() for HP-UX via setresuid(2) - */ -#if !defined(HAVE_SETREUID) && defined(__hpux) -# define setreuid(_RUID, _EUID) (setresuid(_RUID, _EUID, (uid_t) -1)) -# define HAVE_SETREUID -#endif /* !HAVE_SETEUID && __hpux */ - /* * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason. */