zabbix selinux audit2allow 问题
audit2allow to create a policy module:- A denial and the associated system call are logged to
/var/log/audit/audit.logtype=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
certwatchdenial in step 1, run theaudit2allow -w -acommand to produce a human-readable description of why access was denied. The-aoption causes all audit logs to be read. The-woption produces the human-readable description. Theaudit2allowutility 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 -acommand 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 Linuxproduct, and select theselinux-policycomponent. Include the output of theaudit2allow -w -aandaudit2allow -acommands in such bug reports.****
To use the rule displayed by
audit2allow -a, run theaudit2allow -a -M mycertwatchcommand as the Linux root user to create custom module. The-Moption 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,
audit2allowcompiles the Type Enforcement rule into a policy package (.pp). To install the module, run thesemodule -i mycertwatch.ppcommand as the Linux root user.*****
Modules created with
audit2allowmay allow more access than required. It is recommended that policy created withaudit2allowbe 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
grepcommand to narrow down the input foraudit2allow. The following example demonstrates usinggrepto only send denials related tocertwatchthroughaudit2allow:~]# 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
audit2allowto 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能监视各种网络参数,保证服务器系统 的安全运营:并提供柔软的通知机制以让系统管 ...
随机推荐
- Selenium-Grid2 配置RemoteWebDriver
为什么要使用Selenium Grid ? 分布式运行大规模的Test 能够通过一个中央点,很容易的运行不同OS上的不同browser 最小化对Grid的维护时间,并能充分利用虚拟设备 Seleniu ...
- select 自动选择 检查下拉列表
下面我们来看一下selenium webdriver是如何来处理select下拉框的,以Apple注册页面为例. https://appleid.apple.com/cgi-bin/WebObject ...
- Selenium+Python定位实例
常见的定位方式参见:http://www.cnblogs.com/ranxf/p/7928732.html 1.ID定位(find_element_by_id) <input class=&qu ...
- 【DeepLearning学习笔记】Neurons神经元
今天找到一个比较好的deep learning的教材:Neural Networks and Deep Learning 对神经网络有详细的讲解,鉴于自己青年痴呆,还是总结下笔记吧=.= Percep ...
- linux下 安装php的gettext模块
安装php的模块有两种方式: 一.重新编译php,加上--with-gettext 二.动态安装 现在说下第二个动态安装 1.下载同版本的php原包,解压后进入ext目录,目录下便是模块 2.进入ge ...
- 手写一款符合Promise/A+规范的Promise
手写一款符合Promise/A+规范的Promise 长篇预警!有点长,可以选择性观看.如果对Promise源码不是很清楚,还是推荐从头看,相信你认真从头看到尾,并且去实际操作了,肯定会有收获的.主要 ...
- 解决Android Studio中Rendering Problems错误
android studio提示错误信息如下图: 解决办法: 打开styles.xml文件 在Theme.AppCompat.Light.DarkActionBar前面加上Base. 修改后解决错误:
- # 20145314《信息安全系统设计基础》期中复习总结 Part B
20145314<信息安全系统设计基础>期中复习总结 Part B 学习知识点内容总结 复习线索:http://group.cnblogs.com/topic/73069.html 本周的 ...
- 20144303 《Java程序设计》第五周学习总结
20144303 <Java程序设计>第五周学习总结 教材学习内容总结 第八章 异常处理 异常就是程序在运行时出现不正常情况,异常的由来是因为Java把出现的问题封装成了对象,换句话说Ja ...
- LeetCode (226):Invert Binary Tree 递归实现
Invert a binary tree. 4 / \ 2 7 / \ / \ 1 3 6 9 to 4 / \ 7 2 / \ / \ 9 6 3 1 Trivia:This problem was ...