home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!spool.mu.edu!agate!ames!daffodil!aelle.cs.odu.edu!basil
- From: basil@aelle.cs.odu.edu (Keith Basil)
- Subject: setting an effective uid.
- Message-ID: <1992Dec18.182501.25650@cs.odu.edu>
- Sender: news@cs.odu.edu (News File Owner)
- Nntp-Posting-Host: aelle.cs.odu.edu
- Organization: Old Dominion University, Norfolk, Va
- Distribution: comp
- Date: Fri, 18 Dec 1992 18:25:01 GMT
- Lines: 21
-
-
- I posted a previous article asking for information on how to revert
- back to an effective uid after a setuid(getuid()) was done. (the program
- in question runs setuid to "bbs")
-
- After tinkering with the uid functions it seems that you can't
- get back the original setuid status after you've changed it. Please correct
- me if I'm wrong. So what I thought about doing was making a program to
- run setuid to root that will *force* the running program to make its
- effective uid change back to the BBS account. For example:
-
- ......
- system("/usr/local/bin/getbbsprivs");
- ....
-
- This getbbsprivs program should set the UID of it's parent program
- to the UID of BBS.. I want to know if you can set the uid of another
- process.
-
- email responses welcome.
- basil@cs.odu.edu
-