chroot()使用

    好多的程序,都有使用chroot来是程序chroot到一个目录下面,来保护文件系统,今天在看snort代码的时候,看到了实现,就贴出一个测试程序来,其实是比较简单的。     chroot()在linux下面须要使用root权限,这一点须要注意了。     #include<stdio.h> #include<stdlib.h> #include<unistd.h> int main(vo
相关文章
相关标签/搜索