加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

在哪里放置Unix域(AF_UNIX)套接字的端点(文件)?

发布时间:2020-12-15 20:06:09 所属栏目:安全 来源:网络整理
导读:是否有一个约定,将“文件”表示端点到Unix域套接字? 我倾向于把它们/ tmp / some-application-specific-subdir-name /,但我想知道是否有一个更常见的地方。 背景是,POSIX不清楚有关访问这样的“文件”的最大路径长度: The size of sun_path has intenti
是否有一个约定,将“文件”表示端点到Unix域套接字?

我倾向于把它们/ tmp / some-application-specific-subdir-name /,但我想知道是否有一个更常见的地方。

背景是,POSIX不清楚有关访问这样的“文件”的最大路径长度:

The size of sun_path has intentionally been left undefined. This is because different implementations use different sizes. For example,4.3 BSD uses a size of 108,and 4.4 BSD uses a size of 104. Since most implementations originate from BSD versions,the size is typically in the range 92 to 108.

Applications should not assume a particular length for sun_path or assume that it can hold {_POSIX_PATH_MAX} bytes (256).

因此,对路径长度的这种“限制”应该不在应用程序的文件/路径名配置之外。

FHS说: /var/run

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读