首页 > 数据库 > mysql教程 > How to add the selinux policy access for the new created lin

How to add the selinux policy access for the new created lin

WBOY
发布: 2016-06-07 15:39:06
原创
1423 人浏览过

When you create the linux file node, such as “dev/nfccard0”, you must add the selinux policy for it, or the application can not get the permit to access. this is an example for the system_server to accecc the dev/nfccard0 file node. we c

 

When you create the linux file node, such as  “dev/nfccard0”, you must  add the selinux policy for it, or  the application can not get the permit to access.

 this is an example for the system_server to accecc the dev/nfccard0 file node.

 we can do the following three things to mak the system work smoothly.

1       define the file type

in the file.te add the below line

  type nfccard_device,dev_type

2       define the file context

in the file_context.te add the below line

 /dev/nfccard0 u:object_r:nfccard_devicd:s0

3       allow the system_server to access it.

Allow system_server  nfccard_device:chr_file rw_file_perms

Or

Allow system_server  nfccard_device:chr_file {read write open getattr  ioctl}

 

there are many file type , {socket, binder, property,etc}, we must do carefully to avoid influence the system.

 

相关标签:
来源:php.cn
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板