1gpg_selinux(8) SELinux Policy gpg gpg_selinux(8)
2
3
4
6 gpg_selinux - Security Enhanced Linux Policy for the gpg processes
7
9 Security-Enhanced Linux secures the gpg processes via flexible manda‐
10 tory access control.
11
12 The gpg processes execute with the gpg_t SELinux type. You can check if
13 you have these processes running by executing the ps command with the
14 -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep gpg_t
19
20
21
23 The gpg_t SELinux type can be entered via the gpg_exec_t file type.
24
25 The default entrypoint paths for the gpg_t domain are the following:
26
27 /usr/bin/gpg(2)?, /usr/lib/gnupg/.*, /usr/bin/gpgsm
28
30 SELinux defines process types (domains) for each process running on the
31 system
32
33 You can see the context of a process using the -Z option to ps
34
35 Policy governs the access confined processes have to files. SELinux
36 gpg policy is very flexible allowing users to setup their gpg processes
37 in as secure a method as possible.
38
39 The following process types are defined for gpg:
40
41 gpg_t, gpg_agent_t, gpg_helper_t, gpg_pinentry_t, gpg_web_t
42
43 Note: semanage permissive -a gpg_t can be used to make the process type
44 gpg_t permissive. SELinux does not deny access to permissive process
45 types, but the AVC (SELinux denials) messages are still generated.
46
47
49 SELinux policy is customizable based on least access required. gpg
50 policy is extremely flexible and has several booleans that allow you to
51 manipulate the policy and run gpg with the tightest access possible.
52
53
54
55 If you want to allow all domains to execute in fips_mode, you must turn
56 on the fips_mode boolean. Enabled by default.
57
58 setsebool -P fips_mode 1
59
60
61
62 If you want to allow system to run with NIS, you must turn on the
63 nis_enabled boolean. Disabled by default.
64
65 setsebool -P nis_enabled 1
66
67
68
70 The SELinux process type gpg_t can manage files labeled with the fol‐
71 lowing file types. The paths listed are the default paths for these
72 file types. Note the processes UID still need to have DAC permissions.
73
74 cifs_t
75
76
77 ecryptfs_t
78
79 /home/[^/]+/.Private(/.*)?
80 /home/[^/]+/.ecryptfs(/.*)?
81
82 etc_mail_t
83
84 /etc/mail(/.*)?
85
86 fusefs_t
87
88 /var/run/user/[0-9]+/gvfs
89
90 gnome_home_type
91
92
93 gpg_agent_tmp_t
94
95 /home/[^/]+/.gnupg/log-socket
96
97 gpg_secret_t
98
99 /root/.gnupg(/.+)?
100 /etc/mail/spamassassin/sa-update-keys(/.*)?
101 /home/[^/]+/.gnupg(/.+)?
102
103 insights_client_tmp_t
104
105 /var/tmp/insights-client(/.*)?
106 /tmp/insights-client.ppid
107 /var/tmp/insights-client.ppid
108
109 insights_client_var_lib_t
110
111 /var/lib/insights(/.*)?
112
113 krb5_host_rcache_t
114
115 /var/tmp/krb5_0.rcache2
116 /var/cache/krb5rcache(/.*)?
117 /var/tmp/nfs_0
118 /var/tmp/DNS_25
119 /var/tmp/host_0
120 /var/tmp/imap_0
121 /var/tmp/HTTP_23
122 /var/tmp/HTTP_48
123 /var/tmp/ldap_55
124 /var/tmp/ldap_487
125 /var/tmp/ldapmap1_0
126
127 mozilla_home_t
128
129 /home/[^/]+/.lyx(/.*)?
130 /home/[^/]+/.java(/.*)?
131 /home/[^/]+/.adobe(/.*)?
132 /home/[^/]+/.gnash(/.*)?
133 /home/[^/]+/.webex(/.*)?
134 /home/[^/]+/.IBMERS(/.*)?
135 /home/[^/]+/.galeon(/.*)?
136 /home/[^/]+/.spicec(/.*)?
137 /home/[^/]+/POkemon.*(/.*)?
138 /home/[^/]+/.icedtea(/.*)?
139 /home/[^/]+/.mozilla(/.*)?
140 /home/[^/]+/.phoenix(/.*)?
141 /home/[^/]+/.netscape(/.*)?
142 /home/[^/]+/.ICAClient(/.*)?
143 /home/[^/]+/.quakelive(/.*)?
144 /home/[^/]+/.macromedia(/.*)?
145 /home/[^/]+/.thunderbird(/.*)?
146 /home/[^/]+/.gcjwebplugin(/.*)?
147 /home/[^/]+/.grl-podcasts(/.*)?
148 /home/[^/]+/.cache/mozilla(/.*)?
149 /home/[^/]+/.icedteaplugin(/.*)?
150 /home/[^/]+/zimbrauserdata(/.*)?
151 /home/[^/]+/.juniper_networks(/.*)?
152 /home/[^/]+/.cache/icedtea-web(/.*)?
153 /home/[^/]+/abc
154 /home/[^/]+/mozilla.pdf
155 /home/[^/]+/.gnashpluginrc
156
157 nfs_t
158
159
160 tmp_t
161
162 /sandbox(/.*)?
163 /tmp
164 /usr/tmp
165 /var/tmp
166 /var/tmp
167 /tmp-inst
168 /var/tmp-inst
169 /var/tmp/tmp-inst
170 /var/tmp/vi.recover
171
172 user_home_t
173
174 /home/[^/]+/.+
175
176 user_tmp_type
177
178 all user tmp files
179
180
182 SELinux requires files to have an extended attribute to define the file
183 type.
184
185 You can see the context of a file using the -Z option to ls
186
187 Policy governs the access confined processes have to these files.
188 SELinux gpg policy is very flexible allowing users to setup their gpg
189 processes in as secure a method as possible.
190
191 STANDARD FILE CONTEXT
192
193 SELinux defines the file context types for the gpg, if you wanted to
194 store files with these types in a different paths, you need to execute
195 the semanage command to specify alternate labeling and then use re‐
196 storecon to put the labels on disk.
197
198 semanage fcontext -a -t gpg_exec_t '/srv/gpg/content(/.*)?'
199 restorecon -R -v /srv/mygpg_content
200
201 Note: SELinux often uses regular expressions to specify labels that
202 match multiple files.
203
204 The following file types are defined for gpg:
205
206
207
208 gpg_agent_exec_t
209
210 - Set files with the gpg_agent_exec_t type, if you want to transition
211 an executable to the gpg_agent_t domain.
212
213
214
215 gpg_agent_tmp_t
216
217 - Set files with the gpg_agent_tmp_t type, if you want to store gpg
218 agent temporary files in the /tmp directories.
219
220
221
222 gpg_agent_tmpfs_t
223
224 - Set files with the gpg_agent_tmpfs_t type, if you want to store gpg
225 agent files on a tmpfs file system.
226
227
228
229 gpg_exec_t
230
231 - Set files with the gpg_exec_t type, if you want to transition an exe‐
232 cutable to the gpg_t domain.
233
234
235 Paths:
236 /usr/bin/gpg(2)?, /usr/lib/gnupg/.*, /usr/bin/gpgsm
237
238
239 gpg_helper_exec_t
240
241 - Set files with the gpg_helper_exec_t type, if you want to transition
242 an executable to the gpg_helper_t domain.
243
244
245
246 gpg_pinentry_tmp_t
247
248 - Set files with the gpg_pinentry_tmp_t type, if you want to store gpg
249 pinentry temporary files in the /tmp directories.
250
251
252
253 gpg_pinentry_tmpfs_t
254
255 - Set files with the gpg_pinentry_tmpfs_t type, if you want to store
256 gpg pinentry files on a tmpfs file system.
257
258
259
260 gpg_secret_t
261
262 - Set files with the gpg_secret_t type, if you want to treat the files
263 as gpg secret data.
264
265
266 Paths:
267 /root/.gnupg(/.+)?, /etc/mail/spamassassin/sa-update-keys(/.*)?,
268 /home/[^/]+/.gnupg(/.+)?
269
270
271 gpg_tmpfs_t
272
273 - Set files with the gpg_tmpfs_t type, if you want to store gpg files
274 on a tmpfs file system.
275
276
277
278 Note: File context can be temporarily modified with the chcon command.
279 If you want to permanently change the file context you need to use the
280 semanage fcontext command. This will modify the SELinux labeling data‐
281 base. You will need to use restorecon to apply the labels.
282
283
285 semanage fcontext can also be used to manipulate default file context
286 mappings.
287
288 semanage permissive can also be used to manipulate whether or not a
289 process type is permissive.
290
291 semanage module can also be used to enable/disable/install/remove pol‐
292 icy modules.
293
294 semanage boolean can also be used to manipulate the booleans
295
296
297 system-config-selinux is a GUI tool available to customize SELinux pol‐
298 icy settings.
299
300
302 This manual page was auto-generated using sepolicy manpage .
303
304
306 selinux(8), gpg(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
307 setsebool(8), gpg_agent_selinux(8), gpg_agent_selinux(8),
308 gpg_helper_selinux(8), gpg_helper_selinux(8), gpg_pinentry_selinux(8),
309 gpg_pinentry_selinux(8), gpg_web_selinux(8), gpg_web_selinux(8)
310
311
312
313gpg 23-12-15 gpg_selinux(8)