[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: pid , uid...
On Thu, Jul 20, 2000 at 11:38:09PM +0530, omicron@xxxxxxx wrote:
> i got lotsa questions...
> 1. given the pid of a process, is it possible to know its uid and
> the effective uid of a person running it ?
ps gives this to you. To do this programmatically, look at ps source
code. It basically reads /proc I think.
> 2. can i hide a process from getting displayed in ps ( and also
> vanish from /proc )
You can't unless you hack the kernel. There was a hacker mag article
on how to do this. (thc.com/org ?)
> 3. if i have a process running as a user foo, then how can i make it
> gain root priveleges for executing a function ? I don't want to setuid
> root to a process, but in my program a small bit of code requires setuid 0
> to execute...
You can't use setuid to gain root.