Showing posts with label Mac OS. Show all posts
Showing posts with label Mac OS. Show all posts

Mar 4, 2010

AuthorizationExecuteWithPrivileges() will fail with errAuthorizationInternal if there is no TEMPDIR

On Mac OS X function AuthorizationExecuteWithPrivileges() will fail with error errAuthorizationInternal (-60008, "something else went wrong.") if environment variable TMPDIR points on invalid (not existent) path. The reason of such weired behavior is call to tmpfile() inside the AuthorizationExecuteWithPrivileges() function. The moral is - use more explanatory error codes :)

Some more info on that issue can be found in Apple Mailing Lists.