Skip to content

Authenticate as current user requires admin #2

@drootang

Description

@drootang

I tried modifying the AuthorizationItem to use kAuthorizationRuleAuthenticateAsSessionUser instead of kAuthorizationRightExecute.

My understanding is that this should only require the current user to enter their own credentials, and does not require that the user be an administrator. However, when I run it on a non-admin account, the login prompt that macOS displays requires administrator credentials.

I've read through the entire Authorization Services Programming Guide, and it seems like this is happening because it does not find the kAuthorizationRuleAuthenticateAsSessionUser rule, so falls-back on the default empty rule, which requires an administrator. But I've checked /var/db/auth.db and the rule is there.

Have you experienced this? Have you gotten SFAuthorizationView working with just the current user credentials (non-admin) before?

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