1dbadm_selinux(8) dbadm SELinux Policy documentation dbadm_selinux(8)
2
3
4
6 dbadm_r - Database administrator role. - Security Enhanced Linux Policy
7
8
10 SELinux supports Roles Based Access Control (RBAC), some Linux roles
11 are login roles, while other roles need to be transition into.
12
13 Note: Examples in this man page will use the staff_u SELinux user.
14
15 Non login roles are usually used for administrative tasks. For example,
16 tasks that require root privileges. Roles control which types a user
17 can run processes with. Roles often have default types assigned to
18 them.
19
20 The default type for the dbadm_r role is dbadm_t.
21
22 The newrole program to transition directly to this role.
23
24 newrole -r dbadm_r -t dbadm_t
25
26 sudo is the preferred method to do transition from one role to another.
27 You setup sudo to transition to dbadm_r by adding a similar line to the
28 /etc/sudoers file.
29
30 USERNAME ALL=(ALL) ROLE=dbadm_r TYPE=dbadm_t COMMAND
31
32 sudo will run COMMAND as staff_u:dbadm_r:dbadm_t:LEVEL
33
34 When using a non login role, you need to setup SELinux so that your
35 SELinux user can reach dbadm_r role.
36
37 Execute the following to see all of the assigned SELinux roles:
38
39 semanage user -l
40
41 You need to add dbadm_r to the staff_u user. You could setup the
42 staff_u user to be able to use the dbadm_r role with a command like:
43
44 $ semanage user -m -R 'staff_r system_r dbadm_r' staff_u
45
46
47
49 SELinux policy is customizable based on least access required. dbadm
50 policy is extremely flexible and has several booleans that allow you to
51 manipulate the policy and run dbadm with the tightest access possible.
52
53
54
55 If you want to determine whether dbadm can manage generic user files,
56 you must turn on the dbadm_manage_user_files boolean. Disabled by
57 default.
58
59 setsebool -P dbadm_manage_user_files 1
60
61
62
63 If you want to determine whether dbadm can read generic user files, you
64 must turn on the dbadm_read_user_files boolean. Disabled by default.
65
66 setsebool -P dbadm_read_user_files 1
67
68
69
70 If you want to allow users to resolve user passwd entries directly from
71 ldap rather then using a sssd server, you must turn on the authlo‐
72 gin_nsswitch_use_ldap boolean. Disabled by default.
73
74 setsebool -P authlogin_nsswitch_use_ldap 1
75
76
77
78 If you want to deny user domains applications to map a memory region as
79 both executable and writable, this is dangerous and the executable
80 should be reported in bugzilla, you must turn on the deny_execmem bool‐
81 ean. Enabled by default.
82
83 setsebool -P deny_execmem 1
84
85
86
87 If you want to deny any process from ptracing or debugging any other
88 processes, you must turn on the deny_ptrace boolean. Enabled by
89 default.
90
91 setsebool -P deny_ptrace 1
92
93
94
95 If you want to allow all domains to execute in fips_mode, you must turn
96 on the fips_mode boolean. Enabled by default.
97
98 setsebool -P fips_mode 1
99
100
101
102 If you want to allow confined applications to run with kerberos, you
103 must turn on the kerberos_enabled boolean. Disabled by default.
104
105 setsebool -P kerberos_enabled 1
106
107
108
109 If you want to allow system to run with NIS, you must turn on the
110 nis_enabled boolean. Disabled by default.
111
112 setsebool -P nis_enabled 1
113
114
115
116 If you want to allow confined applications to use nscd shared memory,
117 you must turn on the nscd_use_shm boolean. Disabled by default.
118
119 setsebool -P nscd_use_shm 1
120
121
122
123 If you want to allow unconfined executables to make their stack exe‐
124 cutable. This should never, ever be necessary. Probably indicates a
125 badly coded executable, but could indicate an attack. This executable
126 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
127 stack boolean. Disabled by default.
128
129 setsebool -P selinuxuser_execstack 1
130
131
132
134 The SELinux process type dbadm_t can manage files labeled with the fol‐
135 lowing file types. The paths listed are the default paths for these
136 file types. Note the processes UID still need to have DAC permissions.
137
138 mysqld_db_t
139
140 /var/lib/mysql(-files|-keyring)?(/.*)?
141
142 mysqld_etc_t
143
144 /etc/mysql(/.*)?
145 /etc/my.cnf.d(/.*)?
146 /etc/my.cnf
147
148 mysqld_home_t
149
150 /root/.my.cnf
151 /home/[^/]+/.my.cnf
152
153 mysqld_log_t
154
155 /var/log/mysql.*
156 /var/log/mysql(/.*)?
157 /var/log/mariadb(/.*)?
158
159 mysqld_tmp_t
160
161
162 mysqld_unit_file_t
163
164 /usr/lib/systemd/system/mysqld.*
165 /usr/lib/systemd/system/mariadb.*
166
167 mysqld_var_run_t
168
169 /var/run/mysql(/.*)?
170 /var/run/mysqld(/.*)?
171 /var/run/mariadb(/.*)?
172 /var/lib/mysql/mysql.sock
173
174 postgresql_db_t
175
176 /var/lib/pgsql(/.*)?
177 /var/lib/sepgsql(/.*)?
178 /var/lib/postgres(ql)?(/.*)?
179 /usr/share/jonas/pgsql(/.*)?
180 /usr/lib/pgsql/test/regress(/.*)?
181
182 postgresql_etc_t
183
184 /etc/postgresql(/.*)?
185 /etc/sysconfig/pgsql(/.*)?
186
187 postgresql_log_t
188
189 /var/lib/pgsql/.*.log
190 /var/log/rhdb/rhdb(/.*)?
191 /var/log/postgresql(/.*)?
192 /var/log/postgres.log.*
193 /var/lib/pgsql/logfile(/.*)?
194 /var/lib/pgsql/data/log(/.*)?
195 /var/log/sepostgresql.log.*
196 /var/lib/pgsql/data/pg_log(/.*)?
197 /var/lib/sepgsql/pgstartup.log
198
199 postgresql_tmp_t
200
201
202 postgresql_var_run_t
203
204 /var/run/postgresql(/.*)?
205
206 systemd_passwd_var_run_t
207
208 /var/run/systemd/ask-password(/.*)?
209 /var/run/systemd/ask-password-block(/.*)?
210
211 user_home_t
212
213 /home/[^/]+/.+
214
215 user_tmp_t
216
217 /dev/shm/mono.*
218 /var/run/user(/.*)?
219 /tmp/.ICE-unix(/.*)?
220 /tmp/.X11-unix(/.*)?
221 /dev/shm/pulse-shm.*
222 /tmp/.X0-lock
223 /tmp/hsperfdata_root
224 /var/tmp/hsperfdata_root
225 /home/[^/]+/tmp
226 /home/[^/]+/.tmp
227 /tmp/gconfd-[^/]+
228
229
231 semanage fcontext can also be used to manipulate default file context
232 mappings.
233
234 semanage permissive can also be used to manipulate whether or not a
235 process type is permissive.
236
237 semanage module can also be used to enable/disable/install/remove pol‐
238 icy modules.
239
240 semanage boolean can also be used to manipulate the booleans
241
242
243 system-config-selinux is a GUI tool available to customize SELinux pol‐
244 icy settings.
245
246
248 This manual page was auto-generated using sepolicy manpage .
249
250
252 selinux(8), dbadm(8), semanage(8), restorecon(8), chcon(1), sepol‐
253 icy(8), setsebool(8), dbadm_sudo_selinux(8), dbadm_sudo_selinux(8)
254
255
256
257mgrepl@redhat.com dbadm dbadm_selinux(8)