Confused about AuthorizationExecuteWithPrivileges and suid
Confused about AuthorizationExecuteWithPrivileges and suid
- Subject: Confused about AuthorizationExecuteWithPrivileges and suid
- From: Eyal Redler <email@hidden>
- Date: Thu, 12 Jun 2008 04:34:27 +0300
Hi All,
I need to access some files in the Applications folder and in order to
do so I did the following:
1. I've created a tool that copies the files into the Applications
folder (using NSFileManager)
2. I'm invoking the tool using AuthorizationExecuteWithPrivileges()
3. In the tool I'm calling setuid(geteuid()) at the begining
4. The tool does not have its setuid bit set
This setup seems to work fine without doing anything regarding the
setuid bit yet the (very unclear and confusing) documentation seems to
refer to AuthorizationExecuteWithPrivileges as something you use to
run a setuid tool.
Should I set the setuid bit? Why?
TIA
Eyal Redler
------------------------------------------------------------------------------------------------
"If Uri Geller bends spoons with divine powers, then he's doing it the
hard way."
--James Randi
www.eyalredler.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden