copr-dist-git: give map permission on git_user_content_t to cgit

This commit is contained in:
clime 2018-01-03 14:07:02 +01:00
parent 54ca4ea95c
commit c0631fed5d
3 changed files with 21 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1,9 @@
module git_script_t 1.0.1;
require {
type git_script_t;
type git_user_content_t;
class file { map };
}
allow git_script_t git_user_content_t:file map;

View file

@ -95,5 +95,17 @@
- "dist-git.socket"
- "copr-dist-git"
- name: copy over our custom selinux policy for cgit
copy: src=git_script_t.pp dest=/usr/local/share/selinux/git_script_t.pp
register: cgit_selinux_module
tags:
- selinux
- name: install our custom selinux policy for cgit
command: semodule -i /usr/local/share/selinux/git_script_t.pp
when: cgit_selinux_module|changed
tags:
- selinux
- name: Create /var/cache/cgit/repo-list.rc if does not exists (it last 30 minutes to generate)
command: /etc/cron.hourly/copr-dist-git creates=/var/cache/cgit/repo-list.rc