Re: revokeing rights
On Wed, 24 Mar 1999, Stephen Carpenter wrote:
> I want to patch xfstt to give up its root privs after it has opened and
> written to its database...that way, by the time it is servicing users
> it is running as a user process.
>
> My first thought was to hard cod it to at some point change its UID to
> nobody...I havn't been able to make this work though :(
> I really wannawrite this ..but am a bit stumped.
>
> How woudl you suggest going about doing this?
> My thought was a command line option to specify a username to change to...
> then getpwent to find it and then set UID GID etc to it.
>
> What is the proper call to change UID/GID?
POSIX: setuid() .
Don't use seteuid() .
>
> is there an easy way to add this?
>
> btw I would apreciate a CC onm any replies...I sometimes miss list
> discussions do to lack of time to read them.
+---------------------------------+-------------------------------------+
| R Garth Wood | Making waves... |
| Stormix Technologies Inc. | |
| rgwood@stormix.com | |
Reply to: