Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'AuthorizationExecuteWithPrivileges' is deprecated: first deprecated in OS X 10.7 #73

Open
dmiller-nmap opened this issue Mar 6, 2015 · 1 comment

Comments

@dmiller-nmap
Copy link

Installing wrapper script.
Compiling and installing authorization wrapper.
gcc -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.8 -arch i386 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.8 -arch i386 -framework Security -o dist/Zenmap.app/Contents/MacOS/Zenmap install_scripts/macosx/zenmap_auth.c
install_scripts/macosx/zenmap_auth.c:60:11: warning: 'AuthorizationExecuteWithPrivileges' is deprecated: first deprecated in OS X 10.7 [-Wdeprecated-declarations]
        status = AuthorizationExecuteWithPrivileges(ref, executable_path,
                 ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/Security.framework/Headers/Authorization.h:435:10: note: 
      'AuthorizationExecuteWithPrivileges' has been explicitly marked deprecated here
OSStatus AuthorizationExecuteWithPrivileges(AuthorizationRef authorization,
         ^
1 warning generated.
@dmiller-nmap
Copy link
Author

It seems the replacement for this (available since 10.6) is SMJobBless, but I have to resolve the following issues before I know how to implement it:

  1. SMJobBless "submits the executable for the given label as a launchd job." Is this what we want?
  2. We use this to launch zenmap_wrapper.py, but is the "executable" above the Python script or the Python interpreter?
  3. All or most of the examples are Objective-C, but our wrapper is C.

This question on StackOverflow has some suggestions; most refer to SMJobBless, but there are a couple that suggest that AppleScript could be used to do the same thing. If that's the case, can we use just AppleScript and not have to compile anything?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant