-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtf2server_selinux.8
129 lines (91 loc) · 4.11 KB
/
tf2server_selinux.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
.TH "tf2server_selinux" "8" "21-02-02" "tf2server" "SELinux Policy tf2server"
.SH "NAME"
tf2server_selinux \- Security Enhanced Linux Policy for the tf2server processes
.SH "DESCRIPTION"
Security-Enhanced Linux secures the tf2server processes via flexible mandatory access control.
The tf2server processes execute with the tf2server_t SELinux type. You can check if you have these processes running by executing the \fBps\fP command with the \fB\-Z\fP qualifier.
For example:
.B ps -eZ | grep tf2server_t
.SH "IMPORTANT"
The selinux policy only works if the tf2server is managed by lgsm ( https://linuxgsm.com/ ) and the files are installed under /opt/tf2server*/ !
.SH "TODO"
Extend policy to include more granular control for the lgsm scripts as well.
Extend policy to include more of the lgsm servers (ie. support more than just tf2server).
Create better documentation (add managed files <-> context overview automatically).
.SH "ENTRYPOINTS"
The tf2server_t SELinux type can be entered via the \fBtf2server_exec_t\fP file type.
The default entrypoint paths for the tf2server_t domain are the following:
/opt/tf2server.*/tf2server
.SH PROCESS TYPES
SELinux defines process types (domains) for each process running on the system
.PP
You can see the context of a process using the \fB\-Z\fP option to \fBps\bP
.PP
Policy governs the access confined processes have to files.
SELinux tf2server policy is very flexible allowing users to setup their tf2server processes in as secure a method as possible.
.PP
The following process types are defined for tf2server:
.EX
.B tf2server_t
.EE
.PP
Note:
.B semanage permissive -a tf2server_t
can be used to make the process type tf2server_t permissive. SELinux does not deny access to permissive process types, but the AVC (SELinux denials) messages are still generated.
.SH BOOLEANS
SELinux policy is customizable based on least access required. tf2server policy is extremely flexible and has several booleans that allow you to manipulate the policy and run tf2server with the tightest access possible.
.PP
If you want to allow the tf2server processes to write core-dumps into /tmp/dumps/, you can turn on the tf2server_allow_coredumps_in_tmp boolean. Disabled by default.
.EX
.B setsebool -P tf2server_allow_coredumps_in_tmp 1
.EE
.SH "MANAGED FILES"
The SELinux process type tf2server_t can manage files labeled with the following file types. The paths listed are the default paths for these file types. Note the processes UID still need to have DAC permissions.
.br
.B tf2server_*_t
TODO add those later, in the meantime look in the source code in tf2server.fc OR use ls -alR /opt/tf2server/
/some/path
.br
.SH FILE CONTEXTS
SELinux requires files to have an extended attribute to define the file type.
.PP
You can see the context of a file using the \fB\-Z\fP option to \fBls\bP
.PP
Policy governs the access confined processes have to these files.
SELinux tf2server policy is very flexible allowing users to setup their tf2server processes in as secure a method as possible.
.PP
.I The following file types are defined for tf2server:
.EX
.PP
.B tf2server_exec_t
.EE
- Set files with the tf2server_exec_t type, if you want to transition an executable to the tf2server_t domain.
.br
.TP 5
Paths:
/opt/tf2server*/tf2server
.PP
Note: File context can be temporarily modified with the chcon command. If you want to permanently change the file context you need to use the
.B semanage fcontext
command. This will modify the SELinux labeling database. You will need to use
.B restorecon
to apply the labels.
.SH "COMMANDS"
.B semanage fcontext
can also be used to manipulate default file context mappings.
.PP
.B semanage permissive
can also be used to manipulate whether or not a process type is permissive.
.PP
.B semanage module
can also be used to enable/disable/install/remove policy modules.
.B semanage boolean
can also be used to manipulate the booleans
.PP
.B system-config-selinux
is a GUI tool available to customize SELinux policy settings.
.SH AUTHOR
This manual page was auto-generated using
.B "sepolicy manpage".
.SH "SEE ALSO"
selinux(8), semanage(8), restorecon(8), chcon(1), sepolicy(8), setsebool(8)