1dbadm_selinux(8)      dbadm SELinux Policy documentation      dbadm_selinux(8)
2
3
4

NAME

6       dbadm_r - Database administrator role. - Security Enhanced Linux Policy
7
8

DESCRIPTION

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

BOOLEANS

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 deny user domains applications to map a memory region as
71       both  executable  and  writable,  this  is dangerous and the executable
72       should be reported in bugzilla, you must turn on the deny_execmem bool‐
73       ean. Enabled by default.
74
75       setsebool -P deny_execmem 1
76
77
78
79       If  you  want  to deny any process from ptracing or debugging any other
80       processes, you  must  turn  on  the  deny_ptrace  boolean.  Enabled  by
81       default.
82
83       setsebool -P deny_ptrace 1
84
85
86
87       If you want to allow all domains to execute in fips_mode, you must turn
88       on the fips_mode boolean. Enabled by default.
89
90       setsebool -P fips_mode 1
91
92
93
94       If you want to allow system to run with  NIS,  you  must  turn  on  the
95       nis_enabled boolean. Disabled by default.
96
97       setsebool -P nis_enabled 1
98
99
100
101       If  you  want  to allow unconfined executables to make their stack exe‐
102       cutable.  This should never, ever be necessary.  Probably  indicates  a
103       badly  coded  executable, but could indicate an attack. This executable
104       should be reported in bugzilla, you must turn on the  selinuxuser_exec‐
105       stack boolean. Disabled by default.
106
107       setsebool -P selinuxuser_execstack 1
108
109
110

MANAGED FILES

112       The SELinux process type dbadm_t can manage files labeled with the fol‐
113       lowing file types.  The paths listed are the default  paths  for  these
114       file types.  Note the processes UID still need to have DAC permissions.
115
116       mysqld_db_t
117
118            /var/lib/mysql(-files|-keyring)?(/.*)?
119
120       mysqld_etc_t
121
122            /etc/mysql(/.*)?
123            /etc/my.cnf.d(/.*)?
124            /etc/my.cnf
125
126       mysqld_home_t
127
128            /root/.my.cnf
129            /home/[^/]+/.my.cnf
130
131       mysqld_log_t
132
133            /var/log/mysql.*
134            /var/log/mysql(/.*)?
135            /var/log/mariadb(/.*)?
136
137       mysqld_unit_file_t
138
139            /usr/lib/systemd/system/mysqld.*
140            /usr/lib/systemd/system/mariadb.*
141
142       mysqld_var_run_t
143
144            /var/run/mysql(/.*)?
145            /var/run/mysqld(/.*)?
146            /var/run/mariadb(/.*)?
147            /var/lib/mysql/mysql.sock
148
149       postgresql_db_t
150
151            /var/lib/pgsql(/.*)?
152            /var/lib/sepgsql(/.*)?
153            /var/lib/postgres(ql)?(/.*)?
154            /usr/share/jonas/pgsql(/.*)?
155            /usr/lib/pgsql/test/regress(/.*)?
156
157       postgresql_etc_t
158
159            /etc/postgresql(/.*)?
160            /etc/sysconfig/pgsql(/.*)?
161
162       postgresql_log_t
163
164            /var/lib/pgsql/.*.log
165            /var/log/rhdb/rhdb(/.*)?
166            /var/log/postgresql(/.*)?
167            /var/log/postgres.log.*
168            /var/lib/pgsql/logfile(/.*)?
169            /var/lib/pgsql/data/log(/.*)?
170            /var/log/sepostgresql.log.*
171            /var/lib/pgsql/data/pg_log(/.*)?
172            /var/lib/sepgsql/pgstartup.log
173
174       postgresql_var_run_t
175
176            /var/run/postgresql(/.*)?
177
178       systemd_passwd_var_run_t
179
180            /var/run/systemd/ask-password(/.*)?
181            /var/run/systemd/ask-password-block(/.*)?
182
183       user_home_t
184
185            /home/[^/]+/.+
186
187

COMMANDS

189       semanage  fcontext  can also be used to manipulate default file context
190       mappings.
191
192       semanage permissive can also be used to manipulate  whether  or  not  a
193       process type is permissive.
194
195       semanage  module can also be used to enable/disable/install/remove pol‐
196       icy modules.
197
198       semanage boolean can also be used to manipulate the booleans
199
200
201       system-config-selinux is a GUI tool available to customize SELinux pol‐
202       icy settings.
203
204

AUTHOR

206       This manual page was auto-generated using sepolicy manpage .
207
208

SEE ALSO

210       selinux(8),  dbadm(8),  semanage(8),  restorecon(8),  chcon(1),  sepol‐
211       icy(8), setsebool(8), dbadm_sudo_selinux(8), dbadm_sudo_selinux(8)
212
213
214
215mgrepl@redhat.com                    dbadm                    dbadm_selinux(8)
Impressum