home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / sysv386 / 17574 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!news2me.EBay.Sun.COM!seven-up.East.Sun.COM!sungy!stasys!huedv!thu
  2. From: thu@huedv.hu.sub.org (Thomas Huppertz)
  3. Newsgroups: comp.unix.sysv386
  4. Subject: ISC / Posix-Features (many groups)
  5. Message-ID: <3491@huedv.hu.sub.org>
  6. Date: 21 Dec 92 04:28:00 GMT
  7. Sender: news@stasys.sta.sub.org
  8. Reply-To: thu@huedv.hu.sub.org
  9. Organization: HUPPERTZ EDV-Beratung, Thererstr. 10, 8083 Mammendorf, Germany
  10. Lines: 49
  11.  
  12.  
  13. Hello,
  14.  
  15. has anyone from you experiences with the Posix-Mode in the ISC-Unix?
  16. (I use Version 3.0)
  17.  
  18. I build a little programm (call it "posix"), gave it root/root and 
  19. set the s-bit on it. I wanted to test the feature of beeing in more than
  20. one group.
  21. But when I start it as a usual user, it will not give the posix-groups.
  22. Other posix-functions seem to work (disallowing longer filenames, 
  23. disallowing chmod, etc.)
  24.  
  25. When I start the same program as root, and afterwards 'su' to a 
  26. user, I have my posix-groups as a usual user, too.
  27.  
  28. What is going wrong (with me - or the programm - or the ISC?) :-)
  29.  
  30. Now the programm 'posix.c'
  31. ----------------------------------------------------------------------
  32. main ()
  33. {
  34.     int user_nr;
  35.     int grp_nr;
  36.  
  37.     __setostype(0);
  38.  
  39.     user_nr = getuid();
  40.     grp_nr  = getgid();
  41.  
  42.     setuid(0); setgid(0);
  43.     __setostype (1);
  44.  
  45.     setgid(grp_nr);
  46.     setuid(user_nr); 
  47.     system ("/usr/local/bin/tcsh");
  48. }
  49. ----------------------------------------------------------------------
  50.  
  51. Any ideas?
  52.  
  53. Merry Christmas,
  54.     Thomas
  55.  
  56. -- 
  57. ==================== Gruss: === Thomas === Huppertz  ========================
  58.        HUPPERTZ EDV-Beratung, Thererstr. 10, 8083 Mammendorf, Germany 
  59.                Tel. ++49-8145-1569, Fax. ++49-8145-8286 
  60. ==================== EMail:== thu@huedv.hu.sub.org ==========================
  61.