capable()函数来对权限做出检查,检查是否有权对指定的资源进行操作,该函数返回0则代表无权操作。该函数的定义在include/linux/capability.h中,其中包含了与之相对应的权限列表。
CAP_DAC_OVERRIDE
这个能力来推翻在文件和目录上的存取的限制(数据存取控制, 或者DAC).
CAP_NET_ADMIN
进行网络管理任务的能力, 包括那些能够影响网络接口的.
CAP_SYS_MODULE
加载或去除内核模块的能力.
CAP_SYS_RAWIO
进行"raw" I/O 操作的能力. 例子包括存取设备端口或者直接和USB 设备通讯.
CAP_SYS_ADMIN
一个捕获-全部的能力, 提供对许多系统管理操作的存取.
CAP_SYS_TTY_CONFIG
进行tty 配置任务的能力.