Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 674564

Summary: selinux html doc httpd_sys_content_t instead of usr_t
Product: Gentoo Linux Reporter: Vilgot Fredenberg <vilgot>
Component: SELinuxAssignee: SE Linux Bugs <selinux>
Status: UNCONFIRMED ---    
Severity: normal CC: vilgot
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Vilgot Fredenberg 2019-01-04 23:35:59 UTC
Building sec-policy/selinux-base with USE flag +doc installs html documentation in /usr/share/doc/selinux-base-<version>/<selinuxtype>/html/

This is currently being labeled as usr_t but should be labelled as httpd_sys_content_t.

To resolve being able to read it through Nginx I ran `semanage fcontext -a -t httpd_sys_content_t "/usr/share/doc/selinux-base(-.*)?/(mcs|targeted|strict|mls)/html(/.*)?"`.

I think this should be added to the base policy as well as html is usually read through a http server.
Comment 1 Vilgot Fredenberg 2019-01-09 06:56:01 UTC
Looks like the refpolicy already contains this, although at "/usr/share/selinux-policy[^/]*/html(/.*)?".

(running on 2.20180701-r2)