/
centos-7.0-vs-7.1.diff
17704 lines (16620 loc) · 479 KB
/
centos-7.0-vs-7.1.diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/admin/bootloader.if centos-7.1.1503/usr/share/selinux/devel/include/admin/bootloader.if
--- centos-7.0.1406/usr/share/selinux/devel/include/admin/bootloader.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/admin/bootloader.if 2015-03-06 06:53:47.000000000 +0100
@@ -57,20 +57,12 @@
interface(`bootloader_run',`
gen_require(`
type bootloader_t;
- #attribute_role bootloader_roles;
+ attribute_role bootloader_roles;
')
- #bootloader_domtrans($1)
- #roleattribute $2 bootloader_roles;
-
bootloader_domtrans($1)
+ roleattribute $2 bootloader_roles;
- role $2 types bootloader_t;
-
- ifdef(`distro_redhat',`
- # for mke2fs
- mount_run(bootloader_t, $2)
- ')
')
########################################
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/admin/su.if centos-7.1.1503/usr/share/selinux/devel/include/admin/su.if
--- centos-7.0.1406/usr/share/selinux/devel/include/admin/su.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/admin/su.if 2015-03-06 06:53:47.000000000 +0100
@@ -58,6 +58,7 @@
allow $2 $1_su_t:fifo_file rw_file_perms;
allow $2 $1_su_t:process sigchld;
+ kernel_getattr_core_if($1_su_t)
kernel_read_system_state($1_su_t)
kernel_read_kernel_sysctls($1_su_t)
kernel_search_key($1_su_t)
@@ -86,6 +87,7 @@
# Write to utmp.
init_rw_utmp($1_su_t)
init_search_script_keys($1_su_t)
+ init_getattr_initctl($1_su_t)
logging_send_syslog_msg($1_su_t)
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/admin/usermanage.if centos-7.1.1503/usr/share/selinux/devel/include/admin/usermanage.if
--- centos-7.0.1406/usr/share/selinux/devel/include/admin/usermanage.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/admin/usermanage.if 2015-03-06 06:53:47.000000000 +0100
@@ -37,16 +37,12 @@
#
interface(`usermanage_run_chfn',`
gen_require(`
- #attribute_role chfn_roles;
+ attribute_role chfn_roles;
type chfn_t;
')
- #usermanage_domtrans_chfn($1)
- #roleattribute $2 chfn_roles;
-
usermanage_domtrans_chfn($1)
- role $2 types chfn_t;
-
+ roleattribute $2 chfn_roles;
')
########################################
@@ -107,18 +103,11 @@
interface(`usermanage_run_groupadd',`
gen_require(`
type groupadd_t;
- #attribute_role groupadd_roles;
+ attribute_role groupadd_roles;
')
- #usermanage_domtrans_groupadd($1)
- #roleattribute $2 groupadd_roles;
usermanage_domtrans_groupadd($1)
- role $2 types groupadd_t;
-
- optional_policy(`
- nscd_run(groupadd_t, $2)
- ')
-
+ roleattribute $2 groupadd_roles;
')
########################################
@@ -195,15 +184,11 @@
interface(`usermanage_run_passwd',`
gen_require(`
type passwd_t;
- #attribute_role passwd_roles;
+ attribute_role passwd_roles;
')
- #usermanage_domtrans_passwd($1)
- #roleattribute $2 passwd_roles;
-
usermanage_domtrans_passwd($1)
- role $2 types passwd_t;
- auth_run_chk_passwd(passwd_t, $2)
+ roleattribute $2 passwd_roles;
')
########################################
@@ -266,19 +251,11 @@
interface(`usermanage_run_admin_passwd',`
gen_require(`
type sysadm_passwd_t;
- #attribute_role sysadm_passwd_roles;
+ attribute_role sysadm_passwd_roles;
')
- #usermanage_domtrans_admin_passwd($1)
- #roleattribute $2 sysadm_passwd_roles;
-
usermanage_domtrans_admin_passwd($1)
- role $2 types sysadm_passwd_t;
-
- optional_policy(`
- nscd_run(sysadm_passwd_t, $2)
- ')
-
+ roleattribute $2 sysadm_passwd_roles;
')
########################################
@@ -355,19 +332,12 @@
#
interface(`usermanage_run_useradd',`
gen_require(`
- #attribute_role useradd_roles;
+ attribute_role useradd_roles;
type useradd_t;
')
- #usermanage_domtrans_useradd($1)
- #roleattribute $2 useradd_roles;
-
usermanage_domtrans_useradd($1)
- role $2 types useradd_t;
-
- optional_policy(`
- nscd_run(useradd_t, $2)
- ')
+ roleattribute $2 useradd_roles;
')
########################################
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/abrt.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/abrt.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/abrt.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/abrt.if 2015-03-06 06:53:47.000000000 +0100
@@ -62,24 +62,6 @@
########################################
## <summary>
-## Send a signal to abrt.
-## </summary>
-## <param name="domain">
-## <summary>
-## Domain allowed access.
-## </summary>
-## </param>
-#
-interface(`abrt_signal',`
- gen_require(`
- type abrt_t;
- ')
-
- allow $1 abrt_t:process signal;
-')
-
-########################################
-## <summary>
## Send a null signal to abrt.
## </summary>
## <param name="domain">
@@ -192,11 +174,11 @@
#
interface(`abrt_run_helper',`
gen_require(`
- type abrt_helper_t;
+ attribute_role abrt_helper_roles;
')
abrt_domtrans_helper($1)
- role $2 types abrt_helper_t;
+ roleattribute $2 abrt_helper_roles;
')
########################################
@@ -407,6 +389,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 abrt_unit_file_t:file manage_file_perms;
allow $1 abrt_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/accountsd.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/accountsd.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/accountsd.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/accountsd.if 2015-03-06 06:53:47.000000000 +0100
@@ -137,6 +137,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 accountsd_unit_file_t:file read_file_perms;
allow $1 accountsd_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/alsa.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/alsa.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/alsa.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/alsa.if 2015-03-06 06:53:47.000000000 +0100
@@ -288,8 +288,28 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 alsa_unit_file_t:file read_file_perms;
allow $1 alsa_unit_file_t:service manage_service_perms;
ps_process_pattern($1, alsa_t)
')
+
+#########################################
+## <summary>
+## Write Alsa lib files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`alsa_write_lib',`
+ gen_require(`
+ type alsa_var_lib_t;
+ ')
+
+ files_search_var_lib($1)
+ write_files_pattern($1, alsa_var_lib_t, alsa_var_lib_t)
+')
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/anaconda.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/anaconda.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/anaconda.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/anaconda.if 2015-03-06 06:53:47.000000000 +0100
@@ -52,3 +52,81 @@
')
')
+########################################
+## <summary>
+## Execute preupgrade in the caller domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`anaconda_exec_preupgrade',`
+ gen_require(`
+ type preupgrade_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ can_exec($1, preupgrade_exec_t)
+')
+
+########################################
+## <summary>
+## Execute a domain transition to run preupgrade.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`anaconda_domtrans_preupgrade',`
+ gen_require(`
+ type preupgrade_t, preupgrade_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ domtrans_pattern($1, preupgrade_exec_t, preupgrade_t)
+')
+
+########################################
+## <summary>
+## Read preupgrade lib files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`anaconda_read_lib_files_preupgrade',`
+ gen_require(`
+ type preupgrade_data_t;
+ ')
+
+ read_files_pattern($1, preupgrade_data_t, preupgrade_data_t)
+ read_lnk_files_pattern($1, preupgrade_data_t, preupgrade_data_t)
+ files_search_var_lib($1)
+')
+
+########################################
+## <summary>
+## Manage preupgrade lib files
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`anaconda_manage_lib_files_preupgrade',`
+ gen_require(`
+ type preupgrade_data_t;
+ ')
+
+ manage_dirs_pattern($1, preupgrade_data_t, preupgrade_data_t)
+ manage_files_pattern($1, preupgrade_data_t, preupgrade_data_t)
+ manage_lnk_files_pattern($1, preupgrade_data_t, preupgrade_data_t)
+ files_search_var_lib($1)
+')
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/antivirus.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/antivirus.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/antivirus.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/antivirus.if 2015-03-06 06:53:47.000000000 +0100
@@ -17,6 +17,8 @@
')
typeattribute $1 antivirus_domain;
+
+ kernel_read_system_state($1)
')
#######################################
@@ -252,6 +254,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
systemd_read_fifo_file_passwd_run($1)
allow $1 antivirus_unit_file_t:file read_file_perms;
allow $1 antivirus_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/apache.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/apache.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/apache.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/apache.if 2015-03-06 06:53:47.000000000 +0100
@@ -14,99 +14,124 @@
template(`apache_content_template',`
gen_require(`
attribute httpd_exec_scripts, httpd_script_exec_type;
- type httpd_t, httpd_suexec_t, httpd_log_t;
- type httpd_sys_content_t;
+ type httpd_t, httpd_suexec_t;
attribute httpd_script_type, httpd_content_type;
')
#This type is for webpages
- type httpd_$1_content_t; # customizable;
- typeattribute httpd_$1_content_t httpd_content_type;
- typealias httpd_$1_content_t alias httpd_$1_script_ro_t;
- files_type(httpd_$1_content_t)
+ type $1_content_t; # customizable;
+ typeattribute $1_content_t httpd_content_type;
+ typealias $1_content_t alias httpd_$1_script_ro_t;
+ files_type($1_content_t)
# This type is used for .htaccess files
- type httpd_$1_htaccess_t, httpd_content_type; # customizable;
- typeattribute httpd_$1_htaccess_t httpd_content_type;
- files_type(httpd_$1_htaccess_t)
+ type $1_htaccess_t, httpd_content_type; # customizable;
+ typeattribute $1_htaccess_t httpd_content_type;
+ files_type($1_htaccess_t)
# Type that CGI scripts run as
- type httpd_$1_script_t, httpd_script_type;
- domain_type(httpd_$1_script_t)
- role system_r types httpd_$1_script_t;
+ type $1_script_t, httpd_script_type;
+ domain_type($1_script_t)
+ role system_r types $1_script_t;
- kernel_read_system_state(httpd_$1_script_t)
+ kernel_read_system_state($1_script_t)
# This type is used for executable scripts files
- type httpd_$1_script_exec_t, httpd_script_exec_type; # customizable;
- typeattribute httpd_$1_script_exec_t httpd_content_type;
- domain_entry_file(httpd_$1_script_t, httpd_$1_script_exec_t)
-
- type httpd_$1_rw_content_t; # customizable
- typeattribute httpd_$1_rw_content_t httpd_content_type;
- typealias httpd_$1_rw_content_t alias { httpd_$1_script_rw_t httpd_$1_content_rw_t };
- files_type(httpd_$1_rw_content_t)
-
- type httpd_$1_ra_content_t, httpd_content_type; # customizable
- typeattribute httpd_$1_ra_content_t httpd_content_type;
- typealias httpd_$1_ra_content_t alias { httpd_$1_script_ra_t httpd_$1_content_ra_t };
- files_type(httpd_$1_ra_content_t)
+ type $1_script_exec_t, httpd_script_exec_type; # customizable;
+ typeattribute $1_script_exec_t httpd_content_type;
+ domain_entry_file($1_script_t, $1_script_exec_t)
+
+ type $1_rw_content_t; # customizable
+ typeattribute $1_rw_content_t httpd_content_type;
+ typealias $1_rw_content_t alias { $1_script_rw_t $1_content_rw_t };
+ files_type($1_rw_content_t)
+
+ type $1_ra_content_t, httpd_content_type; # customizable
+ typeattribute $1_ra_content_t httpd_content_type;
+ typealias $1_ra_content_t alias { $1_script_ra_t $1_content_ra_t };
+ files_type($1_ra_content_t)
# Allow the script process to search the cgi directory, and users directory
- allow httpd_$1_script_t httpd_$1_content_t:dir search_dir_perms;
+ allow $1_script_t $1_content_t:dir search_dir_perms;
- can_exec(httpd_$1_script_t, httpd_$1_script_exec_t)
- allow httpd_$1_script_t httpd_$1_script_exec_t:dir list_dir_perms;
+ can_exec($1_script_t, $1_script_exec_t)
+ allow $1_script_t $1_script_exec_t:dir list_dir_perms;
+ allow $1_script_t $1_ra_content_t:dir { list_dir_perms add_entry_dir_perms };
+ read_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
+ append_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
+ create_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
+ read_lnk_files_pattern($1_script_t, $1_ra_content_t, $1_ra_content_t)
+
+ allow $1_script_t $1_content_t:dir list_dir_perms;
+ read_files_pattern($1_script_t, $1_content_t, $1_content_t)
+ read_lnk_files_pattern($1_script_t, $1_content_t, $1_content_t)
+
+ manage_dirs_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
+ manage_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
+ manage_lnk_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
+ manage_fifo_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
+ manage_sock_files_pattern($1_script_t, $1_rw_content_t, $1_rw_content_t)
- allow httpd_$1_script_t httpd_$1_ra_content_t:dir { list_dir_perms add_entry_dir_perms };
- read_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
- append_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
- create_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
- read_lnk_files_pattern(httpd_$1_script_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
-
- allow httpd_$1_script_t httpd_$1_content_t:dir list_dir_perms;
- read_files_pattern(httpd_$1_script_t, httpd_$1_content_t, httpd_$1_content_t)
- read_lnk_files_pattern(httpd_$1_script_t, httpd_$1_content_t, httpd_$1_content_t)
-
- manage_dirs_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- manage_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- manage_lnk_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- manage_fifo_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- manage_sock_files_pattern(httpd_$1_script_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
+ allow $1_script_t httpd_t:unix_stream_socket { ioctl accept getattr read write };
# Allow the web server to run scripts and serve pages
tunable_policy(`httpd_builtin_scripting',`
- manage_dirs_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- manage_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- manage_lnk_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
- rw_sock_files_pattern(httpd_t, httpd_$1_rw_content_t, httpd_$1_rw_content_t)
-
- allow httpd_t httpd_$1_ra_content_t:dir { add_entry_dir_perms };
- read_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
- append_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
- create_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
- read_lnk_files_pattern(httpd_t, httpd_$1_ra_content_t, httpd_$1_ra_content_t)
+ manage_dirs_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
+ manage_files_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
+ manage_lnk_files_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
+ rw_sock_files_pattern(httpd_t, $1_rw_content_t, $1_rw_content_t)
+
+ allow httpd_t $1_ra_content_t:dir { add_entry_dir_perms };
+ read_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
+ append_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
+ create_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
+ read_lnk_files_pattern(httpd_t, $1_ra_content_t, $1_ra_content_t)
')
tunable_policy(`httpd_enable_cgi',`
- allow httpd_$1_script_t httpd_$1_script_exec_t:file entrypoint;
+ allow $1_script_t $1_script_exec_t:file entrypoint;
- domtrans_pattern(httpd_suexec_t, httpd_$1_script_exec_t, httpd_$1_script_t)
+ domtrans_pattern(httpd_suexec_t, $1_script_exec_t, $1_script_t)
# privileged users run the script:
- domtrans_pattern(httpd_exec_scripts, httpd_$1_script_exec_t, httpd_$1_script_t)
+ domtrans_pattern(httpd_exec_scripts, $1_script_exec_t, $1_script_t)
- allow httpd_exec_scripts httpd_$1_script_exec_t:file read_file_perms;
+ allow httpd_exec_scripts $1_script_exec_t:file read_file_perms;
# apache runs the script:
- domtrans_pattern(httpd_t, httpd_$1_script_exec_t, httpd_$1_script_t)
- allow httpd_t httpd_$1_script_t:unix_dgram_socket sendto;
+ domtrans_pattern(httpd_t, $1_script_exec_t, $1_script_t)
+ allow httpd_t $1_script_t:unix_dgram_socket sendto;
')
')
########################################
## <summary>
+## Create a set of derived types for apache
+## web content.
+## </summary>
+## <param name="prefix">
+## <summary>
+## The prefix to be used for deriving new type names.
+## </summary>
+## </param>
+## <param name="oldprefix">
+## <summary>
+## The prefix to be used for deriving old type names.
+## </summary>
+## </param>
+#
+template(`apache_content_alias_template',`
+ typealias $1_htaccess_t alias httpd_$2_htaccess_t;
+ typealias $1_script_t alias httpd_$2_script_t;
+ typealias $1_script_exec_t alias httpd_$2_script_exec_t;
+ typealias $1_content_t alias httpd_$2_content_t;
+ typealias $1_rw_content_t alias httpd_$2_script_rw_content_t;
+ typealias $1_ra_content_t alias httpd_$2_script_ra_content_t;
+')
+
+########################################
+## <summary>
## Role access for apache
## </summary>
## <param name="role">
@@ -369,6 +394,25 @@
########################################
## <summary>
+## Allow attempts to read and write Apache
+## unix domain stream sockets.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain to not audit.
+## </summary>
+## </param>
+#
+interface(`apache_rw_stream_sockets',`
+ gen_require(`
+ type httpd_t;
+ ')
+
+ allow $1 httpd_t:unix_stream_socket { getattr read write };
+')
+
+########################################
+## <summary>
## Do not audit attempts to read and write Apache
## unix domain stream sockets.
## </summary>
@@ -383,7 +427,7 @@
type httpd_t;
')
- dontaudit $1 httpd_t:unix_stream_socket { read write };
+ dontaudit $1 httpd_t:unix_stream_socket { getattr read write };
')
########################################
@@ -1097,7 +1141,7 @@
type httpd_sys_script_t;
')
- dontaudit $1 httpd_sys_script_t:unix_stream_socket { read write };
+ dontaudit $1 httpd_sys_script_t:unix_stream_socket { getattr read write };
')
########################################
@@ -1394,6 +1438,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 httpd_unit_file_t:file read_file_perms;
allow $1 httpd_unit_file_t:service manage_service_perms;
@@ -1491,7 +1536,7 @@
dontaudit $1 httpd_t:fifo_file rw_inherited_fifo_file_perms;
dontaudit $1 httpd_t:tcp_socket { read write };
dontaudit $1 httpd_t:unix_dgram_socket { read write };
- dontaudit $1 httpd_t:unix_stream_socket { read write };
+ dontaudit $1 httpd_t:unix_stream_socket { getattr read write };
dontaudit $1 httpd_tmp_t:file { read write };
')
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/apcupsd.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/apcupsd.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/apcupsd.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/apcupsd.if 2015-03-06 06:53:47.000000000 +0100
@@ -102,7 +102,7 @@
########################################
## <summary>
## Execute a domain transition to
-## run httpd_apcupsd_cgi_script.
+## run apcupsd_cgi_script.
## </summary>
## <param name="domain">
## <summary>
@@ -112,11 +112,11 @@
#
interface(`apcupsd_cgi_script_domtrans',`
gen_require(`
- type httpd_apcupsd_cgi_script_t, httpd_apcupsd_cgi_script_exec_t;
+ type apcupsd_cgi_script_t, apcupsd_cgi_script_exec_t;
')
files_search_var($1)
- domtrans_pattern($1, httpd_apcupsd_cgi_script_exec_t, httpd_apcupsd_cgi_script_t)
+ domtrans_pattern($1, apcupsd_cgi_script_exec_t, apcupsd_cgi_script_t)
optional_policy(`
apache_search_sys_content($1)
@@ -140,6 +140,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 apcupsd_unit_file_t:file read_file_perms;
allow $1 apcupsd_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/apm.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/apm.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/apm.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/apm.if 2015-03-06 06:53:47.000000000 +0100
@@ -156,6 +156,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 apmd_unit_file_t:file read_file_perms;
allow $1 apmd_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/apt.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/apt.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/apt.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/apt.if 2015-03-06 06:53:47.000000000 +0100
@@ -21,6 +21,25 @@
########################################
## <summary>
+## Execute the apt in the caller domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`apt_exec',`
+ gen_require(`
+ type apt_exec_t;
+ ')
+
+ corecmd_search_bin($1)
+ can_exec($1, apt_exec_t)
+')
+
+########################################
+## <summary>
## Execute apt programs in the apt domain.
## </summary>
## <param name="domain">
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/arpwatch.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/arpwatch.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/arpwatch.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/arpwatch.if 2015-03-06 06:53:47.000000000 +0100
@@ -134,6 +134,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 arpwatch_unit_file_t:file read_file_perms;
allow $1 arpwatch_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/asterisk.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/asterisk.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/asterisk.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/asterisk.if 2015-03-06 06:53:47.000000000 +0100
@@ -136,6 +136,8 @@
role_transition $2 asterisk_initrc_exec_t system_r;
allow $2 system_r;
+ asterisk_exec($1)
+
files_list_tmp($1)
admin_pattern($1, asterisk_tmp_t)
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/automount.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/automount.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/automount.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/automount.if 2015-03-06 06:53:47.000000000 +0100
@@ -167,6 +167,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 automount_unit_file_t:file read_file_perms;
allow $1 automount_unit_file_t:service manage_service_perms;
@@ -194,7 +195,7 @@
gen_require(`
type automount_t, automount_lock_t, automount_tmp_t;
type automount_var_run_t, automount_initrc_exec_t;
- type automount_unit_file_t;
+ type automount_unit_file_t, automount_keytab_t;
')
allow $1 automount_t:process signal_perms;
@@ -209,6 +210,9 @@
role_transition $2 automount_initrc_exec_t system_r;
allow $2 system_r;
+ files_list_etc($1)
+ admin_pattern($1, automount_keytab_t)
+
files_list_var($1)
admin_pattern($1, automount_lock_t)
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/avahi.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/avahi.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/avahi.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/avahi.if 2015-03-06 06:53:47.000000000 +0100
@@ -21,6 +21,25 @@
########################################
## <summary>
+## Execute avahi init scripts in the
+## init script domain.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`avahi_initrc_domtrans',`
+ gen_require(`
+ type avahi_initrc_exec_t;
+ ')
+
+ init_labeled_script_domtrans($1, avahi_initrc_exec_t)
+')
+
+########################################
+## <summary>
## Send generic signals to avahi.
## </summary>
## <param name="domain">
@@ -116,6 +135,63 @@
########################################
## <summary>
+## Create avahi pid directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`avahi_create_pid_dirs',`
+ gen_require(`
+ type avahi_var_run_t;
+ ')
+
+ files_search_pids($1)
+ allow $1 avahi_var_run_t:dir create_dir_perms;
+')
+
+########################################
+## <summary>
+## Set attributes of avahi pid directories.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`avahi_setattr_pid_dirs',`
+ gen_require(`
+ type avahi_var_run_t;
+ ')
+
+ files_search_pids($1)
+ allow $1 avahi_var_run_t:dir setattr_dir_perms;
+')
+
+########################################
+## <summary>
+## Create, read, and write avahi pid files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`avahi_manage_pid_files',`
+ gen_require(`
+ type avahi_var_run_t;
+ ')
+
+ files_search_pids($1)
+ manage_files_pattern($1, avahi_var_run_t, avahi_var_run_t)
+')
+
+########################################
+## <summary>
## Do not audit attempts to search
## avahi pid directories.
## </summary>
@@ -150,6 +226,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 avahi_unit_file_t:file read_file_perms;
allow $1 avahi_unit_file_t:service manage_service_perms;
@@ -158,6 +235,35 @@
########################################
## <summary>
+## Create specified objects in generic
+## pid directories with the avahi pid file type.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+## <param name="object_class">
+## <summary>
+## Class of the object being created.
+## </summary>
+## </param>
+## <param name="name" optional="true">
+## <summary>
+## The name of the object being created.
+## </summary>
+## </param>
+#
+interface(`avahi_filetrans_pid',`
+ gen_require(`
+ type avahi_var_run_t;
+ ')
+
+ files_pid_filetrans($1, avahi_var_run_t, $2, $3)
+')
+
+########################################
+## <summary>
## All of the rules required to
## administrate an avahi environment.
## </summary>
@@ -187,7 +293,7 @@
allow $1 avahi_t:process ptrace;
')
- init_labeled_script_domtrans($1, avahi_initrc_exec_t)
+ avahi_initrc_domtrans($1)
domain_system_change_exemption($1)
role_transition $2 avahi_initrc_exec_t system_r;
allow $2 system_r;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/backup.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/backup.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/backup.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/backup.if 2015-03-06 06:53:47.000000000 +0100
@@ -45,3 +45,23 @@
backup_domtrans($1)
roleattribute $2 backup_roles;
')
+
+########################################
+## <summary>
+## Create, read, and write backup
+## store files.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`backup_manage_store_files',`
+ gen_require(`
+ type backup_store_t;
+ ')
+
+ files_search_var($1)
+ manage_files_pattern($1, backup_store_t, backup_store_t)
+')
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/bcfg2.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/bcfg2.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/bcfg2.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/bcfg2.if 2015-03-06 06:53:47.000000000 +0100
@@ -132,6 +132,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
systemd_read_fifo_file_passwd_run($1)
allow $1 bcfg2_unit_file_t:file read_file_perms;
allow $1 bcfg2_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/bind.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/bind.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/bind.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/bind.if 2015-03-06 06:53:47.000000000 +0100
@@ -35,6 +35,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 named_unit_file_t:file read_file_perms;
allow $1 named_unit_file_t:service manage_service_perms;
@@ -408,6 +409,25 @@
########################################
## <summary>
+## Allow the domain to read bind state files in /proc.
+## </summary>
+## <param name="domain">
+## <summary>
+## Domain allowed access.
+## </summary>
+## </param>
+#
+interface(`bind_read_state',`
+ gen_require(`
+ type named_t;
+ ')
+
+ kernel_search_proc($1)
+ ps_process_pattern($1, named_t)
+')
+
+########################################
+## <summary>
## All of the rules required to
## administrate an bind environment.
## </summary>
@@ -426,10 +446,9 @@
interface(`bind_admin',`
gen_require(`
type named_t, named_tmp_t, named_log_t;
- type named_conf_t, named_var_run_t, named_cache_t;
- type named_zone_t, named_initrc_exec_t;
- type dnssec_t, ndc_t, named_keytab_t;
- type named_unit_file_t;
+ type named_cache_t, named_zone_t, named_initrc_exec_t;
+ type dnssec_t, ndc_t, named_conf_t, named_var_run_t;
+ type named_keytab_t, named_unit_file_t;
')
allow $1 named_t:process signal_perms;
@@ -453,7 +472,7 @@
admin_pattern($1, named_log_t)
files_list_etc($1)
- admin_pattern($1, named_conf_t)
+ admin_pattern($1, { named_keytab_t named_conf_t })
admin_pattern($1, named_keytab_t)
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/bluetooth.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/bluetooth.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/bluetooth.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/bluetooth.if 2015-03-06 06:53:47.000000000 +0100
@@ -233,6 +233,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 bluetooth_unit_file_t:file read_file_perms;
allow $1 bluetooth_unit_file_t:service manage_service_perms;
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/boinc.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/boinc.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/boinc.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/boinc.if 2015-03-06 06:53:47.000000000 +0100
@@ -150,6 +150,7 @@
')
systemd_exec_systemctl($1)
+ init_reload_services($1)
allow $1 boinc_unit_file_t:file read_file_perms;
allow $1 boinc_unit_file_t:service manage_service_perms;
Only in centos-7.1.1503/usr/share/selinux/devel/include/contrib: brltty.if
diff -ru centos-7.0.1406/usr/share/selinux/devel/include/contrib/bugzilla.if centos-7.1.1503/usr/share/selinux/devel/include/contrib/bugzilla.if
--- centos-7.0.1406/usr/share/selinux/devel/include/contrib/bugzilla.if 2014-06-10 03:38:27.000000000 +0200
+++ centos-7.1.1503/usr/share/selinux/devel/include/contrib/bugzilla.if 2015-03-06 06:53:47.000000000 +0100
@@ -12,10 +12,10 @@
#
interface(`bugzilla_search_content',`
gen_require(`
- type httpd_bugzilla_content_t;
+ type bugzilla_content_t;