Fix selinux for Pagure
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
4b4cd4144f
commit
41cb84229e
5 changed files with 26 additions and 2 deletions
0
roles/pagure/frontend/files/selinux/pagure.fc
Normal file
0
roles/pagure/frontend/files/selinux/pagure.fc
Normal file
1
roles/pagure/frontend/files/selinux/pagure.if
Normal file
1
roles/pagure/frontend/files/selinux/pagure.if
Normal file
|
@ -0,0 +1 @@
|
||||||
|
## <summary></summary>
|
BIN
roles/pagure/frontend/files/selinux/pagure.pp
Normal file
BIN
roles/pagure/frontend/files/selinux/pagure.pp
Normal file
Binary file not shown.
11
roles/pagure/frontend/files/selinux/pagure.te
Normal file
11
roles/pagure/frontend/files/selinux/pagure.te
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
module pagure 1.0;
|
||||||
|
|
||||||
|
require {
|
||||||
|
type httpd_t;
|
||||||
|
type gitosis_var_lib_t;
|
||||||
|
class dir { add_name remove_name write };
|
||||||
|
class file { create link setattr unlink write };
|
||||||
|
}
|
||||||
|
|
||||||
|
allow httpd_t gitosis_var_lib_t:dir { add_name remove_name write };
|
||||||
|
allow httpd_t gitosis_var_lib_t:file { create link setattr unlink write };
|
|
@ -261,8 +261,20 @@
|
||||||
tags:
|
tags:
|
||||||
- pagure
|
- pagure
|
||||||
|
|
||||||
- name: set sebooleans so pagure can talk to the db
|
- name: copy over our custom selinux module
|
||||||
seboolean: name=httpd_can_network_connect_db
|
copy: src=selinux/pagure.pp dest=/usr/local/share/pagure.pp
|
||||||
|
register: selinux_module
|
||||||
|
tags:
|
||||||
|
- pagure
|
||||||
|
|
||||||
|
- name: install our custom selinux module
|
||||||
|
command: semodule -i /usr/local/share/pagure.pp
|
||||||
|
when: selinux_module|changed
|
||||||
|
tags:
|
||||||
|
- pagure
|
||||||
|
|
||||||
|
- name: set sebooleans so pagure can talk to the network (db + redis)
|
||||||
|
seboolean: name=httpd_can_network_connect
|
||||||
state=true
|
state=true
|
||||||
persistent=true
|
persistent=true
|
||||||
tags:
|
tags:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue