macos 这个沙箱消息“拒绝 mach-lookup”是什么意思?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10820884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 09:12:25  来源:igfitidea点击:

What does this sandboxing message "deny mach-lookup" mean?

macossandbox

提问by user486134

My app did not work properly on a customer machine. Here is a line from console messages:

我的应用程序在客户机器上无法正常运行。这是控制台消息中的一行:

sandboxd: ([14252]) aText(14252) deny mach-lookup com.apple.familycontrols

What does this mean ?

这是什么意思 ?

回答by abarnert

It means just what it says: Your app (or some code injected into your app or running in a child process) is trying to do lookup a Mach service named com.apple.familycontrols, probably at global scope, and you don't have an entitlement to do so, and therefore it's being denied.

它的意思就是它所说的:您的应用程序(或注入您的应用程序或在子进程中运行的某些代码)正在尝试查找名为 com.apple.familycontrols 的 Mach 服务,可能在全局范围内,而您没有这样做的权利,因此被拒绝。

If you need this to work, you need to add a temporary-exception entitlement com.apple.security.temporary-exception.mach-lookup.global-name = [com.apple.familycontrols]. But you'll have to figure out why you need this exception, and file a bug with Apple asking them to provide a better way to do the same thing.

如果你需要这个来工作,你需要添加一个临时异常权限 com.apple.security.temporary-exception.mach-lookup.global-name = [com.apple.familycontrols]。但是您必须弄清楚为什么需要此异常,并向 Apple 提交错误,要求他们提供更好的方法来做同样的事情。

If you don't need this to work, you need to figure out why your code is trying to look up this service and stop doing whatever is causing it. (If it's not your code, but code injected into your app via SIMBL or something, then it's your user's problem, and he has to not use whatever plugin is at fault.)

如果你不需要它来工作,你需要弄清楚为什么你的代码试图查找这个服务并停止做任何导致它的事情。(如果这不是您的代码,而是通过 SIMBL 或其他方式注入到您的应用程序中的代码,那么这是您用户的问题,他必须不使用任何有问题的插件。)