如果您想要允许不存在接口的有效访问要求,请使用gen_require语句解决该问题。 在以下示例中,dhcpd策略模块需要基于audit2allow -R命令输出中列出的 AVC 的附加访问权限: Raw $ audit2allow -R type=AVC msg=audit(1674838508.590:840): avc: denied { write } for pid=2383 comm="dhcpd" name="bluetooth.con...
[root@python apps]# more azureus.fc /home/fu/azureus -- gen_context(user_u:object_r:azureus_exec_t,s0) 2)azureus.te [root@python apps]# more azureus.te policy_module(azureus,1.0.0) type azureus_t; type azureus_exec_t; role user_r types azureus_t; require { type user_t; }; d...
[root@python apps]# more azureus.fc /home/fu/azureus -- gen_context(user_u:object_r:azureus_exec_t,s0) 2)azureus.te [root@python apps]# more azureus.te policy_module(azureus,1.0.0) type azureus_t; type azureus_exec_t; role user_r types azureus_t; require { type user_t; }; d...
policy_module(virtpatch, 1.0) gen_require(` type svirt_lxc_net_t; ') allow svirt_lxc_net_t self:netlink_xfrm_socket create_netlink_socket_perms; 1. 2. 3. 4. 5. 6. 7. 构建模块 $ make -f /usr/share/selinux/devel/Makefile 1. 运行make命令后,当构建成功后,一个名叫virtpatch.pp...
gen_require(` type container_r; role system_r;') 3.创建一个.fc文件,内容如下 主要是对给定的路径设置一个安全上下文 4.然后就可以准备编译了,首先我们要在当前目录下获取一个makefile文件,安装完最开始提到的开发包后,centos中可以在如下目录找到 ...
gen_require(` attribute file_type, non_security_file_type, non_auth_file_type; ') typeattribute $1 file_type, non_security_file_type, non_auth_file_type; ') 这应该就是files_type的宏定义。 这里typeattribute,指定 $1 属于file_type等三个attribute。
gen_require(` type chkpwd_exec_t; type init_exec_t; type unreserved_port_t; type admin_home_t; type dmidecode_exec_t; type memory_device_t; type ssh_keygen_exec_t; type sshd_key_t; type urandom_device_t; type getty_etc_t; ...
gen_require(` type bluetooth_conf_t; ') allow dhcpd_t bluetooth_conf_t:file write_file_perms; ') Process context (domain) Types assigned to running processes are often referred to asdomains. By default, a new process inherits the context of its parent. For example, acatcommand entered by...
policy_module(mysnort, 0.1) gen_require(` type snort_t; type snort_var_run_t; ') # If initrc_t creates a directory called "snort" in a var_run_t dir, # make sure this one is immediately labeled as snort_var_run_t. init_daemon_pid_file(snort_var_run_t, dir, "snort") Build...