Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Non-priv way to collect job stats under Intel?



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:

<http://developer.apple.com/documentation/Security/Conceptual/authorization_concepts/index.html>.

More info can be found via the Security topic page:

<http://developer.apple.com/security>.

The folks who work on this stuff hang out on the apple-cdsa mailing list.

<http://lists.apple.com/mailman/listinfo/apple-cdsa>.

HTH,
--gc
____________________________________________________________________
Garth Cummings  email@hidden
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:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden

References: 
 >Non-priv way to collect job stats under Intel? (From: Jeffrey Johnson <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.