File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1+ /etc/redis/sentinel -d system_u:object_r:redis_conf_t:s0
2+ /etc/redis/sentinel.conf -- system_u:object_r:redis_conf_t:s0
Original file line number Diff line number Diff line change 44if command -v checkmodule & > /dev/null && command -v semodule_package & > /dev/null; then
55 # Compile policy module
66 checkmodule -M -m /usr/share/selinux/packages/redis-ce.te -o /usr/share/selinux/packages/redis-ce.mod
7- semodule_package -m /usr/share/selinux/packages/redis-ce.mod -o /usr/share/selinux/packages/redis-ce.pp
7+ semodule_package -m /usr/share/selinux/packages/redis-ce.mod -o /usr/share/selinux/packages/redis-ce.pp -f /usr/share/selinux/packages/redis-ce.fc
88
99 # Install or update the policy module
1010 semodule -i /usr/share/selinux/packages/redis-ce.pp
1111fi
1212
1313# Allow writing to /etc/redis/sentinel/ for redis-sentinel
14- if command -v semanage & > /dev/null && command -v restorecon & > /dev/null; then
15- semanage fcontext -a -t redis_conf_t ' /etc/redis/sentinel'
16- semanage fcontext -a -t redis_conf_t ' /etc/redis/sentinel/sentinel.conf'
17- restorecon ' /etc/redis/sentinel' ' /etc/redis/sentinel/sentinel.conf'
14+ if command -v chcon & > /dev/null; then
15+ chcon -t redis_conf_t ' /etc/redis/sentinel' ' /etc/redis/sentinel/sentinel.conf'
1816fi
1917
2018#
Original file line number Diff line number Diff line change @@ -114,6 +114,12 @@ contents:
114114 mode: 0644
115115 owner: root
116116 group: root
117+ - src: ./configs/redis-ce.fc
118+ dst: /usr/share/selinux/packages/redis-ce.fc
119+ file_info:
120+ mode: 0644
121+ owner: root
122+ group: root
117123
118124 # Systemd service file for redis-server
119125 - src: ./configs/redis.service
You can’t perform that action at this time.
0 commit comments