zabbix selinux audit2allow 问题
audit2allow
to create a policy module:- A denial and the associated system call are logged to
/var/log/audit/audit.log
type=AVC msg=audit(1226270358.848:238): avc: denied { write } for pid=13349 comm="certwatch" name="cache" dev=dm-0 ino=218171 scontext=system_u:system_r:certwatch_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=dir type=SYSCALL msg=audit(1226270358.848:238): arch=40000003 syscall=39 success=no exit=-13 a0=39a2bf a1=3ff a2=3a0354 a3=94703c8 items=0 ppid=13344 pid=13349 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="certwatch" exe="/usr/bin/certwatch" subj=system_u:system_r:certwatch_t:s0 key=(null)
In this example, certwatch (comm="certwatch"
) was denied write access ({ write }
) to a directory labeled with the var_t
type (tcontext=system_u:object_r:var_t:s0
). Analyze the denial as per Section 8.3.7, “sealert Messages”. If no label changes or Booleans allowed access, use audit2allow
to create a local policy module.
- With a denial logged, such as the
certwatch
denial in step 1, run theaudit2allow -w -a
command to produce a human-readable description of why access was denied. The-a
option causes all audit logs to be read. The-w
option produces the human-readable description. Theaudit2allow
utility accesses/var/log/audit/audit.log
, and as such, must be run as the Linux root user:~]# audit2allow -w -a
type=AVC msg=audit(1226270358.848:238): avc: denied { write } for pid=13349 comm="certwatch" name="cache" dev=dm-0 ino=218171 scontext=system_u:system_r:certwatch_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=dir
Was caused by:
Missing type enforcement (TE) allow rule. You can use audit2allow to generate a loadable module to allow this access.- As shown, access was denied due to a missing Type Enforcement rule.
- Run the
audit2allow -a
command to view the Type Enforcement rule that allows the denied access:~]# audit2allow -a #============= certwatch_t ==============
allow certwatch_t var_t:dir write;*****
Missing Type Enforcement rules are usually caused by bugs in SELinux policy, and should be reported in Red Hat Bugzilla. For Red Hat Enterprise Linux, create bugs against the
Red Hat Enterprise Linux
product, and select theselinux-policy
component. Include the output of theaudit2allow -w -a
andaudit2allow -a
commands in such bug reports.****
To use the rule displayed by
audit2allow -a
, run theaudit2allow -a -M mycertwatch
command as the Linux root user to create custom module. The-M
option creates a Type Enforcement file (.te
) with the name specified with-M
, in your current working directory:~]# audit2allow -a -M mycertwatch ******************** IMPORTANT ***********************
To make this policy package active, execute: semodule -i mycertwatch.pp ~]# ls
mycertwatch.pp mycertwatch.teAlso,
audit2allow
compiles the Type Enforcement rule into a policy package (.pp
). To install the module, run thesemodule -i mycertwatch.pp
command as the Linux root user.*****
Modules created with
audit2allow
may allow more access than required. It is recommended that policy created withaudit2allow
be posted to an SELinux list, such as fedora-selinux-list, for review. If you believe their is a bug in policy, create a bug in Red Hat Bugzilla.*****
If you have multiple denials from multiple processes, but only want to create a custom policy for a single process, use the
grep
command to narrow down the input foraudit2allow
. The following example demonstrates usinggrep
to only send denials related tocertwatch
throughaudit2allow
:~]# grep certwatch /var/log/audit/audit.log | audit2allow -M mycertwatch2
******************** IMPORTANT ***********************
To make this policy package active, execute: ~]# semodule -i mycertwatch2.ppRefer to Dan Walsh's "Using audit2allow to build policy modules. Revisited." blog entry for further information about using
audit2allow
to build policy modules.
zabbix selinux audit2allow 问题的更多相关文章
- zabbix安装,关闭SELinux
一.缘由 在安装zabbix的时候,按照官网的Zabbix Manual一路跑下来,zabbix的dashboard提示:zabbix server is not running the inform ...
- Installing Zabbix 3.2 in Centos 6.8 Clean Install Dependencies Errors
ZABBIX Forums > Zabbix Discussions and Feedback > Zabbix Troubleshooting and Problems > Ins ...
- [Zabbix] 安装MySQL5.7, 部署Zabbix到CentOS 7日记
安装环境:CentOS7 64位,安装MySQL5.7 一.安装 MySQL 1.配置YUM源 在MySQL官网中下载YUM源rpm安装包:http://dev.mysql.com/downloads ...
- zabbix常见错误处理方式
1.zabbix-server启动失败,我是centos7.4系统,查看/var/log/zabbix/zabbix_server.log日志显示 1516:20180816:195630.755 u ...
- zabbix 4.2 安装教程
1.我这里使用的是ali的yum源 #wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7 ...
- 搭建zabbix监控系统详解
搭建zabbix监控系统详解 文:warren 博文大纲:一.前言 二.zabbix监控架构三.搭建Zabbix监控服务器四.搭建过程中遇到有些服务无法正常启动的解决办法 一.前言 : 要想实时的 ...
- zabbix 3.0.3 (nginx)安装过程中的问题排错记录
特殊注明:安装zabbix 2.4.8和2.4.6遇到2个问题,如下:找了很多解决办法,实在无解,只能换版本,尝试换(2.2.2正常 | 3.0.3正常)都正常,最后决定换3.0.3 1.Error ...
- zabbix监控报错zabbix server is not running解决方法
问题描述: 布置好zabbix监控,正常运行.但是重启了虚拟机服务器之后,页面出现如下的报错,而且设置的报信息也是失效的:
- Centos 源码安装zabbix 2.4.5
Zabbix简介 Zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案.zabbix能监视各种网络参数,保证服务器系统 的安全运营:并提供柔软的通知机制以让系统管 ...
随机推荐
- Java读取CSV和XML文件方法
游戏开发中,读取策划给的配置表是必不可少的,我在之前公司,策划给的是xml表来读取,现在公司策划给的是CSV表来读取,其实大同小异,也并不是什么难点,我就简单分享下Java如何读取XML文件和CSV文 ...
- docker——端口映射与容器互联
在生产环境中,单个服务往往是独立的,但是服务与服务之间往往是相互依赖的,这样对于容器来说,容器之间就需要相互访问.除了网络访问之外,docker还提供了另外两种方式来满足服务的访问. 一:允许映射容器 ...
- [HZNUOJ] 使用Excel + Word 批量制作准考证
一般程序设计考试或者ACM比赛都会使用临时账号登录,这时候就需要批量制作密码条 首先需要用Excel 存储队伍的信息 比如像这样分门别类的放好 然后在word 中制作好密码条样式 选择邮件->开 ...
- Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3
Maven 导入项目时报错: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-war-plugin:2.3 ...
- springcloud---2
每一个都是独立的springboot工程.通过自己的ip和端口访问. Eureka是服务发现组件,Eureka里面有一个服务注册表,存的是服务消费者和服务生产者的ip和端口.Eureka集群里面每个E ...
- Tomcat之并发优化
1.位置: (1)/opt/tomcat7/conf下的server.xml文件中<Connector>节点的配置优化,记得先备份. (2)出厂默认(在server.x ...
- React组件绑定this的四种方式
题图 By HymChu From lnstagram 用react进行开发组件时,我们需要关注一下组件内部方法this的指向,react定义组件的方式有两种,一种为函数组件,一种为类组件,类组件内部 ...
- 在VMware中使用Nat方式设置静态IP
为了在公司和家中不改变ip,所以采用vm的NAT模式来设置静态ip 1.vm采用NAT模式联网 2.编辑vm虚拟机设置 3.查看该网段的网关 可以看出网关为192.168.44.2,然后开始设置静态i ...
- Linux安全基线检查脚本
基线检查内容: 一:共享账号检查 配置名称:用户账号分配检查,避免共享账号存在配置要求:1.系统需按照实际用户分配账号; 2.避免不同用户间共享账号,避免用户账号和服务器间通信使用的账号共享.操作指南 ...
- 20135302魏静静——linux课程第八周实验及总结
linux课程第八周实验及总结 实验及学习总结 1. 进程切换在内核中的实现 linux中进程切换是很常见的一个操作,而这个操作是在内核中实现的. 实现的时机有以下三个时机: 中断处理过程(包括时钟中 ...