This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Permission to task and proc



In "Create a Frysk session" when FryskSessionDruid start up, all the processes in "Available Process Groups" box are owned by the currenty user,
and process owned by other users are not listed. I read
frysk-gui/frysk/gui/druid/CreateFryskSessionDruid.java, but still not
know how these processes filtered. Could anybody here clarify it for
me?


They basically use Proc.getUID() and Proc.getGID() and match it against the current users.

Those apis are just a reflection of the /proc/$$/status UID and GID.

I wrote this, but as I have to read status which has some supplemental information that stat does not, it was supposed to be a stop-gap measure. I don't know of a syscall to do the same thing. :(

It's demand only read too (ie the status file only gets read on getUID/getGID not on refresh, so one must be careful of that).

Regards

Phil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]