Home > Database > Mysql Tutorial > How to add the selinux policy access for the new created lin

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

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 15:39:06
Original
1465 people have browsed it

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.

 

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
How to learn php well
From 1970-01-01 08:00:00
0
0
0
How to write a loop?
From 1970-01-01 08:00:00
0
0
0
How to run/debug your PHP code?
From 1970-01-01 08:00:00
0
0
0
How to sign up?
From 1970-01-01 08:00:00
0
0
0
How to save online editor
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template