[BACK]Return to compat.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / sudo

Diff for /src/usr.bin/sudo/Attic/compat.h between version 1.4 and 1.5

version 1.4, 2002/04/25 15:49:03 version 1.5, 2003/03/15 21:23:53
Line 1 
Line 1 
 /*  /*
  * Copyright (c) 1996, 1998-2002 Todd C. Miller <Todd.Miller@courtesan.com>   * Copyright (c) 1996, 1998-2003 Todd C. Miller <Todd.Miller@courtesan.com>
  * All rights reserved.   * All rights reserved.
  *   *
  * Redistribution and use in source and binary forms, with or without   * Redistribution and use in source and binary forms, with or without
Line 31 
Line 31 
  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.   * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *   *
  * $Sudo: compat.h,v 1.63 2002/01/25 18:38:22 millert Exp $   * $Sudo: compat.h,v 1.65 2003/03/15 20:31:02 millert Exp $
  */   */
   
 #ifndef _SUDO_COMPAT_H  #ifndef _SUDO_COMPAT_H
Line 166 
Line 166 
 #if !defined(HAVE_MEMSET) && !defined(memset)  #if !defined(HAVE_MEMSET) && !defined(memset)
 # define memset(_s, _x, _n)     (bzero(_s, _n))  # define memset(_s, _x, _n)     (bzero(_s, _n))
 #endif  #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.   * NCR's SVr4 has _innetgr(3) instead of innetgr(3) for some reason.

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5