Skip to content

Commit 7e66f5c

Browse files
write-ups_unpublished: SELinux small fix
1 parent a0735eb commit 7e66f5c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

write-ups_unpublished/LSM_apparmor_selinux.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,18 @@ Example: \
104104
The boolean 'allow_ftpd_anon_write'[3] modifies the policy for ftpd to allow so-called anonymous users to write to disk. This is achieved with the _type_ 'public_content_rw_t' (to put it simply: like a special file permission), which is applied to files or directories that the anonymous user should have access to.
105105
As the application (ftpd) itself is not aware of SELinux, SELinux bases this on the process and file _types_. _**TODO:** question, how does SELinux correctly identify that the FTP user writing is anonymous?_
106106
- **Domain**: processes (to put it simply: processes run in domains and are thereby separated from each other and can be granted different permissions)
107-
- **Macros**: ...similar to macros in programming...
107+
- **Macros**: ...similar to macros in programming... [6]
108108

109109
¹ See Multi-Level Security (**MLS**) and Multi-Category Security (**MCS**): _<https://selinuxproject.org/page/MLSStatements>, <https://selinuxproject.org/page/MultiCategorySecurity>, <https://www.redhat.com/en/blog/why-you-should-be-using-multi-category-security-your-linux-containers>_
110110

111111
**Example of file types and names:**
112112
- Booleans: `booleans.local` (persistent config of which booleans should be on)
113-
- Policy: `policy.30` `sepolicy/*` (the compiled rules that will be used by SELinux system-wide, `.30` is simply the policy version). \
113+
- Policy: `policy.30` (compiled rules that will be used by SELinux system-wide, `.30` is simply the policy version). \
114114
It may for instance be viewed with `seinfo policy.30 --all`
115115
- Contexts: e.g. `file_contexts`, `file_context*`, (for _file_ system objects), this specifies the default contexts (labels) for different files and directories on disk.
116116
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`. \
117117
Example line: `/var/ftp(/.*)? system_u:object_r:ftpd_anon_rw_t:s0`
118-
- Policy module: binary `localpolicy.pp`, source `localpolicy.te` (monolithic policies vs individual loadable policies [5])
118+
- Policy module: binary `localpolicy.pp`, source `localpolicy.te` (monolithic policies vs individual loadable policies [5]). Possibly `*sepolicy/*`.
119119
- Macros: `*macros`, `*.m4`
120120

121121
**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` \
@@ -126,7 +126,8 @@ Example line: `/var/ftp(/.*)? system_u:object_r:ftpd_anon_rw_t:s0`
126126
[2] - <https://selinuxproject.org/page/BasicConcepts> \
127127
[3] - <https://linux.die.net/man/8/ftpd_selinux> \
128128
[4] - <https://selinuxproject.org/page/PolicyConfigurationFiles> \
129-
[5] - <https://selinuxproject.org/page/NB_RefPolicy#Reference_Policy_Files_and_Directories>
129+
[5] - <https://selinuxproject.org/page/NB_RefPolicy#Reference_Policy_Files_and_Directories> \
130+
[6] - <https://docs.huihoo.com/redhat/rhel-4-docs/rhel-selg-en-4/rhlcommon-section-0053.html>
130131

131132
#### AppArmor
132133

0 commit comments

Comments
 (0)