Update oracle linux selinux to match docker upstream
| ... | ... |
@@ -1,8 +1,8 @@ |
| 1 | 1 |
GNU GENERAL PUBLIC LICENSE |
| 2 | 2 |
Version 2, June 1991 |
| 3 | 3 |
|
| 4 |
- Copyright (C) 1989, 1991 Free Software Foundation, Inc., |
|
| 5 |
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
| 4 |
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. |
|
| 5 |
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 6 | 6 |
Everyone is permitted to copy and distribute verbatim copies |
| 7 | 7 |
of this license document, but changing it is not allowed. |
| 8 | 8 |
|
| ... | ... |
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This |
| 15 | 15 |
General Public License applies to most of the Free Software |
| 16 | 16 |
Foundation's software and to any other program whose authors commit to |
| 17 | 17 |
using it. (Some other Free Software Foundation software is covered by |
| 18 |
-the GNU Lesser General Public License instead.) You can apply it to |
|
| 18 |
+the GNU Library General Public License instead.) You can apply it to |
|
| 19 | 19 |
your programs, too. |
| 20 | 20 |
|
| 21 | 21 |
When we speak of free software, we are referring to freedom, not |
| ... | ... |
@@ -55,7 +55,7 @@ patent must be licensed for everyone's free use or not licensed at all. |
| 55 | 55 |
|
| 56 | 56 |
The precise terms and conditions for copying, distribution and |
| 57 | 57 |
modification follow. |
| 58 |
- |
|
| 58 |
+ |
|
| 59 | 59 |
GNU GENERAL PUBLIC LICENSE |
| 60 | 60 |
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
| 61 | 61 |
|
| ... | ... |
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: |
| 110 | 110 |
License. (Exception: if the Program itself is interactive but |
| 111 | 111 |
does not normally print such an announcement, your work based on |
| 112 | 112 |
the Program is not required to print an announcement.) |
| 113 |
- |
|
| 113 |
+ |
|
| 114 | 114 |
These requirements apply to the modified work as a whole. If |
| 115 | 115 |
identifiable sections of that work are not derived from the Program, |
| 116 | 116 |
and can be reasonably considered independent and separate works in |
| ... | ... |
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent |
| 168 | 168 |
access to copy the source code from the same place counts as |
| 169 | 169 |
distribution of the source code, even though third parties are not |
| 170 | 170 |
compelled to copy the source along with the object code. |
| 171 |
- |
|
| 171 |
+ |
|
| 172 | 172 |
4. You may not copy, modify, sublicense, or distribute the Program |
| 173 | 173 |
except as expressly provided under this License. Any attempt |
| 174 | 174 |
otherwise to copy, modify, sublicense or distribute the Program is |
| ... | ... |
@@ -225,7 +225,7 @@ impose that choice. |
| 225 | 225 |
|
| 226 | 226 |
This section is intended to make thoroughly clear what is believed to |
| 227 | 227 |
be a consequence of the rest of this License. |
| 228 |
- |
|
| 228 |
+ |
|
| 229 | 229 |
8. If the distribution and/or use of the Program is restricted in |
| 230 | 230 |
certain countries either by patents or by copyrighted interfaces, the |
| 231 | 231 |
original copyright holder who places the Program under this License |
| ... | ... |
@@ -278,7 +278,7 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
| 278 | 278 |
POSSIBILITY OF SUCH DAMAGES. |
| 279 | 279 |
|
| 280 | 280 |
END OF TERMS AND CONDITIONS |
| 281 |
- |
|
| 281 |
+ |
|
| 282 | 282 |
How to Apply These Terms to Your New Programs |
| 283 | 283 |
|
| 284 | 284 |
If you develop a new program, and you want it to be of the greatest |
| ... | ... |
@@ -303,9 +303,10 @@ the "copyright" line and a pointer to where the full notice is found. |
| 303 | 303 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 304 | 304 |
GNU General Public License for more details. |
| 305 | 305 |
|
| 306 |
- You should have received a copy of the GNU General Public License along |
|
| 307 |
- with this program; if not, write to the Free Software Foundation, Inc., |
|
| 308 |
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|
| 306 |
+ You should have received a copy of the GNU General Public License |
|
| 307 |
+ along with this program; if not, write to the Free Software |
|
| 308 |
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 309 |
+ |
|
| 309 | 310 |
|
| 310 | 311 |
Also add information on how to contact you by electronic and paper mail. |
| 311 | 312 |
|
| ... | ... |
@@ -335,5 +336,5 @@ necessary. Here is a sample; alter the names: |
| 335 | 335 |
This General Public License does not permit incorporating your program into |
| 336 | 336 |
proprietary programs. If your program is a subroutine library, you may |
| 337 | 337 |
consider it more useful to permit linking proprietary applications with the |
| 338 |
-library. If this is what you want to do, use the GNU Lesser General |
|
| 338 |
+library. If this is what you want to do, use the GNU Library General |
|
| 339 | 339 |
Public License instead of this License. |
| ... | ... |
@@ -1,33 +1,18 @@ |
| 1 | 1 |
/root/\.docker gen_context(system_u:object_r:docker_home_t,s0) |
| 2 | 2 |
|
| 3 |
-/usr/bin/docker -- gen_context(system_u:object_r:docker_exec_t,s0) |
|
| 4 |
-/usr/bin/docker-novolume-plugin -- gen_context(system_u:object_r:docker_auth_exec_t,s0) |
|
| 5 |
-/usr/lib/docker/docker-novolume-plugin -- gen_context(system_u:object_r:docker_auth_exec_t,s0) |
|
| 3 |
+/usr/bin/dockerd -- gen_context(system_u:object_r:docker_exec_t,s0) |
|
| 6 | 4 |
|
| 7 | 5 |
/usr/lib/systemd/system/docker.service -- gen_context(system_u:object_r:docker_unit_file_t,s0) |
| 8 |
-/usr/lib/systemd/system/docker-novolume-plugin.service -- gen_context(system_u:object_r:docker_unit_file_t,s0) |
|
| 9 | 6 |
|
| 10 | 7 |
/etc/docker(/.*)? gen_context(system_u:object_r:docker_config_t,s0) |
| 11 | 8 |
|
| 12 | 9 |
/var/lib/docker(/.*)? gen_context(system_u:object_r:docker_var_lib_t,s0) |
| 13 |
-/var/lib/kublet(/.*)? gen_context(system_u:object_r:docker_var_lib_t,s0) |
|
| 14 |
-/var/lib/docker/vfs(/.*)? gen_context(system_u:object_r:svirt_sandbox_file_t,s0) |
|
| 15 | 10 |
|
| 16 |
-/var/run/docker(/.*)? gen_context(system_u:object_r:docker_var_run_t,s0) |
|
| 17 | 11 |
/var/run/docker\.pid -- gen_context(system_u:object_r:docker_var_run_t,s0) |
| 18 | 12 |
/var/run/docker\.sock -s gen_context(system_u:object_r:docker_var_run_t,s0) |
| 19 | 13 |
/var/run/docker-client(/.*)? gen_context(system_u:object_r:docker_var_run_t,s0) |
| 20 |
-/var/run/docker/plugins(/.*)? gen_context(system_u:object_r:docker_plugin_var_run_t,s0) |
|
| 21 |
- |
|
| 22 |
-/var/lock/lxc(/.*)? gen_context(system_u:object_r:docker_lock_t,s0) |
|
| 23 |
- |
|
| 24 |
-/var/log/lxc(/.*)? gen_context(system_u:object_r:docker_log_t,s0) |
|
| 25 | 14 |
|
| 26 | 15 |
/var/lib/docker/init(/.*)? gen_context(system_u:object_r:docker_share_t,s0) |
| 27 | 16 |
/var/lib/docker/containers/.*/hosts gen_context(system_u:object_r:docker_share_t,s0) |
| 28 | 17 |
/var/lib/docker/containers/.*/hostname gen_context(system_u:object_r:docker_share_t,s0) |
| 29 | 18 |
/var/lib/docker/.*/config\.env gen_context(system_u:object_r:docker_share_t,s0) |
| 30 |
- |
|
| 31 |
-# OL7.2 systemd selinux update |
|
| 32 |
-/var/run/systemd/machines(/.*)? gen_context(system_u:object_r:systemd_machined_var_run_t,s0) |
|
| 33 |
-/var/lib/machines(/.*)? gen_context(system_u:object_r:systemd_machined_var_lib_t,s0) |
| ... | ... |
@@ -112,28 +112,7 @@ interface(`docker_read_share_files',` |
| 112 | 112 |
') |
| 113 | 113 |
|
| 114 | 114 |
files_search_var_lib($1) |
| 115 |
- list_dirs_pattern($1, docker_share_t, docker_share_t) |
|
| 116 | 115 |
read_files_pattern($1, docker_share_t, docker_share_t) |
| 117 |
- read_lnk_files_pattern($1, docker_share_t, docker_share_t) |
|
| 118 |
-') |
|
| 119 |
- |
|
| 120 |
-###################################### |
|
| 121 |
-## <summary> |
|
| 122 |
-## Allow the specified domain to execute docker shared files |
|
| 123 |
-## in the caller domain. |
|
| 124 |
-## </summary> |
|
| 125 |
-## <param name="domain"> |
|
| 126 |
-## <summary> |
|
| 127 |
-## Domain allowed access. |
|
| 128 |
-## </summary> |
|
| 129 |
-## </param> |
|
| 130 |
-# |
|
| 131 |
-interface(`docker_exec_share_files',` |
|
| 132 |
- gen_require(` |
|
| 133 |
- type docker_share_t; |
|
| 134 |
- ') |
|
| 135 |
- |
|
| 136 |
- can_exec($1, docker_share_t) |
|
| 137 | 116 |
') |
| 138 | 117 |
|
| 139 | 118 |
######################################## |
| ... | ... |
@@ -305,7 +284,7 @@ interface(`docker_filetrans_named_content',` |
| 305 | 305 |
gen_require(` |
| 306 | 306 |
type docker_var_lib_t; |
| 307 | 307 |
type docker_share_t; |
| 308 |
- type docker_log_t; |
|
| 308 |
+ type docker_log_t; |
|
| 309 | 309 |
type docker_var_run_t; |
| 310 | 310 |
type docker_home_t; |
| 311 | 311 |
') |
| ... | ... |
@@ -313,7 +292,6 @@ interface(`docker_filetrans_named_content',` |
| 313 | 313 |
files_pid_filetrans($1, docker_var_run_t, file, "docker.pid") |
| 314 | 314 |
files_pid_filetrans($1, docker_var_run_t, sock_file, "docker.sock") |
| 315 | 315 |
files_pid_filetrans($1, docker_var_run_t, dir, "docker-client") |
| 316 |
- logging_log_filetrans($1, docker_log_t, dir, "lxc") |
|
| 317 | 316 |
files_var_lib_filetrans($1, docker_var_lib_t, dir, "docker") |
| 318 | 317 |
filetrans_pattern($1, docker_var_lib_t, docker_share_t, file, "config.env") |
| 319 | 318 |
filetrans_pattern($1, docker_var_lib_t, docker_share_t, file, "hosts") |
| ... | ... |
@@ -362,6 +340,7 @@ interface(`docker_spc_stream_connect',` |
| 362 | 362 |
allow $1 spc_t:unix_stream_socket connectto; |
| 363 | 363 |
') |
| 364 | 364 |
|
| 365 |
+ |
|
| 365 | 366 |
######################################## |
| 366 | 367 |
## <summary> |
| 367 | 368 |
## All of the rules required to administrate |
| ... | ... |
@@ -410,250 +389,73 @@ interface(`docker_admin',` |
| 410 | 410 |
') |
| 411 | 411 |
') |
| 412 | 412 |
|
| 413 |
-######################################## |
|
| 414 |
-## <summary> |
|
| 415 |
-## Execute docker_auth_exec_t in the docker_auth domain. |
|
| 416 |
-## </summary> |
|
| 417 |
-## <param name="domain"> |
|
| 418 |
-## <summary> |
|
| 419 |
-## Domain allowed to transition. |
|
| 420 |
-## </summary> |
|
| 421 |
-## </param> |
|
| 422 |
-# |
|
| 423 |
-interface(`docker_auth_domtrans',` |
|
| 424 |
- gen_require(` |
|
| 425 |
- type docker_auth_t, docker_auth_exec_t; |
|
| 426 |
- ') |
|
| 427 |
- |
|
| 428 |
- corecmd_search_bin($1) |
|
| 429 |
- domtrans_pattern($1, docker_auth_exec_t, docker_auth_t) |
|
| 413 |
+interface(`domain_stub_named_filetrans_domain',` |
|
| 414 |
+ gen_require(` |
|
| 415 |
+ attribute named_filetrans_domain; |
|
| 416 |
+ ') |
|
| 430 | 417 |
') |
| 431 | 418 |
|
| 432 |
-###################################### |
|
| 433 |
-## <summary> |
|
| 434 |
-## Execute docker_auth in the caller domain. |
|
| 435 |
-## </summary> |
|
| 436 |
-## <param name="domain"> |
|
| 437 |
-## <summary> |
|
| 438 |
-## Domain allowed access. |
|
| 439 |
-## </summary> |
|
| 440 |
-## </param> |
|
| 441 |
-# |
|
| 442 |
-interface(`docker_auth_exec',` |
|
| 419 |
+interface(`lvm_stub',` |
|
| 420 |
+ gen_require(` |
|
| 421 |
+ type lvm_t; |
|
| 422 |
+ ') |
|
| 423 |
+') |
|
| 424 |
+interface(`staff_stub',` |
|
| 425 |
+ gen_require(` |
|
| 426 |
+ type staff_t; |
|
| 427 |
+ ') |
|
| 428 |
+') |
|
| 429 |
+interface(`virt_stub_svirt_sandbox_domain',` |
|
| 443 | 430 |
gen_require(` |
| 444 |
- type docker_auth_exec_t; |
|
| 431 |
+ attribute svirt_sandbox_domain; |
|
| 445 | 432 |
') |
| 446 |
- |
|
| 447 |
- corecmd_search_bin($1) |
|
| 448 |
- can_exec($1, docker_auth_exec_t) |
|
| 449 | 433 |
') |
| 450 |
- |
|
| 451 |
-######################################## |
|
| 452 |
-## <summary> |
|
| 453 |
-## Connect to docker_auth over a unix stream socket. |
|
| 454 |
-## </summary> |
|
| 455 |
-## <param name="domain"> |
|
| 456 |
-## <summary> |
|
| 457 |
-## Domain allowed access. |
|
| 458 |
-## </summary> |
|
| 459 |
-## </param> |
|
| 460 |
-# |
|
| 461 |
-interface(`docker_auth_stream_connect',` |
|
| 434 |
+interface(`virt_stub_svirt_sandbox_file',` |
|
| 462 | 435 |
gen_require(` |
| 463 |
- type docker_auth_t, docker_plugin_var_run_t; |
|
| 436 |
+ type svirt_sandbox_file_t; |
|
| 464 | 437 |
') |
| 465 |
- |
|
| 466 |
- files_search_pids($1) |
|
| 467 |
- stream_connect_pattern($1, docker_plugin_var_run_t, docker_plugin_var_run_t, docker_auth_t) |
|
| 468 | 438 |
') |
| 469 |
- |
|
| 470 |
-######################################## |
|
| 471 |
-## <summary> |
|
| 472 |
-## docker domain typebounds calling domain. |
|
| 473 |
-## </summary> |
|
| 474 |
-## <param name="domain"> |
|
| 475 |
-## <summary> |
|
| 476 |
-## Domain to be typebound. |
|
| 477 |
-## </summary> |
|
| 478 |
-## </param> |
|
| 479 |
-# |
|
| 480 |
-interface(`docker_typebounds',` |
|
| 439 |
+interface(`fs_dontaudit_remount_tmpfs',` |
|
| 481 | 440 |
gen_require(` |
| 482 |
- type docker_t; |
|
| 441 |
+ type tmpfs_t; |
|
| 483 | 442 |
') |
| 484 | 443 |
|
| 485 |
- typebounds docker_t $1; |
|
| 444 |
+ dontaudit $1 tmpfs_t:filesystem remount; |
|
| 486 | 445 |
') |
| 487 |
- |
|
| 488 |
-######################################## |
|
| 489 |
-## <summary> |
|
| 490 |
-## Allow any docker_exec_t to be an entrypoint of this domain |
|
| 491 |
-## </summary> |
|
| 492 |
-## <param name="domain"> |
|
| 493 |
-## <summary> |
|
| 494 |
-## Domain allowed access. |
|
| 495 |
-## </summary> |
|
| 496 |
-## </param> |
|
| 497 |
-## <rolecap/> |
|
| 498 |
-# |
|
| 499 |
-interface(`docker_entrypoint',` |
|
| 446 |
+interface(`dev_dontaudit_list_all_dev_nodes',` |
|
| 500 | 447 |
gen_require(` |
| 501 |
- type docker_exec_t; |
|
| 448 |
+ type device_t; |
|
| 502 | 449 |
') |
| 503 |
- allow $1 docker_exec_t:file entrypoint; |
|
| 504 |
-') |
|
| 505 |
- |
|
| 506 |
-######################################## |
|
| 507 |
-## <summary> |
|
| 508 |
-## Send and receive messages from |
|
| 509 |
-## systemd machined over dbus. |
|
| 510 |
-## </summary> |
|
| 511 |
-## <param name="domain"> |
|
| 512 |
-## <summary> |
|
| 513 |
-## Domain allowed access. |
|
| 514 |
-## </summary> |
|
| 515 |
-## </param> |
|
| 516 |
-# |
|
| 517 |
-interface(`systemd_dbus_chat_machined',` |
|
| 518 |
- gen_require(` |
|
| 519 |
- type systemd_machined_t; |
|
| 520 |
- class dbus send_msg; |
|
| 521 |
- ') |
|
| 522 |
- |
|
| 523 |
- allow $1 systemd_machined_t:dbus send_msg; |
|
| 524 |
- allow systemd_machined_t $1:dbus send_msg; |
|
| 525 |
- ps_process_pattern(systemd_machined_t, $1) |
|
| 526 |
-') |
|
| 527 |
- |
|
| 528 |
-######################################## |
|
| 529 |
-## <summary> |
|
| 530 |
-## Allow any svirt_sandbox_file_t to be an entrypoint of this domain |
|
| 531 |
-## </summary> |
|
| 532 |
-## <param name="domain"> |
|
| 533 |
-## <summary> |
|
| 534 |
-## Domain allowed access. |
|
| 535 |
-## </summary> |
|
| 536 |
-## </param> |
|
| 537 |
-## <rolecap/> |
|
| 538 |
-# |
|
| 539 |
-interface(`virt_sandbox_entrypoint',` |
|
| 540 |
- gen_require(` |
|
| 541 |
- type svirt_sandbox_file_t; |
|
| 542 |
- ') |
|
| 543 |
- allow $1 svirt_sandbox_file_t:file entrypoint; |
|
| 544 |
-') |
|
| 545 |
- |
|
| 546 |
-######################################## |
|
| 547 |
-## <summary> |
|
| 548 |
-## Send and receive messages from |
|
| 549 |
-## virt over dbus. |
|
| 550 |
-## </summary> |
|
| 551 |
-## <param name="domain"> |
|
| 552 |
-## <summary> |
|
| 553 |
-## Domain allowed access. |
|
| 554 |
-## </summary> |
|
| 555 |
-## </param> |
|
| 556 |
-# |
|
| 557 |
-interface(`virt_dbus_chat',` |
|
| 558 |
- gen_require(` |
|
| 559 |
- type virtd_t; |
|
| 560 |
- class dbus send_msg; |
|
| 561 |
- ') |
|
| 562 |
- |
|
| 563 |
- allow $1 virtd_t:dbus send_msg; |
|
| 564 |
- allow virtd_t $1:dbus send_msg; |
|
| 565 |
- ps_process_pattern(virtd_t, $1) |
|
| 566 |
-') |
|
| 567 |
- |
|
| 568 |
-####################################### |
|
| 569 |
-## <summary> |
|
| 570 |
-## Read the process state of virt sandbox containers |
|
| 571 |
-## </summary> |
|
| 572 |
-## <param name="domain"> |
|
| 573 |
-## <summary> |
|
| 574 |
-## Domain allowed access. |
|
| 575 |
-## </summary> |
|
| 576 |
-## </param> |
|
| 577 |
-# |
|
| 578 |
-interface(`virt_sandbox_read_state',` |
|
| 579 |
- gen_require(` |
|
| 580 |
- attribute svirt_sandbox_domain; |
|
| 581 |
- ') |
|
| 582 | 450 |
|
| 583 |
- ps_process_pattern($1, svirt_sandbox_domain) |
|
| 451 |
+ dontaudit $1 device_t:dir list_dir_perms; |
|
| 584 | 452 |
') |
| 453 |
+interface(`kernel_unlabeled_entry_type',` |
|
| 454 |
+ gen_require(` |
|
| 455 |
+ type unlabeled_t; |
|
| 456 |
+ ') |
|
| 585 | 457 |
|
| 586 |
-###################################### |
|
| 587 |
-## <summary> |
|
| 588 |
-## Send a signal to sandbox domains |
|
| 589 |
-## </summary> |
|
| 590 |
-## <param name="domain"> |
|
| 591 |
-## <summary> |
|
| 592 |
-## Domain allowed access. |
|
| 593 |
-## </summary> |
|
| 594 |
-## </param> |
|
| 595 |
-# |
|
| 596 |
-interface(`virt_signal_sandbox',` |
|
| 597 |
- gen_require(` |
|
| 598 |
- attribute svirt_sandbox_domain; |
|
| 599 |
- ') |
|
| 600 |
- |
|
| 601 |
- allow $1 svirt_sandbox_domain:process signal; |
|
| 458 |
+ domain_entry_file($1, unlabeled_t) |
|
| 602 | 459 |
') |
| 460 |
+interface(`kernel_unlabeled_domtrans',` |
|
| 461 |
+ gen_require(` |
|
| 462 |
+ type unlabeled_t; |
|
| 463 |
+ ') |
|
| 603 | 464 |
|
| 604 |
-####################################### |
|
| 605 |
-## <summary> |
|
| 606 |
-## Getattr Sandbox File systems |
|
| 607 |
-## </summary> |
|
| 608 |
-## <param name="domain"> |
|
| 609 |
-## <summary> |
|
| 610 |
-## Domain allowed access. |
|
| 611 |
-## </summary> |
|
| 612 |
-## </param> |
|
| 613 |
-# |
|
| 614 |
-interface(`virt_getattr_sandbox_filesystem',` |
|
| 615 |
- gen_require(` |
|
| 616 |
- type svirt_sandbox_file_t; |
|
| 617 |
- ') |
|
| 618 |
- |
|
| 619 |
- allow $1 svirt_sandbox_file_t:filesystem getattr; |
|
| 465 |
+ read_lnk_files_pattern($1, unlabeled_t, unlabeled_t) |
|
| 466 |
+ domain_transition_pattern($1, unlabeled_t, $2) |
|
| 467 |
+ type_transition $1 unlabeled_t:process $2; |
|
| 620 | 468 |
') |
| 469 |
+interface(`files_write_all_pid_sockets',` |
|
| 470 |
+ gen_require(` |
|
| 471 |
+ attribute pidfile; |
|
| 472 |
+ ') |
|
| 621 | 473 |
|
| 622 |
-####################################### |
|
| 623 |
-## <summary> |
|
| 624 |
-## Read Sandbox Files |
|
| 625 |
-## </summary> |
|
| 626 |
-## <param name="domain"> |
|
| 627 |
-## <summary> |
|
| 628 |
-## Domain allowed access. |
|
| 629 |
-## </summary> |
|
| 630 |
-## </param> |
|
| 631 |
-# |
|
| 632 |
-interface(`virt_read_sandbox_files',` |
|
| 633 |
- gen_require(` |
|
| 634 |
- type svirt_sandbox_file_t; |
|
| 635 |
- ') |
|
| 636 |
- |
|
| 637 |
- list_dirs_pattern($1, svirt_sandbox_file_t, svirt_sandbox_file_t) |
|
| 638 |
- read_files_pattern($1, svirt_sandbox_file_t, svirt_sandbox_file_t) |
|
| 639 |
- read_lnk_files_pattern($1, svirt_sandbox_file_t, svirt_sandbox_file_t) |
|
| 474 |
+ allow $1 pidfile:sock_file write_sock_file_perms; |
|
| 640 | 475 |
') |
| 476 |
+interface(`dev_dontaudit_mounton_sysfs',` |
|
| 477 |
+ gen_require(` |
|
| 478 |
+ type sysfs_t; |
|
| 479 |
+ ') |
|
| 641 | 480 |
|
| 642 |
-####################################### |
|
| 643 |
-## <summary> |
|
| 644 |
-## Read the process state of spc containers |
|
| 645 |
-## </summary> |
|
| 646 |
-## <param name="domain"> |
|
| 647 |
-## <summary> |
|
| 648 |
-## Domain allowed access. |
|
| 649 |
-## </summary> |
|
| 650 |
-## </param> |
|
| 651 |
-# |
|
| 652 |
-interface(`docker_spc_read_state',` |
|
| 653 |
- gen_require(` |
|
| 654 |
- type spc_t; |
|
| 655 |
- ') |
|
| 656 |
- |
|
| 657 |
- ps_process_pattern($1, spc_t) |
|
| 481 |
+ dontaudit $1 sysfs_t:dir mounton; |
|
| 658 | 482 |
') |
| 659 |
- |
| ... | ... |
@@ -23,10 +23,6 @@ type spc_t; |
| 23 | 23 |
domain_type(spc_t) |
| 24 | 24 |
role system_r types spc_t; |
| 25 | 25 |
|
| 26 |
-type docker_auth_t; |
|
| 27 |
-type docker_auth_exec_t; |
|
| 28 |
-init_daemon_domain(docker_auth_t, docker_auth_exec_t) |
|
| 29 |
- |
|
| 30 | 26 |
type spc_var_run_t; |
| 31 | 27 |
files_pid_file(spc_var_run_t) |
| 32 | 28 |
|
| ... | ... |
@@ -54,9 +50,6 @@ files_tmpfs_file(docker_tmpfs_t) |
| 54 | 54 |
type docker_var_run_t; |
| 55 | 55 |
files_pid_file(docker_var_run_t) |
| 56 | 56 |
|
| 57 |
-type docker_plugin_var_run_t; |
|
| 58 |
-files_pid_file(docker_plugin_var_run_t) |
|
| 59 |
- |
|
| 60 | 57 |
type docker_unit_file_t; |
| 61 | 58 |
systemd_unit_file(docker_unit_file_t) |
| 62 | 59 |
|
| ... | ... |
@@ -66,20 +59,6 @@ term_pty(docker_devpts_t) |
| 66 | 66 |
type docker_share_t; |
| 67 | 67 |
files_type(docker_share_t) |
| 68 | 68 |
|
| 69 |
-# OL7 systemd selinux update |
|
| 70 |
-type systemd_machined_t; |
|
| 71 |
-type systemd_machined_exec_t; |
|
| 72 |
-init_daemon_domain(systemd_machined_t, systemd_machined_exec_t) |
|
| 73 |
- |
|
| 74 |
-# /run/systemd/machines |
|
| 75 |
-type systemd_machined_var_run_t; |
|
| 76 |
-files_pid_file(systemd_machined_var_run_t) |
|
| 77 |
- |
|
| 78 |
-# /var/lib/machines |
|
| 79 |
-type systemd_machined_var_lib_t; |
|
| 80 |
-files_type(systemd_machined_var_lib_t) |
|
| 81 |
- |
|
| 82 |
- |
|
| 83 | 69 |
######################################## |
| 84 | 70 |
# |
| 85 | 71 |
# docker local policy |
| ... | ... |
@@ -93,8 +72,6 @@ allow docker_t self:tcp_socket create_stream_socket_perms; |
| 93 | 93 |
allow docker_t self:udp_socket create_socket_perms; |
| 94 | 94 |
allow docker_t self:capability2 block_suspend; |
| 95 | 95 |
|
| 96 |
-docker_auth_stream_connect(docker_t) |
|
| 97 |
- |
|
| 98 | 96 |
manage_files_pattern(docker_t, docker_home_t, docker_home_t) |
| 99 | 97 |
manage_dirs_pattern(docker_t, docker_home_t, docker_home_t) |
| 100 | 98 |
manage_lnk_files_pattern(docker_t, docker_home_t, docker_home_t) |
| ... | ... |
@@ -106,7 +83,6 @@ files_etc_filetrans(docker_t, docker_config_t, dir, "docker") |
| 106 | 106 |
|
| 107 | 107 |
manage_dirs_pattern(docker_t, docker_lock_t, docker_lock_t) |
| 108 | 108 |
manage_files_pattern(docker_t, docker_lock_t, docker_lock_t) |
| 109 |
-files_lock_filetrans(docker_t, docker_lock_t, { dir file }, "lxc")
|
|
| 110 | 109 |
|
| 111 | 110 |
manage_dirs_pattern(docker_t, docker_log_t, docker_log_t) |
| 112 | 111 |
manage_files_pattern(docker_t, docker_log_t, docker_log_t) |
| ... | ... |
@@ -229,10 +205,6 @@ optional_policy(` |
| 229 | 229 |
openvswitch_stream_connect(docker_t) |
| 230 | 230 |
') |
| 231 | 231 |
|
| 232 |
-# |
|
| 233 |
-# lxc rules |
|
| 234 |
-# |
|
| 235 |
- |
|
| 236 | 232 |
allow docker_t self:capability { dac_override setgid setpcap setuid sys_admin sys_boot sys_chroot sys_ptrace };
|
| 237 | 233 |
|
| 238 | 234 |
allow docker_t self:process { getcap setcap setexec setpgid setsched signal_perms };
|
| ... | ... |
@@ -314,7 +286,6 @@ optional_policy(` |
| 314 | 314 |
|
| 315 | 315 |
optional_policy(` |
| 316 | 316 |
systemd_dbus_chat_logind(docker_t) |
| 317 |
- systemd_dbus_chat_machined(docker_t) |
|
| 318 | 317 |
') |
| 319 | 318 |
|
| 320 | 319 |
optional_policy(` |
| ... | ... |
@@ -327,11 +298,6 @@ optional_policy(` |
| 327 | 327 |
') |
| 328 | 328 |
|
| 329 | 329 |
optional_policy(` |
| 330 |
- unconfined_domain(docker_t) |
|
| 331 |
- # unconfined_typebounds(docker_t) |
|
| 332 |
-') |
|
| 333 |
- |
|
| 334 |
-optional_policy(` |
|
| 335 | 330 |
virt_read_config(docker_t) |
| 336 | 331 |
virt_exec(docker_t) |
| 337 | 332 |
virt_stream_connect(docker_t) |
| ... | ... |
@@ -339,12 +305,10 @@ optional_policy(` |
| 339 | 339 |
virt_exec_sandbox_files(docker_t) |
| 340 | 340 |
virt_manage_sandbox_files(docker_t) |
| 341 | 341 |
virt_relabel_sandbox_filesystem(docker_t) |
| 342 |
- # for lxc |
|
| 343 | 342 |
virt_transition_svirt_sandbox(docker_t, system_r) |
| 344 | 343 |
virt_mounton_sandbox_file(docker_t) |
| 345 | 344 |
# virt_attach_sandbox_tun_iface(docker_t) |
| 346 | 345 |
allow docker_t svirt_sandbox_domain:tun_socket relabelfrom; |
| 347 |
- virt_sandbox_entrypoint(docker_t) |
|
| 348 | 346 |
') |
| 349 | 347 |
|
| 350 | 348 |
tunable_policy(`docker_connect_any',` |
| ... | ... |
@@ -357,109 +321,87 @@ tunable_policy(`docker_connect_any',` |
| 357 | 357 |
# |
| 358 | 358 |
# spc local policy |
| 359 | 359 |
# |
| 360 |
-allow spc_t { docker_var_lib_t docker_share_t }:file entrypoint;
|
|
| 360 |
+domain_entry_file(spc_t, docker_share_t) |
|
| 361 |
+domain_entry_file(spc_t, docker_var_lib_t) |
|
| 361 | 362 |
role system_r types spc_t; |
| 362 | 363 |
|
| 364 |
+domain_entry_file(spc_t, docker_share_t) |
|
| 365 |
+domain_entry_file(spc_t, docker_var_lib_t) |
|
| 363 | 366 |
domtrans_pattern(docker_t, docker_share_t, spc_t) |
| 364 | 367 |
domtrans_pattern(docker_t, docker_var_lib_t, spc_t) |
| 365 | 368 |
allow docker_t spc_t:process { setsched signal_perms };
|
| 366 | 369 |
ps_process_pattern(docker_t, spc_t) |
| 367 | 370 |
allow docker_t spc_t:socket_class_set { relabelto relabelfrom };
|
| 368 |
-filetrans_pattern(docker_t, docker_var_lib_t, docker_share_t, dir, "overlay") |
|
| 369 | 371 |
|
| 370 | 372 |
optional_policy(` |
| 371 |
- systemd_dbus_chat_machined(spc_t) |
|
| 373 |
+ dbus_chat_system_bus(spc_t) |
|
| 372 | 374 |
') |
| 373 | 375 |
|
| 374 | 376 |
optional_policy(` |
| 375 |
- dbus_chat_system_bus(spc_t) |
|
| 377 |
+ unconfined_domain_noaudit(spc_t) |
|
| 376 | 378 |
') |
| 377 | 379 |
|
| 378 | 380 |
optional_policy(` |
| 379 |
- unconfined_domain_noaudit(spc_t) |
|
| 381 |
+ unconfined_domain(docker_t) |
|
| 380 | 382 |
') |
| 381 | 383 |
|
| 382 | 384 |
optional_policy(` |
| 383 | 385 |
virt_transition_svirt_sandbox(spc_t, system_r) |
| 384 |
- virt_sandbox_entrypoint(spc_t) |
|
| 385 | 386 |
') |
| 386 | 387 |
|
| 387 | 388 |
######################################## |
| 388 | 389 |
# |
| 389 |
-# docker_auth local policy |
|
| 390 |
+# docker upstream policy |
|
| 390 | 391 |
# |
| 391 |
-allow docker_auth_t self:fifo_file rw_fifo_file_perms; |
|
| 392 |
-allow docker_auth_t self:unix_stream_socket create_stream_socket_perms; |
|
| 393 |
-dontaudit docker_auth_t self:capability net_admin; |
|
| 394 |
- |
|
| 395 |
-docker_stream_connect(docker_auth_t) |
|
| 396 |
- |
|
| 397 |
-manage_dirs_pattern(docker_auth_t, docker_plugin_var_run_t, docker_plugin_var_run_t) |
|
| 398 |
-manage_files_pattern(docker_auth_t, docker_plugin_var_run_t, docker_plugin_var_run_t) |
|
| 399 |
-manage_sock_files_pattern(docker_auth_t, docker_plugin_var_run_t, docker_plugin_var_run_t) |
|
| 400 |
-manage_lnk_files_pattern(docker_auth_t, docker_plugin_var_run_t, docker_plugin_var_run_t) |
|
| 401 |
-files_pid_filetrans(docker_auth_t, docker_plugin_var_run_t, { dir file lnk_file sock_file })
|
|
| 402 | 392 |
|
| 403 |
-domain_use_interactive_fds(docker_auth_t) |
|
| 404 |
- |
|
| 405 |
-kernel_read_net_sysctls(docker_auth_t) |
|
| 406 |
- |
|
| 407 |
-auth_use_nsswitch(docker_auth_t) |
|
| 408 |
- |
|
| 409 |
-files_read_etc_files(docker_auth_t) |
|
| 410 |
- |
|
| 411 |
-miscfiles_read_localization(docker_auth_t) |
|
| 412 |
- |
|
| 413 |
-sysnet_dns_name_resolve(docker_auth_t) |
|
| 414 |
- |
|
| 415 |
-######################################## |
|
| 416 |
-# |
|
| 417 |
-# OL7.2 systemd selinux update |
|
| 418 |
-# systemd_machined local policy |
|
| 419 |
-# |
|
| 420 |
-allow systemd_machined_t self:capability { dac_override setgid sys_admin sys_chroot sys_ptrace };
|
|
| 421 |
-allow systemd_machined_t systemd_unit_file_t:service { status start };
|
|
| 422 |
-allow systemd_machined_t self:unix_dgram_socket create_socket_perms; |
|
| 423 |
- |
|
| 424 |
-manage_dirs_pattern(systemd_machined_t, systemd_machined_var_run_t, systemd_machined_var_run_t) |
|
| 425 |
-manage_files_pattern(systemd_machined_t, systemd_machined_var_run_t, systemd_machined_var_run_t) |
|
| 426 |
-manage_lnk_files_pattern(systemd_machined_t, systemd_machined_var_run_t, systemd_machined_var_run_t) |
|
| 427 |
-init_pid_filetrans(systemd_machined_t, systemd_machined_var_run_t, dir, "machines") |
|
| 428 |
- |
|
| 429 |
-manage_dirs_pattern(systemd_machined_t, systemd_machined_var_lib_t, systemd_machined_var_lib_t) |
|
| 430 |
-manage_files_pattern(systemd_machined_t, systemd_machined_var_lib_t, systemd_machined_var_lib_t) |
|
| 431 |
-manage_lnk_files_pattern(systemd_machined_t, systemd_machined_var_lib_t, systemd_machined_var_lib_t) |
|
| 432 |
-init_var_lib_filetrans(systemd_machined_t, systemd_machined_var_lib_t, dir, "machines") |
|
| 433 |
- |
|
| 434 |
-kernel_dgram_send(systemd_machined_t) |
|
| 435 |
-# This is a bug, but need for now. |
|
| 436 |
-kernel_read_unlabeled_state(systemd_machined_t) |
|
| 437 |
- |
|
| 438 |
-init_dbus_chat(systemd_machined_t) |
|
| 439 |
-init_status(systemd_machined_t) |
|
| 440 |
- |
|
| 441 |
-userdom_dbus_send_all_users(systemd_machined_t) |
|
| 393 |
+optional_policy(` |
|
| 394 |
+# domain_stub_named_filetrans_domain() |
|
| 395 |
+ gen_require(` |
|
| 396 |
+ attribute named_filetrans_domain; |
|
| 397 |
+ ') |
|
| 442 | 398 |
|
| 443 |
-term_use_ptmx(systemd_machined_t) |
|
| 399 |
+ docker_filetrans_named_content(named_filetrans_domain) |
|
| 400 |
+') |
|
| 444 | 401 |
|
| 445 | 402 |
optional_policy(` |
| 446 |
- dbus_connect_system_bus(systemd_machined_t) |
|
| 447 |
- dbus_system_bus_client(systemd_machined_t) |
|
| 403 |
+ lvm_stub() |
|
| 404 |
+ docker_rw_sem(lvm_t) |
|
| 448 | 405 |
') |
| 449 | 406 |
|
| 450 | 407 |
optional_policy(` |
| 451 |
- docker_read_share_files(systemd_machined_t) |
|
| 452 |
- docker_spc_read_state(systemd_machined_t) |
|
| 408 |
+ staff_stub() |
|
| 409 |
+ docker_stream_connect(staff_t) |
|
| 410 |
+ docker_exec(staff_t) |
|
| 453 | 411 |
') |
| 454 | 412 |
|
| 455 | 413 |
optional_policy(` |
| 456 |
- virt_dbus_chat(systemd_machined_t) |
|
| 457 |
- virt_sandbox_read_state(systemd_machined_t) |
|
| 458 |
- virt_signal_sandbox(systemd_machined_t) |
|
| 459 |
- virt_stream_connect_sandbox(systemd_machined_t) |
|
| 460 |
- virt_rw_svirt_dev(systemd_machined_t) |
|
| 461 |
- virt_getattr_sandbox_filesystem(systemd_machined_t) |
|
| 462 |
- virt_read_sandbox_files(systemd_machined_t) |
|
| 414 |
+ virt_stub_svirt_sandbox_domain() |
|
| 415 |
+ virt_stub_svirt_sandbox_file() |
|
| 416 |
+ allow svirt_sandbox_domain self:netlink_kobject_uevent_socket create_socket_perms; |
|
| 417 |
+ docker_read_share_files(svirt_sandbox_domain) |
|
| 418 |
+ docker_lib_filetrans(svirt_sandbox_domain,svirt_sandbox_file_t, sock_file) |
|
| 419 |
+ docker_use_ptys(svirt_sandbox_domain) |
|
| 420 |
+ docker_spc_stream_connect(svirt_sandbox_domain) |
|
| 421 |
+ fs_list_tmpfs(svirt_sandbox_domain) |
|
| 422 |
+ fs_rw_hugetlbfs_files(svirt_sandbox_domain) |
|
| 423 |
+ fs_dontaudit_remount_tmpfs(svirt_sandbox_domain) |
|
| 424 |
+ dev_dontaudit_mounton_sysfs(svirt_sandbox_domain) |
|
| 425 |
+ |
|
| 426 |
+ tunable_policy(`virt_sandbox_use_fusefs',` |
|
| 427 |
+ fs_manage_fusefs_dirs(svirt_sandbox_domain) |
|
| 428 |
+ fs_manage_fusefs_files(svirt_sandbox_domain) |
|
| 429 |
+ fs_manage_fusefs_symlinks(svirt_sandbox_domain) |
|
| 430 |
+ ') |
|
| 431 |
+ gen_require(` |
|
| 432 |
+ attribute domain; |
|
| 433 |
+ ') |
|
| 434 |
+ |
|
| 435 |
+ dontaudit svirt_sandbox_domain domain:key {search link};
|
|
| 463 | 436 |
') |
| 464 | 437 |
|
| 465 |
- |
|
| 438 |
+optional_policy(` |
|
| 439 |
+ gen_require(` |
|
| 440 |
+ type pcp_pmcd_t; |
|
| 441 |
+ ') |
|
| 442 |
+ docker_manage_lib_files(pcp_pmcd_t) |
|
| 443 |
+') |
| ... | ... |
@@ -14,6 +14,9 @@ Vendor: Docker |
| 14 | 14 |
Packager: Docker <support@docker.com> |
| 15 | 15 |
|
| 16 | 16 |
%global selinux_policyver 3.13.1-102 |
| 17 |
+%if 0%{?oraclelinux} >= 7
|
|
| 18 |
+%global selinux_policyver 3.13.1-102.0.3.el7_3.15 |
|
| 19 |
+%endif # oraclelinux 7 |
|
| 17 | 20 |
%global selinuxtype targeted |
| 18 | 21 |
%global moduletype services |
| 19 | 22 |
%global modulenames docker |
| ... | ... |
@@ -84,9 +84,12 @@ Requires: device-mapper >= 1.02.90-2 |
| 84 | 84 |
%if 0%{?fedora} >= 22
|
| 85 | 85 |
%global selinux_policyver 3.13.1-128 |
| 86 | 86 |
%endif # fedora 22 |
| 87 |
-%if 0%{?centos} >= 7 || 0%{?rhel} >= 7 || 0%{?oraclelinux} >= 7
|
|
| 87 |
+%if 0%{?centos} >= 7 || 0%{?rhel} >= 7
|
|
| 88 | 88 |
%global selinux_policyver 3.13.1-23 |
| 89 |
-%endif # centos,oraclelinux 7 |
|
| 89 |
+%endif # centos,rhel 7 |
|
| 90 |
+%if 0%{?oraclelinux} >= 7
|
|
| 91 |
+%global selinux_policyver 3.13.1-102.0.3.el7_3.15 |
|
| 92 |
+%endif # oraclelinux 7 |
|
| 90 | 93 |
%endif # with_selinux |
| 91 | 94 |
|
| 92 | 95 |
# RE: rhbz#1195804 - ensure min NVR for selinux-policy |