Vervious
Vervious

Reputation: 5569

BetterAuthorizationSample prompt not changing

I'm using BAS in a Cocoa app with a custom prompt for admin password...

But now I want to change the prompt. I changed it in the strings file and it doesn't change. I rebuilt everything and deleted the sockets in /var/run and the launchdaemon and privelegedhelpertools folders. But the prompt just won't change!!!

Help?

Upvotes: 0

Views: 151

Answers (1)

Ben Dolman
Ben Dolman

Reputation: 3205

The prompt is part of the rule that's written to the policy database. When you first run BAS it creates rules in the policy database according to your definitions. Subsequent runs make sure that those rules exist, but they are not overwritten, even if you make changes to the rules or custom prompts in your app.

On your local machine you'll need to clear out the rule by opening up the policy database file, /etc/authorization and deleting the entire rule in question (search for BetterAuthorizationSample). When you run BAS again it will detect that the rule is not there and write it again with the updated information.

If you need to make a change to an already deployed app you will have to write some custom code to delete the rule (which will require authorization) before running BAS.

Upvotes: 1

Related Questions