[英]Can I detect if a guest is using an OSX machine?
I am writing a tool that will expose an http interface on localhost. 我正在写一个将在本地主机上公开http接口的工具。 I'd like for it to not be available to a guest using the machine. 我希望使用该机器的客人不能使用它。 I'd like to have the tool refuse connections entirely when a guest is logged in. Is this possible? 我想让该工具在访客登录时完全拒绝连接。这可能吗? Is there a way to detect this situation? 有没有办法检测这种情况?
It turns out that guest accounts cannot run concurrently with normal accounts in OSX (at least on recent OSX) so the issue we were concerned about is a non-issue. 事实证明,来宾帐户不能与OSX中的普通帐户(至少在最近的OSX上)同时运行,因此我们担心的问题不是问题。 You could theoretically detect it with w
as Mark said in the comments, but it's a thing that won't happen. 从理论上讲,您可以使用w
来检测到它,如Mark在评论中所说,但这是不会发生的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.