home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.wizards:4774 comp.unix.questions:13569 comp.unix.programmer:5334 comp.unix.internals:1964
- Path: sparky!uunet!sun-barr!cs.utexas.edu!chinacat!rpp386!jfh
- From: jfh@rpp386.lonestar.org (John F. Haugh II)
- Newsgroups: comp.unix.wizards,comp.unix.questions,comp.unix.programmer,comp.unix.internals
- Subject: Re: Changing the owner of a process
- Message-ID: <21902@rpp386.lonestar.org>
- Date: 18 Nov 92 05:38:32 GMT
- References: <1992Oct29.162445.23551@eng.ufl.edu> <1cpjs4INNn3@early-bird.think.com> <1992Nov5.152833.27744@dale.ksc.nasa.gov> <1992Nov17.142837.21252@dale.ksc.nasa.gov>
- Reply-To: jfh@rpp386.cactus.org (John F. Haugh II)
- Organization: Los Tejanos SCUBA Club and Beer Joint, Austin, Tejas
- Lines: 28
-
- In article <1992Nov17.142837.21252@dale.ksc.nasa.gov> eposnak@dale.ksc.nasa.gov (Ed Posnak) writes:
-
- [ This is actually one of the answers he quoted. Mark Buda is the
- writer ... ]
-
- >The uid, in every version of Unix I've seen, is stored in the proc
- >structure in the kernel. You should be able to fiddle with this at
- >will in a device driver, and since it's in the proc structure and not
- >the u area, it'll always be there even if the process is swapped out.
- >It *should* be just a matter of searching for the entry and changing
- >it.
-
- The UIDs are stored in the (struct user). They are u.u_uid and u.u_ruid.
- Without giving away too much, that's where the system looks for things
- like access() and so on. For a really bad time, check out the source
- to suser(). It will convince you of this fact.
-
- >This technique should also serve to implement something like renice()
- >under Xenix, which doesn't have it. (The nice value also being stored
- >in the proc structure.)
-
- Unfortunately, now that we know the data is in the (struct user),
- I won't be getting out my source to a XENIX renice ... This also
- means that the device driver idea won't work since the other processes
- u-area may be anywheres.
- --
- John F. Haugh II [ TSAKC ] !'s: ...!cs.utexas.edu!rpp386!jfh
- Ma Bell: (512) 251-2151 [ DoF #17 ] @'s: jfh@rpp386.cactus.org
-