BetterAuthorizationSample 提示未更改
我在 Cocoa 应用程序中使用 BAS,并带有输入管理员密码的自定义提示...
但现在我想更改提示。我在字符串文件中更改了它,但它没有改变。我重建了所有内容并删除了 /var/run 中的套接字以及 launchdaemon 和 privelegedhelpertools 文件夹。但提示不会改变!
帮助?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该提示是写入策略数据库的规则的一部分。当您第一次运行 BAS 时,它会根据您的定义在策略数据库中创建规则。后续运行可确保这些规则存在,但不会被覆盖,即使您在应用中更改了规则或自定义提示。
在本地计算机上,您需要通过打开策略数据库文件
/etc/authorization
并删除整个相关规则(搜索 BetterAuthorizationSample)来清除规则。当您再次运行 BAS 时,它会检测到该规则不存在,并使用更新的信息重新写入它。如果您需要对已部署的应用程序进行更改,则必须在运行 BAS 之前编写一些自定义代码来删除规则(这将需要授权)。
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.