Re: Non-priv way to collect job stats under Intel?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com User-agent: Mutt/1.4.2.1i On Tue, Aug 01, 2006 at 09:52:34AM -0700, Garth Cummings wrote:
Hi Jeffrey,
On Aug 1, 2006, at 7:59 AM, Jeffrey Johnson wrote:
By "shelling out" we'd be using popen(/bin/ps ....).
Running suid binaries with popen or system is considered a security risk as well.
One would hope that Apple has taken care of any security problems that existed in /bin/ps! :)
If your competitors are getting the process stats the same way you are, they'll have to solve the same problem, of course.
The authorization is normally done at install time when the helper tool's setuid bit is set. After that, it's just another setuid root tool but it only runs if the host process started it.
The fewer setuid root tools that exist, the better. /bin/ps is already there, and is a pretty solid piece of code that probably doesnt have a lot of security problems left inside of it. It is a fairly heavyweight way to find out process status though. It's unfortunate that progrms like Jeffrey's and mine that previously did not need any root privileges or setuid helpers now need them, especially just to do something like find out the status of a process that our programs spawned - even though we can still kill them, suspend them, and find out their exit status. -Erik _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Erik Paulson