BetterAuthorizationSample 提示未更改

发布于 2024-09-01 15:43:53 字数 177 浏览 2 评论 0原文

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

隐诗 2024-09-08 15:43:53

该提示是写入策略数据库的规则的一部分。当您第一次运行 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文