在Mac OS X 10.6上的特权端口(端口< 1024)上进行绑定 [英] Binding on privileged ports (ports < 1024) on Mac OS X 10.6

查看:143
本文介绍了在Mac OS X 10.6上的特权端口(端口< 1024)上进行绑定的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您知道如何取消对端口绑定的限制吗?使用不是Mac OS X根用户的用户帐户显示1024?

Do you know how to remove restriction on binding to ports < 1024 with a user account that is not root on Mac OS X?

推荐答案

最好的方法是利用launchd.与端口绑定的限制< 1024仍将存在,并且不可能随处可见,但是如果您的应用一次请求提升的特权才能添加必要的启动配置,则可以让launchd在特权端口上进行实际侦听并将套接字传递给您的应用在适当的时候.

The best way is to leverage launchd. The restriction on binding to ports < 1024 will still be there and is not likely to go anywhere, but if your app requests elevated privileges once in order to add the necessary launchd configuration, then you can let launchd do the actual listening on the privileged port and pass the socket to your app when appropriate.

请参阅有关启动的

See the section on launchd in this OS X Developer Library reference, and the further references given there for learning more about launchd and how to use it safely.

这篇关于在Mac OS X 10.6上的特权端口(端口&lt; 1024)上进行绑定的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆