]> granicus.if.org Git - sudo/commitdiff
No long need to emulate set*[ug]id() via setres[ug]id() or setre[ug]id().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 22 Nov 2002 19:05:02 +0000 (19:05 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 22 Nov 2002 19:05:02 +0000 (19:05 +0000)
The new set_perms stuff only uses things it knows are there.

compat.h

index 57241b3a31da185ff7cc8ef2dd796f122268f28d..06c92c9ca3936d3188d553e35b6c3afd79e726b3 100644 (file)
--- a/compat.h
+++ b/compat.h
 # 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.
  */