-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostdrop_fix.sh
More file actions
40 lines (34 loc) · 2.11 KB
/
postdrop_fix.sh
File metadata and controls
40 lines (34 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
~#!/usr/bin/env bash
# Description: This script will address a SELinux error that populates the log file /var/log/messages with and error stating
# that 'SELinux is preventing /usr/sbin/postdrop from using the dac_override capability'
# Author: istackz
# search for error within log file /var/log/messages
if [[ $(grep -i 'postdrop' /var/log/messages | grep -i 'selinux is preventing /usr/sbin/postdrop from using the dac_override capability') ]]
then
# create the policy
ausearch -c 'postdrop' --raw | audit2allow -M my-postdrop;
# install the policy and set the priority
semodule -X 300 -i my-postdrop.pp;
fi
#############
# my banner #
#############
##########################################################
# source: http://patorjk.com/software/taag/ #
##########################################################
echo -e "\nScript by: ";
echo -e "\n";
echo -e "\e[5;32m";
echo -e " ██▓ ██████▄▄▄█████▓▄▄▄ ▄████▄ ██ ▄█▒███████▒";
echo -e "▓██▒██ ▒▓ ██▒ ▓▒████▄ ▒██▀ ▀█ ██▄█▒▒ ▒ ▒ ▄▀░";
echo -e "▒██░ ▓██▄ ▒ ▓██░ ▒▒██ ▀█▄ ▒▓█ ▄▓███▄░░ ▒ ▄▀▒░ ";
echo -e "░██░ ▒ ██░ ▓██▓ ░░██▄▄▄▄██▒▓▓▄ ▄██▓██ █▄ ▄▀▒ ░";
echo -e "░██▒██████▒▒ ▒██▒ ░ ▓█ ▓██▒ ▓███▀ ▒██▒ █▒███████▒";
echo -e "░▓ ▒ ▒▓▒ ▒ ░ ▒ ░░ ▒▒ ▓▒█░ ░▒ ▒ ▒ ▒▒ ▓░▒▒ ▓░▒░▒";
echo -e " ▒ ░ ░▒ ░ ░ ░ ▒ ▒▒ ░ ░ ▒ ░ ░▒ ▒░░▒ ▒ ░ ▒";
echo -e " ▒ ░ ░ ░ ░ ░ ▒ ░ ░ ░░ ░░ ░ ░ ░ ░";
echo -e " ░ ░ ░ ░ ░ ░ ░ ░ ░ ";
echo -e " ░ ░ ";
echo -e "\e[0m";
echo -e "\n";
###########################################################