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
评论列表
文章目录