Skip to content

Commit 5da7618

Browse files
write-ups_unpublished: SELinux add details on files on disk used
1 parent 8dd6501 commit 5da7618

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

write-ups_unpublished/LSM_apparmor_selinux.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,17 @@ It may for instance be viewed with `seinfo policy.30 --all`
114114
- Contexts: e.g. `file_contexts`, `file_context*`, (for _file_ system objects), this specifies the default contexts (labels) for different files and directories on disk.
115115
Files may be deviate from this default (e.g. if it's simply moved there or was manually changed), it can optionally be restored with `restorecon`. \
116116
Example line: `/var/ftp(/.*)? system_u:object_r:ftpd_anon_rw_t:s0`
117+
- Policy module: binary `localpolicy.pp`, source `localpolicy.te` (monolithic policies vs individual loadable policies [5])
118+
119+
**To build binary policy, some relevant files [4][5]:** policy source `policy.conf`, loadable modules `*.te` (monolithic policies will be included in policy, individual loadable policies compiled to separate binary `*.pp`), contexts `*_context*` `contexts/*`, users and roles `seusers` `users` `roles`, makefile `makefile` \
120+
**Runtime config:** e.g. booleans `booleans*` \
121+
**Relevant dirs:** e.g. `/etc/selinux`, `find / -iname "selinux" -type d 2> /dev/null`
117122

118123
[1] - <https://wiki.gentoo.org/wiki/SELinux/Tutorials/Using_SELinux_booleans> \
119124
[2] - <https://selinuxproject.org/page/BasicConcepts> \
120-
[3] - <https://linux.die.net/man/8/ftpd_selinux>
125+
[3] - <https://linux.die.net/man/8/ftpd_selinux> \
126+
[4] - <https://selinuxproject.org/page/PolicyConfigurationFiles> \
127+
[5] - <https://selinuxproject.org/page/NB_RefPolicy#Reference_Policy_Files_and_Directories>
121128

122129
#### AppArmor
123130

0 commit comments

Comments
 (0)