selinux.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:mock 作者: rpm-software-management 项目源码 文件源码
def _selinuxCreateFauxFilesystems():
        (fd, path) = tempfile.mkstemp(prefix="mock-selinux-plugin.")
        with os.fdopen(fd, 'w') as out:
            with open("/proc/filesystems") as host:
                for line in host:
                    if "selinuxfs" not in line:
                        out.write(line)

        os.chmod(path, stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH)

        return path
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号