有人使用 BetterAuthorizationSample 吗?
在 OS X 上,特权操作是通过 AuthorizationExecuteWithPrivileges() 完成的,Apple 围绕该建议发布了两个建议:
使用 setuid 辅助工具的旧 MoreAuth。
当前的 BetterAuthorizationSample 在系统中散布着 launchd 文件。
我不知道有任何应用程序使用后者......
On OS X privileged operations are done through AuthorizationExecuteWithPrivileges() around which Apple published two recommendations:
The old MoreAuth using setuid helper tools.
The current BetterAuthorizationSample littering the system with launchd files.
I don't know any applications using the latter...
我已经使用过它,实施起来很痛苦。 FWIW,我知道 BBEdit 和 PGP Desktop 使用它。
I've used it, and it's a pain to implement. FWIW, I know that BBEdit and PGP Desktop use it.