Re: Non-priv way to collect job stats under Intel?
Re: Non-priv way to collect job stats under Intel?
- Subject: Re: Non-priv way to collect job stats under Intel?
- From: Garth Cummings <email@hidden>
- Date: Mon, 31 Jul 2006 15:30:13 -0700
Hi Jeffrey,On Jul 31, 2006, at 3:19 PM, Jeffrey Johnson wrote: We're making a universal binary of an app that calls task_for_pid() on PPC to gather cputime statistics on demand for its child processes and displays the stats in a window in a ps-like fashion. (We retrieved the source for ps and found the task_for_pid() call).
Alas, task_for_pid has gone privileged on Intel, and since ps is SUID root, I assume ps is still using task_for_pid. But we can't, since we're not (and don't want to be) run as root.
If you want to get your current code to work, the recommended way to do this is to factor out the stuff that has to run privileged into a separate setuid root tool. Take a look at "Performing Privileged Operations with Authorization Services" for details:
More info can be found via the Security topic page:
The folks who work on this stuff hang out on the apple-cdsa mailing list.
HTH, --gc ____________________________________________________________________ Sr. Software Engineer Apple Developer Technical Support
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden