[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

revokeing rights



Hi all...I have been meaning to do this for a while now...time
to do it.

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? 

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.

-Steve

-- 
/* -- Stephen Carpenter <sjc@delphi.com> --- <sjc@debian.org>------------ */
"Congress SHALL MAKE NO LAW respecting an establishment of religion, 
or prohibiting the free exercise thereof; or abridging the freedom of
speach, or of the press; or the right of the people to peacefully 
assemble, and to petition the Government for a redress of grievances."
                -- The First Amendment of the Constitution of the USA

Attachment: pgpkwbsxX4ZwY.pgp
Description: PGP signature


Reply to: