• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: security framework and access()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: security framework and access()


  • Subject: Re: security framework and access()
  • From: Andreas Monitzer <email@hidden>
  • Date: Fri, 13 Jul 2001 13:48:15 +0200

On Friday, July 13, 2001, at 10:20 , Matsumoto Shigeyuki wrote:

I'm making a GUI for '/usr/bin/hdiutil' which manipulates disk images.
Because 'hdiutil' requires the privilege to open/read raw disk devices,
I used AuthorizationExecuteWithPrivileges in security framework. But
launched instance of 'hdiutil' fails to open raw disk devices.

The reasons may be,
(1) AuthorizationExecuteWithPrivileges sets the effective user ID
to 0 (=root), but does not change the real user ID.
(2) The 'hdiutil' calls access() to check permissions, but access()
uses real user ID in place of the effective one.

Should I give up to use security framework?
Do you think 'sudo' is safe for my purpose?

No, sudo doesn't always ask for the password. How should you know what to send?
I think you should write a tool that itself calls hdiutil. Something like:

#include <unistd.h>
main() { setuid(0); return execl(...); }


andy
--
Discussion forthcoming.


  • Prev by Date: Re: NSMutableString, NSString ,character for character
  • Next by Date: Re: security framework and access()
  • Previous by thread: security framework and access()
  • Next by thread: Re: security framework and access()
  • Index(es):
    • Date
    • Thread