You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: write-ups_unpublished/LSM_apparmor_selinux.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,18 +104,18 @@ Example: \
104
104
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.
105
105
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?_
106
106
-**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]
108
108
109
109
¹ 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>_
110
110
111
111
**Example of file types and names:**
112
112
- 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). \
114
114
It may for instance be viewed with `seinfo policy.30 --all`
115
115
- Contexts: e.g. `file_contexts`, `file_context*`, (for _file_ system objects), this specifies the default contexts (labels) for different files and directories on disk.
116
116
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`. \
117
117
Example line: `/var/ftp(/.*)? system_u:object_r:ftpd_anon_rw_t:s0`
**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`
0 commit comments