home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Python1.4_Source / Amiga / Python_netlib / setegid.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-24  |  490 b   |  26 lines

  1. RCS_ID_C="$Id: setegid.c,v 4.1 1994/09/29 23:09:02 jraja Exp $";
  2. /*
  3.  *      setegid() - set effective group
  4.  *
  5.  *      Copyright © 1994 AmiTCP/IP Group, 
  6.  *                       Network Solutions Development Inc.
  7.  *                       All rights reserved.
  8.  */
  9.  
  10. #include <sys/types.h>
  11. #include <unistd.h>
  12.  
  13. #include <proto/usergroup.h>
  14. #include "allobjects.h"
  15.  
  16. #ifdef setegid
  17. #undef setegid
  18. #endif
  19.  
  20. int
  21. setegid(gid_t g)
  22. {
  23.   if(!checkusergrouplib()) return -1;
  24.   return setregid(-1, g);
  25. }
  26.