Date: Tue, 24 Jul 2007 16:35:35 -0300 From: "Victor Loureiro Lima" <victorloureirolima@gmail.com> To: "John-Mark Gurney" <gurney_j@resnet.uoregon.edu>, "Daniel Molina Wegener" <dmw@unete.cl>, "FreeBSD Hackers" <freebsd-hackers@freebsd.org> Subject: Re: A few questions... Message-ID: <ac00e00a0707241235u4058e2a4ybe50e7843e1d1bb9@mail.gmail.com> In-Reply-To: <20070724184355.GH99491@funkthat.com> References: <200707232052.58485.dmw@unete.cl> <20070724184355.GH99491@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
2007/7/24, John-Mark Gurney <gurney_j@resnet.uoregon.edu>: > Daniel Molina Wegener wrote this message on Mon, Jul 23, 2007 at 20:52 -0400: > > a) Is there any function or variable that tells me which is the > > root user UID in the system, or root always have 0 and it's > > an "elegant" option to compare the variables or structure > > members against zero. > > #include <sys/conf.h> > > uid == UID_ROOT > > > b) Can normal users look for system processes or kernel threads? > > Yes, ps does this... > ps(1) either elevates its priviledges during execution, or has some other way of medling into the afairs of other processes that will eventually need some higher priviledge status (either that, or I am really out-dated on modern operational systems) There lots of ways of finding information on other process, using libkvm was the most recent option that I saw ;) might be worth taking a look at it... victor loureiro lima
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ac00e00a0707241235u4058e2a4ybe50e7843e1d1bb9>