home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff319.lzh / CNewsSrc / cnews.src.lzh / libc / standard.c < prev    next >
C/C++ Source or Header  |  1980-01-01  |  295b  |  27 lines

  1. #define    NULL    0
  2.  
  3. extern void closeall();
  4. extern char    **environ;
  5.  
  6. static char    *stdenv[] = {
  7. /* =()<    "PATH=@<NEWSPATH>@",>()=    */
  8.     "PATH=/bin:/usr/bin",
  9.     "IFS= \t\n",
  10.     NULL
  11. };
  12.  
  13. void
  14. standard()
  15. {
  16.     environ = stdenv;
  17.     closeall(1);
  18. }
  19.  
  20. void
  21. safe()
  22. {
  23.     setgid(getgid());
  24.     setuid(getuid());
  25.     closeall(1);
  26. }
  27.