home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / unix / programm / 5740 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.2 KB  |  34 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!spool.mu.edu!agate!ames!daffodil!aelle.cs.odu.edu!basil
  3. From: basil@aelle.cs.odu.edu (Keith Basil)
  4. Subject: setting an effective uid.
  5. Message-ID: <1992Dec18.182501.25650@cs.odu.edu>
  6. Sender: news@cs.odu.edu (News File Owner)
  7. Nntp-Posting-Host: aelle.cs.odu.edu
  8. Organization: Old Dominion University, Norfolk, Va
  9. Distribution: comp
  10. Date: Fri, 18 Dec 1992 18:25:01 GMT
  11. Lines: 21
  12.  
  13.  
  14.     I posted a previous article asking for information on how to revert
  15.   back to an effective uid after a setuid(getuid()) was done.  (the program
  16.   in question runs setuid to "bbs")
  17.  
  18.     After tinkering with the uid functions it seems that you can't
  19.   get back the original setuid status after you've changed it. Please correct
  20.   me if I'm wrong.  So what I thought about doing was making a program to
  21.   run setuid to root that will *force* the running program to make its
  22.   effective uid change back to the BBS account.  For example:
  23.  
  24.     ......
  25.         system("/usr/local/bin/getbbsprivs");   
  26.     ....
  27.  
  28.     This getbbsprivs program should set the UID of it's parent program
  29.   to the UID of BBS..  I want to know if you can set the uid of another
  30.   process.  
  31.  
  32.   email responses welcome.
  33.   basil@cs.odu.edu
  34.