Security framework question
Security framework question
- Subject: Security framework question
- From: Ed Silva <email@hidden>
- Date: Mon, 09 Jul 2001 18:03:27 -0700
Hi all,
I am working on an app to create startup items (the stuff that goes in
/Library/StartupItems, really) but have hit a bit of a snag with the
Security framework.
So far I have been able to get the authentication part working (the dialog
box), but in all the examples I have seen the only good it does is to
allow for an external tool to be run with root privileges. What I need is
for my application to be able to do things as root (make a dir in /Library/
StartupItems and write files to it).
What happens currently is a permissions error, since /Library/StartupItems
is set up like so:
drwxr-xr-x 7 root wheel 264 Jul 9 17:43 StartupItems/
The thing I don't quite get is the permissions on the directory. Shouldn't
this be writable by the group? When I 'chmod g+w /Library/StartupItems' my
application works as I would expect (meaning it does what I want without
permissions problems). If this is the best setup for the permissions how
can I do things within my app as root (or the equivalent)?
I have been thinking that I could make a tool to do the real work
(creating the dir, writing files, etc) and use the security framework to
call that, but that seems like such a hack that I really want to find a
better way to do this.
Any ideas? Am I missing something here?
Cheers,
--Ed