Skip to content

Question about performing actions with privileges #74

Description

@spieglt

A comment here (https://github.com/potionfactory/LetsMove/blob/master/PFMoveApplication.m#L481-L485) says "AuthorizationExecuteWithPrivileges is deprecated. We want to still use it since there's no good alternative (without requiring code signing)." Does anyone know if there is any alternative?

In my application, I need to add a wireless network to the top of the preferred networks list and later remove it. For this I can use this function: https://developer.apple.com/documentation/securityfoundation/sfauthorization/1417652-obtainwithright. But then the password is still in the user's Keychain, and I'd like to clean that up as well. There is another function, CWKeychainDeleteWiFiPassword, but it does not have a parameter to pass in an authorization, and so unless you're running it as root, you can't delete from the system Keychain. I don't want to use SMJobBless as I don't want to install privileged helpers (this is a standalone utility that should not require installation), and I don't want to pay Apple $99/year just to allow a user to delete a password. Thanks for any help you can provide.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions