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
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -103,18 +103,20 @@ For instance, the file 'file_contexts' holds regex to file(s) and the default co
103
103
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
-
-**Domain**:
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
108
108
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>_
109
110
110
111
**Example of file types and names:**
111
112
- Booleans: `booleans.local` (persistent config of which booleans should be on)
112
-
- Policy: `policy.30`(all the compiled rules that will be used by SELinux system-wide, `.30` is simply the policy version). \
113
+
- Policy: `policy.30``sepolicy/*` (the compiled rules that will be used by SELinux system-wide, `.30` is simply the policy version). \
113
114
It may for instance be viewed with `seinfo policy.30 --all`
114
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.
115
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`. \
116
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`\
0 commit comments