root/archive/mls/attrib.te

Revision 1056, 19.3 kB (checked in by cpebenito, 3 years ago)

add fc mls policy

Line 
1 #
2 # Declarations for type attributes.
3 #
4
5 # A type attribute can be used to identify a set of types with a similar
6 # property.  Each type can have any number of attributes, and each
7 # attribute can be associated with any number of types.  Attributes are
8 # explicitly declared here, and can then be associated with particular
9 # types in type declarations.  Attribute names can then be used throughout
10 # the configuration to express the set of types that are associated with
11 # the attribute.  Attributes have no implicit meaning to SELinux.  The
12 # meaning of all attributes are completely defined through their
13 # usage within the configuration, but should be documented here as
14 # comments preceding the attribute declaration. 
15
16 #####################
17 # Attributes for MLS:
18 #
19
20 # Common Terminology
21 #       MLS Range: low-high
22 #               low referred to as "Effective Sensitivity Label (SL)"
23 #               high referred to as "Clearance SL"
24
25
26 #
27 # File System MLS attributes/privileges
28 #
29 # Grant MLS read access to files not dominated by the process Effective SL
30 attribute mlsfileread;
31 # Grant MLS read access to files dominated by the process Clearance SL
32 attribute mlsfilereadtoclr;
33 # Grant MLS write access to files not equal to the Effective SL
34 attribute mlsfilewrite;
35 # Grant MLS write access to files which dominate the process Effective SL
36 # and are dominated by the process Clearance SL
37 attribute mlsfilewritetoclr;
38 # Grant MLS ability to change file label to a new label which dominates
39 # the old label 
40 attribute mlsfileupgrade;
41 # Grant MLS ability to change file label to a new label which is
42 # dominated by or incomparable to the old label
43 attribute mlsfiledowngrade;
44
45 #
46 # Network MLS attributes/privileges
47 #
48 # Grant MLS read access to packets not dominated by the process Effective SL
49 attribute mlsnetread;
50 # Grant MLS read access to packets dominated by the process Clearance SL
51 attribute mlsnetreadtoclr;
52 # Grant MLS write access to packets not equal to the Effective SL
53 attribute mlsnetwrite;
54 # Grant MLS write access to packets which dominate the Effective SL
55 # and are dominated by the process Clearance SL
56 attribute mlsnetwritetoclr;
57 # Grant MLS read access to packets from hosts or interfaces which dominate
58 # or incomparable to the process Effective SL
59 attribute mlsnetrecvall;
60 # Grant MLS ability to change socket label to a new label which dominates
61 # the old label 
62 attribute mlsnetupgrade;
63 # Grant MLS ability to change socket label to a new label which is
64 # dominated by or incomparable to the old label
65 attribute mlsnetdowngrade;
66
67 #
68 # IPC MLS attributes/privileges
69 #
70 # Grant MLS read access to IPC objects not dominated by the process Effective SL
71 attribute mlsipcread;
72 # Grant MLS read access to IPC objects dominated by the process Clearance SL
73 attribute mlsipcreadtoclr;
74 # Grant MLS write access to IPC objects not equal to the process Effective SL
75 attribute mlsipcwrite;
76 # Grant MLS write access to IPC objects which dominate the process Effective SL
77 # and are dominated by the process Clearance SL
78 attribute mlsipcwritetoclr;
79
80 #
81 # Process MLS attributes/privileges
82 #
83 # Grant MLS read access to processes not dominated by the process Effective SL
84 attribute mlsprocread;
85 # Grant MLS read access to processes dominated by the process Clearance SL
86 attribute mlsprocreadtoclr;
87 # Grant MLS write access to processes not equal to the Effective SL
88 attribute mlsprocwrite;
89 # Grant MLS write access to processes which dominate the process Effective SL
90 # and are dominated by the process Clearance SL
91 attribute mlsprocwritetoclr;
92 # Grant MLS ability to change Effective SL or Clearance SL of process to a
93 # label dominated by the Clearance SL
94 attribute mlsprocsetsl;
95
96 #
97 # X Window MLS attributes/privileges
98 #
99 # Grant MLS read access to X objects not dominated by the process Effective SL
100 attribute mlsxwinread;
101 # Grant MLS read access to X objects dominated by the process Clearance SL
102 attribute mlsxwinreadtoclr;
103 # Grant MLS write access to X objects not equal to the process Effective SL
104 attribute mlsxwinwrite;
105 # Grant MLS write access to X objects which dominate the process Effective SL
106 # and are dominated by the process Clearance SL
107 attribute mlsxwinwritetoclr;
108 # Grant MLS read access to X properties not dominated by
109 # the process Effective SL
110 attribute mlsxwinreadproperty;
111 # Grant MLS write access to X properties not equal to the process Effective SL
112 attribute mlsxwinwriteproperty;
113 # Grant MLS read access to X colormaps not dominated by
114 # the process Effective SL
115 attribute mlsxwinreadcolormap;
116 # Grant MLS write access to X colormaps not equal to the process Effective SL
117 attribute mlsxwinwritecolormap;
118 # Grant MLS write access to X xinputs not equal to the process Effective SL
119 attribute mlsxwinwritexinput;
120
121 # Grant MLS read/write access to objects which internally arbitrate MLS
122 attribute mlstrustedobject;
123
124 #
125 # Both of the following attributes are needed for a range transition to succeed
126 #
127 # Grant ability for the current domain to change SL upon process transition
128 attribute privrangetrans;
129 # Grant ability for the new process domain to change SL upon process transition
130 attribute mlsrangetrans;
131
132 #########################
133 # Attributes for domains:
134 #
135
136 # The domain attribute identifies every type that can be
137 # assigned to a process.  This attribute is used in TE rules
138 # that should be applied to all domains, e.g. permitting
139 # init to kill all processes.
140 attribute domain;
141
142 # The daemon attribute identifies domains for system processes created via
143 # the daemon_domain, daemon_base_domain, and init_service_domain macros.
144 attribute daemon;
145
146 # The privuser attribute identifies every domain that can
147 # change its SELinux user identity.  This attribute is used
148 # in the constraints configuration.  NOTE:  This attribute
149 # is not required for domains that merely change the Linux
150 # uid attributes, only for domains that must change the
151 # SELinux user identity.  Also note that this attribute makes
152 # no sense without the privrole attribute.
153 attribute privuser;
154
155 # The privrole attribute identifies every domain that can
156 # change its SELinux role.  This attribute is used in the
157 # constraints configuration.
158 attribute privrole;
159
160 # The userspace_objmgr attribute identifies every domain
161 # which enforces its own policy.
162 attribute userspace_objmgr;
163
164 # The priv_system_role attribute identifies every domain that can
165 # change role from a user role to system_r role, and identity from a user
166 # identity to system_u.  It is used in the constraints configuration.
167 attribute priv_system_role;
168
169 # The privowner attribute identifies every domain that can
170 # assign a different SELinux user identity to a file, or that
171 # can create a file with an identity that is not the same as the
172 # process identity.  This attribute is used in the constraints
173 # configuration.
174 attribute privowner;
175
176 # The privlog attribute identifies every domain that can
177 # communicate with syslogd through its Unix domain socket.
178 # There is an assertion that other domains can not do it,
179 # and an allow rule to permit it
180 attribute privlog;
181
182 # The privmodule attribute identifies every domain that can run
183 # modprobe, there is an assertion that other domains can not do it,
184 # and an allow rule to permit it
185 attribute privmodule;
186
187 # The privsysmod attribute identifies every domain that can have the
188 # sys_module capability
189 attribute privsysmod;
190
191 # The privmem attribute identifies every domain that can
192 # access kernel memory devices.
193 # This attribute is used in the TE assertions to verify
194 # that such access is limited to domains that are explicitly
195 # tagged with this attribute.
196 attribute privmem;
197
198 # The privkmsg attribute identifies every domain that can
199 # read kernel messages (/proc/kmsg)
200 # This attribute is used in the TE assertions to verify
201 # that such access is limited to domains that are explicitly
202 # tagged with this attribute.
203 attribute privkmsg;
204
205 # The privfd attribute identifies every domain that should have
206 # file handles inherited widely (IE sshd_t and getty_t).
207 attribute privfd;
208
209 # The privhome attribute identifies every domain that can create files under
210 # regular user home directories in the regular context (IE act on behalf of
211 # a user in writing regular files)
212 attribute privhome;
213
214 # The auth attribute identifies every domain that needs
215 # to read /etc/shadow, and grants the permission.
216 attribute auth;
217
218 # The auth_bool attribute identifies every domain that can
219 # read /etc/shadow if its boolean is set;
220 attribute auth_bool;
221
222 # The auth_write attribute identifies every domain that can have write or
223 # relabel access to /etc/shadow, but does not grant it.
224 attribute auth_write;
225
226 # The auth_chkpwd attribute identifies every system domain that can
227 # authenticate users by running unix_chkpwd
228 attribute auth_chkpwd;
229
230 # The change_context attribute identifies setfiles_t, restorecon_t, and other
231 # system domains that change the context of most/all files on the system
232 attribute change_context;
233
234 # The etc_writer attribute identifies every domain that can write to etc_t
235 attribute etc_writer;
236
237 # The sysctl_kernel_writer attribute identifies domains that can write to
238 # sysctl_kernel_t, in addition the admin attribute is permitted write access
239 attribute sysctl_kernel_writer;
240
241 # the sysctl_net_writer attribute identifies domains that can write to
242 # sysctl_net_t files.
243 attribute sysctl_net_writer;
244
245 # The sysctl_type attribute identifies every type that is assigned
246 # to a sysctl entry.  This can be used in allow rules to grant
247 # permissions to all sysctl entries without enumerating each individual
248 # type, but should be used with care.
249 attribute sysctl_type;
250
251 # The admin attribute identifies every administrator domain.
252 # It is used in TE assertions when verifying that only administrator
253 # domains have certain permissions. 
254 # This attribute is presently associated with sysadm_t and
255 # certain administrator utility domains. 
256 # XXX The use of this attribute should be reviewed for consistency.
257 # XXX Might want to partition into several finer-grained attributes
258 # XXX used in different assertions within assert.te.
259 attribute admin;
260
261 # The secadmin attribute identifies every security administrator domain.
262 # It is used in TE assertions when verifying that only administrator
263 # domains have certain permissions. 
264 # This attribute is presently associated with sysadm_t and secadm_t
265 attribute secadmin;
266
267 # The userdomain attribute identifies every user domain, presently
268 # user_t and sysadm_t.  It is used in TE rules that should be applied
269 # to all user domains.
270 attribute userdomain;
271
272 # for a small domain that can only be used for newrole
273 attribute user_mini_domain;
274
275 # pty for the mini domain
276 attribute mini_pty_type;
277
278 # pty created by a server such as sshd
279 attribute server_pty;
280
281 # attribute for all non-administrative devpts types
282 attribute userpty_type;
283
284 # The user_tty_type identifies every type for a tty or pty owned by an
285 # unpriviledged user
286 attribute user_tty_type;
287
288 # The admin_tty_type identifies every type for a tty or pty owned by a
289 # priviledged user
290 attribute admin_tty_type;
291
292 # The user_crond_domain attribute identifies every user_crond domain, presently
293 # user_crond_t and sysadm_crond_t.  It is used in TE rules that should be
294 # applied to all user domains.
295 attribute user_crond_domain;
296
297 # The unpriv_userdomain identifies non-administrative users (default user_t)
298 attribute unpriv_userdomain;
299
300 # This attribute is for the main user home directory for unpriv users
301 attribute user_home_dir_type;
302
303 # The gphdomain attribute identifies every gnome-pty-helper derived
304 # domain.  It is used in TE rules to permit inheritance and use of
305 # descriptors created by these domains.
306 attribute gphdomain;
307
308 # The fs_domain identifies every domain that may directly access a fixed disk
309 attribute fs_domain;
310
311 # This attribute is for all domains for the userhelper program.
312 attribute userhelperdomain;
313
314 ############################
315 # Attributes for file types:
316 #
317
318 # The file_type attribute identifies all types assigned to files
319 # in persistent filesystems.  It is used in TE rules to permit
320 # the association of all such file types with persistent filesystem
321 # types, and to permit certain domains to access all such types as
322 # appropriate.
323 attribute file_type;
324
325 # The secure_file_type attribute identifies files
326 # which will be treated with a higer level of security.
327 # Most domains will be prevented from manipulating files in this domain
328 attribute secure_file_type;
329
330 # The device_type attribute identifies all types assigned to device nodes
331 attribute device_type;
332
333 # The proc_fs attribute identifies all types that may be assigned to
334 # files under /proc.
335 attribute proc_fs;
336
337 # The dev_fs attribute identifies all types that may be assigned to
338 # files, sockets, or pipes under /dev.
339 attribute dev_fs;
340
341 # The sysadmfile attribute identifies all types assigned to files
342 # that should be completely accessible to administrators.  It is used
343 # in TE rules to grant such access for administrator domains.
344 attribute sysadmfile;
345
346 # The secadmfile attribute identifies all types assigned to files
347 # that should be only accessible to security administrators.  It is used
348 # in TE rules to grant such access for security administrator domains.
349 attribute secadmfile;
350
351 # The fs_type attribute identifies all types assigned to filesystems
352 # (not limited to persistent filesystems).
353 # It is used in TE rules to permit certain domains to mount
354 # any filesystem and to permit most domains to obtain the
355 # overall filesystem statistics.
356 attribute fs_type;
357
358 # The mount_point attribute identifies all types that can serve
359 # as a mount point (for the mount binary). It is used in the mount
360 # policy to grant mounton permission, and in other domains to grant
361 # getattr permission over all the mount points.
362 attribute mount_point;
363
364 # The exec_type attribute identifies all types assigned
365 # to entrypoint executables for domains.  This attribute is
366 # used in TE rules and assertions that should be applied to all
367 # such executables.
368 attribute exec_type;
369
370 # The tmpfile attribute identifies all types assigned to temporary
371 # files.  This attribute is used in TE rules to grant certain
372 # domains the ability to remove all such files (e.g. init, crond).
373 attribute tmpfile;
374
375 # The user_tmpfile attribute identifies all types associated with temporary
376 # files for unpriv_userdomain domains.
377 attribute user_tmpfile;
378
379 # for the user_xserver_tmp_t etc
380 attribute xserver_tmpfile;
381
382 # The tmpfsfile attribute identifies all types defined for tmpfs
383 # type transitions.
384 # It is used in TE rules to grant certain domains the ability to
385 # access all such files.
386 attribute tmpfsfile;
387
388 # The home_type attribute identifies all types assigned to home
389 # directories.  This attribute is used in TE rules to grant certain
390 # domains the ability to access all home directory types.
391 attribute home_type;
392
393 # This attribute is for the main user home directory /home/user, to
394 # distinguish it from sub-dirs.  Often you want a process to be able to
395 # read the user home directory but not read the regular directories under it.
396 attribute home_dir_type;
397
398 # The ttyfile attribute identifies all types assigned to ttys.
399 # It is used in TE rules to grant certain domains the ability to
400 # access all ttys.
401 attribute ttyfile;
402
403 # The ptyfile attribute identifies all types assigned to ptys.
404 # It is used in TE rules to grant certain domains the ability to
405 # access all ptys.
406 attribute ptyfile;
407
408 # The pidfile attribute identifies all types assigned to pid files.
409 # It is used in TE rules to grant certain domains the ability to
410 # access all such files.
411 attribute pidfile;
412
413
414 ############################
415 # Attributes for network types:
416 #
417
418 # The socket_type attribute identifies all types assigned to
419 # kernel-created sockets.  Ordinary sockets are assigned the
420 # domain of the creating process.
421 # XXX This attribute is unused.  Remove?
422 attribute socket_type;
423
424 # Identifies all types assigned to port numbers to control binding.
425 attribute port_type;
426
427 # Identifies all types assigned to reserved port (<1024) numbers to control binding.
428 attribute reserved_port_type;
429
430 # Identifies all types assigned to network interfaces to control
431 # operations on the interface (XXX obsolete, not supported via LSM)
432 # and to control traffic sent or received on the interface.
433 attribute netif_type;
434
435 # Identifies all default types assigned to packets received
436 # on network interfaces. 
437 attribute netmsg_type;
438
439 # Identifies all types assigned to network nodes/hosts to control
440 # traffic sent to or received from the node.
441 attribute node_type;
442
443 # Identifier for log files or directories that only exist for log files.
444 attribute logfile;
445
446 # Identifier for lock files (/var/lock/*) or directories that only exist for
447 # lock files.
448 attribute lockfile;
449
450
451
452 ##############################
453 # Attributes for security policy types:
454 #
455
456 # The login_contexts attribute idenitifies the files used
457 # to define default contexts for login types (e.g., login, cron).
458 attribute login_contexts;
459
460 # Identifier for a domain used by "sendmail -t" (IE user_mail_t,
461 # sysadm_mail_t, etc)
462 attribute user_mail_domain;
463
464 # Identifies domains that can transition to system_mail_t
465 attribute privmail;
466
467 # Type for non-sysadm home directory
468 attribute user_home_type;
469
470 # For domains that are part of a mail server and need to read user files and
471 # fifos, and inherit file handles to enable user email to get to the mail
472 # spool
473 attribute mta_user_agent;
474
475 # For domains that are part of a mail server for delivering messages to the
476 # user
477 attribute mta_delivery_agent;
478
479 # For domains that make outbound TCP port 25 connections to send mail from the
480 # mail server.
481 attribute mail_server_sender;
482
483 # For a mail server process that takes TCP connections on port 25
484 attribute mail_server_domain;
485
486 # For web clients such as netscape and squid
487 attribute web_client_domain;
488
489 # For X Window System server domains
490 attribute xserver;
491
492 # For X Window System client domains
493 attribute xclient;
494
495 # For X Window System protocol extensions
496 attribute xextension;
497
498 # For X Window System property types
499 attribute xproperty;
500
501 #
502 # For file systems that do not have extended attributes but need to be
503 # r/w by users
504 #
505 attribute noexattrfile;
506
507 #
508 # For filetypes that the usercan read
509 #
510 attribute usercanread;
511
512 #
513 # For serial devices
514 #
515 attribute serial_device;
516
517 # Attribute to designate unrestricted access
518 attribute unrestricted;
519
520 # Attribute to designate can transition to unconfined_t
521 attribute unconfinedtrans;
522
523 # For clients of nscd.
524 attribute nscd_client_domain;
525
526 # For clients of nscd that can use shmem interface.
527 attribute nscd_shmem_domain;
528
529 # For labeling of content for httpd.  This attribute is only used by
530 # the httpd_unified domain, which says treat all httpdcontent the
531 # same.  If you want content to be served in a "non-unified" system
532 # you must specifically add "r_dir_file(httpd_t, your_content_t)" to
533 # your policy.
534 attribute httpdcontent;
535
536 # For labeling of domains whos transition can be disabled
537 attribute transitionbool;
538
539 # For labelling daemons that should not have a range transition to "s0"
540 # included in the daemon_base_domain macro
541 attribute no_daemon_range_trans;
542
543 # For labeling of file_context domains which users can change files to rather
544 # then the default file context.  These file_context can survive a relabeling
545 # of the file system.
546 attribute customizable;
547
548 ##############################
549 # Attributes for polyinstatiation support:
550 #
551
552 # For labeling types that are to be polyinstantiated
553 attribute polydir;
554
555 # And for labeling the parent directories of those polyinstantiated directories
556 # This is necessary for remounting the original in the parent to give
557 # security aware apps access
558 attribute polyparent;
559
560 # And labeling for the member directories
561 attribute polymember;
562
Note: See TracBrowser for help on using the browser.