-
Notifications
You must be signed in to change notification settings - Fork 0
/
selinux.xml
1416 lines (1317 loc) · 62.7 KB
/
selinux.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
[
<!ENTITY identifier "[a-zA-Z][\w\-]*(?:\.?[\w\-])*">
<!ENTITY versionIdentifier "\d+(?:\.[\d_\.]*)?">
<!-- Documentation -->
<!ENTITY tagName "(?:[a-zA-Z_](?:[\w\-\.]*\w)?\:)?[a-zA-Z_](?:[\w\-\.]*\w)?">
<!-- PCRE 2 RegExp -->
<!ENTITY specialChars "*?.+">
<!ENTITY capGroup "\?(?:<[\=!]|P?<\w+>|'\w+'|[\=!:>\|R&\-#])"> <!-- Capturing & Groups -->
<!-- M4 Macros -->
<!ENTITY m4Args "\$(?:[1-9]\d*|0|[\#\*\@]|\{(?:[1-9]\d*|0)\})">
<!ENTITY m4Quotes "`'‘’“”"> <!-- Default Quotes (`') & Other Common Quotes -->
<!-- For File Contexts -->
<!ENTITY identifierWithArg "(?:[a-zA-Z]|&m4Args;)(?:\.?(?:[\w\-]|&m4Args;))*">
<!ENTITY mlsLevel "&identifierWithArg;(?:\:&identifierWithArg;(?:\s*,\s*&identifierWithArg;)*)?">
<!ENTITY url "\bhttps?://[^\s<>"'`]*[^\s<>"'`\}\)\]\.,;\|]">
<!ENTITY email "(?:(?:[^<>\(\)\[\]\\\.,;:\s@"]+(?:\.[^<>\(\)\[\]\\\.,;:\s@"]+)*)|(?:"[^"]+"))@(?:(?:\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}])|(?:(?:[a-zA-Z\-\d]+\.)+[a-zA-Z]{2,}))\b">
<!ENTITY ipv4 "\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b">
<!-- IPv6 (Source: https://community.helpsystems.com/forums/intermapper/miscellaneous-topics/5acc4fcf-fa83-e511-80cf-0050568460e4 ) -->
<!ENTITY ipv6 "(?:(?:\b(?:[0-9A-Fa-f]{1,4}\:){7}(?:[0-9A-Fa-f]{1,4}|\:))|(?:\b(?:[0-9A-Fa-f]{1,4}\:){6}(?:\:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|\:))|(?:\b(?:[0-9A-Fa-f]{1,4}\:){5}(?:(?:(?:\:[0-9A-Fa-f]{1,4}){1,2})|\:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|\:))|(?:\b(?:[0-9A-Fa-f]{1,4}\:){4}(?:(?:(?:\:[0-9A-Fa-f]{1,4}){1,3})|(?:(?:\:[0-9A-Fa-f]{1,4})?\:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\:))|(?:\b(?:[0-9A-Fa-f]{1,4}\:){3}(?:(?:(?:\:[0-9A-Fa-f]{1,4}){1,4})|(?:(?:\:[0-9A-Fa-f]{1,4}){0,2}\:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\:))|(?:\b(?:[0-9A-Fa-f]{1,4}\:){2}(?:(?:(?:\:[0-9A-Fa-f]{1,4}){1,5})|(?:(?:\:[0-9A-Fa-f]{1,4}){0,3}\:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\:))|(?:\b(?:[0-9A-Fa-f]{1,4}\:){1}(?:(?:(?:\:[0-9A-Fa-f]{1,4}){1,6})|(?:(?:\:[0-9A-Fa-f]{1,4}){0,4}\:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\:))|(?:\:(?:(?:(?:\:[0-9A-Fa-f]{1,4}){1,7})|(?:(?:\:[0-9A-Fa-f]{1,4}){0,5}\:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|\:)))"> <!-- End: (\%\w+\b)? -->
<!-- Hexadecimal -->
<!ENTITY escape1 "\\x(?:\{[\da-fA-F]+\}|[\da-fA-F]{2})">
<!-- Octal. NOTE: only ASCII chars. for \ddd -->
<!ENTITY escape2 "\\(?:o\{[0-7]+\}|[0-3][0-7]{0,2}|[4-7][0-7]?)">
<!-- References -->
<!ENTITY escape3 "\\[kg](?:<\w+>|'\w+'|\{\w+\})">
<!ENTITY escape4 "\\g(?:<[\+\-]?\d+>|'[\+\-]?\d+'|\{[\+\-]?\d+\}|[\+\-]?\d)">
<!-- Category Properties -->
<!ENTITY escape5 "\\[pP](?:C[cfnos]?|L[lmotu&]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?)">
<!ENTITY escape6 "\\[pP]\{(?:Xan|Xps|Xsp|Xuc|Xwd|C[cfnos]?|L[lmotu&]?|M[cen]?|N[dlo]?|P[cdefios]?|S[ckmo]?|Z[lps]?)\}">
<!-- Script Names -->
<!ENTITY escape7 "\\[pP]\{(?:Ahom|Anatolian_Hieroglyphs|Arabic|Armenian|Avestan|Balinese|Bamum|Bassa_Vah|Batak|Bengali|Bopomofo|Brahmi|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Caucasian_Albanian|Chakma|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Duployan|Egyptian_Hieroglyphs|Elbasan|Ethiopic|Georgian|Glagolitic|Gothic|Grantha|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hatran|Hebrew|Hiragana|Imperial_Aramaic|Inherited|Inscriptional_Pahlavi|Inscriptional_Parthian|Javanese|Kaithi|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Khojki|Khudawadi|Lao|Latin|Lepcha|Limbu|Linear_A|Linear_B|Lisu|Lycian|Lydian|Mahajani|Malayalam|Mandaic|Manichaean|Meetei_Mayek|Mende_Kikakui|Meroitic_Cursive|Meroitic_Hieroglyphs|Miao|Modi|Mongolian|Mro|Multani|Myanmar|Nabataean|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Hungarian|Old_Italic|Old_North_Arabian|Old_Permic|Old_Persian|Old_South_Arabian|Old_Turkic|Oriya|Osmanya|Pahawh_Hmong|Palmyrene|Pau_Cin_Hau|Phags_Pa|Phoenician|Psalter_Pahlavi|Rejang|Runic|Samaritan|Saurashtra|Sharada|Shavian|Siddham|SignWriting|Sinhala|Sora_Sompeng|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tai_Tham|Tai_Viet|Takri|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Tirhuta|Ugaritic|Vai|Warang_Citi|Yi)\}">
<!-- Escaped Characters -->
<!ENTITY escape8 "\\(?:Q.*\\E|c[a-zA-Z])">
<!-- Reserved characters -->
<!ENTITY escape9 "\\[\ssSdDwWbBAZcCtrnaefvxhGHKNQRVXpPz\d]">
<!-- Punctuation Characters -->
<!ENTITY escape10 "\\[[:punct:]]">
<!ENTITY escape11 "\\[\041-\057\072-\100\133-\140\173-\176]">
<!-- References & Option Settings -->
<!ENTITY group_bracket1 "\?(?:&|P[>\=])\w+(?=\))">
<!ENTITY group_bracket2 "\?(?:xx|[iJmnsUxR]|C\d*|C"[^\s"]*"|[\-\+]?\d+)(?=\))">
<!-- Conditional Patterns -->
<!ENTITY group_bracket3 "\?\((?:Rn?|R&\w+|[\+\-]?\d+|<\w+>|'\w+'|VERSION>?\=\d+(?:\.\d+)*|\w+)\)">
<!ENTITY group_bracket4 "\?(?=\()">
<!ENTITY mls_level_range_ident "&identifierWithArg;(?:\s*\:\s*&identifierWithArg;(?:\s*,\s*&identifierWithArg;)*)?">
]>
<!--
SELinux Security Policies Syntax Highlighting Definition
===========================================================================
This file is part of the KDE's KSyntaxHighlighting framework.
SPDX-FileCopyrightText: 2018-2021 Nibaldo González S. <[email protected]>
SPDX-License-Identifier: MIT
===========================================================================
Last update: checkpolicy 3.0
Obtained from the SELinux checkpolicy parser:
https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/policy_parse.y
https://github.com/SELinuxProject/selinux/blob/master/checkpolicy/policy_scan.l
More details:
https://selinuxproject.org/page/PolicyLanguage#Kernel_Policy_Language
https://selinuxproject.org/page/Category:Notebook
NOTE:
- This file is required by "selinux-cil.xml" and "selinux-fc.xml".
- This file depends on "m4.xml" and "apparmor.xml" (used only to include keywords).
- About file extensions: Only the most relevant policy build files and config. files
are highlighted by default, since some have very generic names. Files with
definition of file contexts are highlighted by "selinux-fc.xml".
Change log:
* Version 5 [30-Sep-2020]: Use include-keywods and other minor changes.
* Version 4 [09-Feb-2020]: Use non-capturing groups in RegExpr.
* Version 3 [10-Dec-2019]:
- Add "glblub" keyword (default_range).
- Update permissions list.
* Version 2 [09-Sep-2018]:
- Update itemData's style for the new Solarized color schemes.
* Version 1 [28-Aug-2018, by Nibaldo González]:
- Initial version. Syntax based on checkpolicy v2.8.
-->
<language name="SELinux Policy"
version="9"
kateversion="5.53"
section="Sources"
extensions="*.te;*.if;*.spt;policy.conf;access_vectors;mls;mcs;mls_macros;te_macros;policy_capabilities;seapp_contexts;port_contexts"
priority="6"
mimetype=""
author="Nibaldo González ([email protected])"
license="MIT">
<highlighting>
<list name="self">
<item>SELF</item>
<item>self</item>
</list>
<list name="booleans">
<item>FALSE</item>
<item>false</item>
<item>TRUE</item>
<item>true</item>
</list>
<!-- Statements -->
<list name="statements_access">
<item>ALLOW</item>
<item>allow</item>
<item>NEVERALLOW</item>
<item>neverallow</item>
<item>AUDITALLOW</item>
<item>auditallow</item>
<item>AUDITDENY</item>
<item>auditdeny</item>
<item>DONTAUDIT</item>
<item>dontaudit</item>
<item>ALLOWXPERM</item>
<item>allowxperm</item>
<item>AUDITALLOWXPERM</item>
<item>auditallowxperm</item>
<item>DONTAUDITXPERM</item>
<item>dontauditxperm</item>
<item>NEVERALLOWXPERM</item>
<item>neverallowxperm</item>
</list>
<list name="statements">
<item>ATTRIBUTE</item>
<item>attribute</item>
<item>ATTRIBUTE_ROLE</item>
<item>attribute_role</item>
<item>BOOL</item>
<item>bool</item>
<item>CATEGORY</item>
<item>category</item>
<item>COMMON</item>
<item>common</item>
<item>DOMINANCE</item>
<item>dominance</item>
<item>EXPANDATTRIBUTE</item>
<item>expandattribute</item>
<item>MODULE</item>
<item>module</item>
<item>PERMISSIVE</item>
<item>permissive</item>
<item>ROLE</item>
<item>role</item>
<item>ROLEATTRIBUTE</item>
<item>roleattribute</item>
<item>SENSITIVITY</item>
<item>sensitivity</item>
<item>TUNABLE</item>
<item>tunable</item>
<item>TYPE</item>
<item>type</item>
<item>TYPEALIAS</item>
<item>typealias</item>
<item>TYPEATTRIBUTE</item>
<item>typeattribute</item>
<item>TYPEBOUNDS</item>
<item>typebounds</item>
<item>USER</item>
<item>user</item>
<!-- Conditional -->
<item>IF</item>
<item>if</item>
<item>ELSE</item>
<item>else</item>
<item>require</item>
<item>REQUIRE</item>
<item>optional</item>
<item>OPTIONAL</item>
</list>
<!-- Statements that contain definition of file contexts -->
<list name="statements_fc">
<item>DEVICETREECON</item>
<item>devicetreecon</item>
<item>FS_USE_TASK</item>
<item>fs_use_task</item>
<item>FS_USE_TRANS</item>
<item>fs_use_trans</item>
<item>FS_USE_XATTR</item>
<item>fs_use_xattr</item>
<item>FSCON</item>
<item>fscon</item>
<item>GENFSCON</item>
<item>genfscon</item>
<item>IBENDPORTCON</item>
<item>ibendportcon</item>
<item>IBPKEYCON</item>
<item>ibpkeycon</item>
<item>IOMEMCON</item>
<item>iomemcon</item>
<item>IOPORTCON</item>
<item>ioportcon</item>
<item>NETIFCON</item>
<item>netifcon</item>
<item>NODECON</item>
<item>nodecon</item>
<item>PCIDEVICECON</item>
<item>pcidevicecon</item>
<item>PIRQCON</item>
<item>pirqcon</item>
<item>PORTCON</item>
<item>portcon</item>
<item>SID</item>
<item>sid</item>
</list>
<list name="statements_def">
<item>CLASS</item>
<item>class</item>
</list>
<list name="statements_mls_level_def">
<item>LEVEL</item>
<item>level</item>
</list>
<!-- Statements with special contexts -->
<list name="statements_policycap">
<item>POLICYCAP</item>
<item>policycap</item>
</list>
<list name="statements_type">
<item>TYPE_CHANGE</item>
<item>type_change</item>
<item>TYPE_MEMBER</item>
<item>type_member</item>
<item>TYPE_TRANSITION</item>
<item>type_transition</item>
</list>
<list name="statements_role_transition">
<item>ROLE_TRANSITION</item>
<item>role_transition</item>
</list>
<list name="statements_range_transition">
<item>RANGE_TRANSITION</item>
<item>range_transition</item>
</list>
<list name="statements_default">
<item>DEFAULT_USER</item>
<item>default_user</item>
<item>DEFAULT_ROLE</item>
<item>default_role</item>
<item>DEFAULT_TYPE</item>
<item>default_type</item>
</list>
<list name="statements_default_range">
<item>DEFAULT_RANGE</item>
<item>default_range</item>
</list>
<list name="statements_cexpr">
<item>CONSTRAIN</item>
<item>constrain</item>
<item>VALIDATETRANS</item>
<item>validatetrans</item>
<item>MLSCONSTRAIN</item>
<item>mlsconstrain</item>
<item>MLSVALIDATETRANS</item>
<item>mlsvalidatetrans</item>
</list>
<!-- Other reserved keywords -->
<list name="keywords">
<item>ALIAS</item>
<item>alias</item>
<item>CLONE</item> <!-- Deprecated -->
<item>clone</item>
<item>INHERITS</item>
<item>inherits</item>
<item>ROLES</item>
<item>roles</item>
<item>TYPES</item>
<item>types</item>
</list>
<list name="mls_range_def">
<item>RANGE</item>
<item>range</item>
</list>
<list name="source_target">
<item>SOURCE</item>
<item>source</item>
<item>TARGET</item>
<item>target</item>
</list>
<list name="sameuser">
<item>SAMEUSER</item>
<item>sameuser</item>
</list>
<list name="range">
<item>low-high</item>
<item>LOW-HIGH</item>
<item>high</item>
<item>HIGH</item>
<item>low</item>
<item>LOW</item>
<item>glblub</item>
<item>GLBLUB</item>
</list>
<list name="cond_operators">
<item>OR</item>
<item>or</item>
<item>AND</item>
<item>and</item>
<item>NOT</item>
<item>not</item>
<item>xor</item>
<item>XOR</item>
<item>eq</item>
<item>EQ</item>
</list>
<list name="cexpr_operators">
<item>eq</item>
<item>EQ</item>
<item>dom</item>
<item>DOM</item>
<item>domby</item>
<item>DOMBY</item>
<item>INCOMP</item>
<item>incomp</item>
</list>
<list name="cexpr_keywords">
<item>r1</item>
<item>R1</item>
<item>r2</item>
<item>R2</item>
<item>r3</item>
<item>R3</item>
<item>u1</item>
<item>U1</item>
<item>u2</item>
<item>U2</item>
<item>u3</item>
<item>U3</item>
<item>t1</item>
<item>T1</item>
<item>t2</item>
<item>T2</item>
<item>t3</item>
<item>T3</item>
<item>l1</item>
<item>L1</item>
<item>l2</item>
<item>L2</item>
<item>h1</item>
<item>H1</item>
<item>h2</item>
<item>H2</item>
</list>
<!-- Policy Capabilities: /sys/fs/selinux/policy_capabilities/
More details: https://selinuxproject.org/page/NB_LSM#SELinux_Filesystem -->
<list name="policy_capabilities">
<item>always_check_network</item>
<item>always_use_network</item>
<item>cgroup_seclabel</item>
<item>extended_socket_class</item>
<item>network_peer_controls</item>
<item>nnp_nosuid_transition</item>
<item>open_perms</item>
<item>redhat1</item>
</list>
<!-- Access Vectors Permissions.
More details:
https://selinuxproject.org/page/ObjectClassesPerms
Permissions & Classes:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/security/selinux/include/classmap.h
https://github.com/SELinuxProject/refpolicy/blob/master/policy/flask/access_vectors -->
<list name="av_permissions">
<item>accept</item>
<item>acceptfrom</item>
<item>access</item>
<item>acquire_svc</item>
<item>add</item>
<item>add_child</item>
<item>add_color</item>
<item>add_glyph</item>
<item>add_name</item>
<item>admin</item>
<item>append</item>
<item>associate</item>
<item>association</item>
<item>attach_queue</item>
<item>audit_access</item>
<item>audit_control</item>
<item>audit_read</item>
<item>audit_write</item>
<item>bell</item>
<item>bind</item>
<item>blend</item>
<item>block_suspend</item>
<item>call</item>
<item>check_context</item>
<item>chfn</item>
<item>chown</item>
<item>chsh</item>
<item>compute_av</item>
<item>compute_create</item>
<item>compute_member</item>
<item>compute_relabel</item>
<item>compute_user</item>
<item>connect</item>
<item>connectto</item>
<item>contains</item>
<item>copy</item>
<item>create</item>
<item>create_files_as</item>
<item>crontab</item>
<item>dac_override</item>
<item>dac_read_search</item>
<item>dccp_recv</item>
<item>dccp_send</item>
<item>debug</item>
<item>delete</item>
<item>destroy</item>
<item>disable</item>
<item>drop</item>
<item>dyntransition</item>
<item>egress</item>
<item>enable</item>
<item>enforce_dest</item>
<item>enqueue</item>
<item>entrypoint</item>
<item>execheap</item>
<item>execmem</item>
<item>execmod</item>
<item>execstack</item>
<item>execute</item>
<item>execute_no_trans</item>
<item>expand</item>
<item>export</item>
<item>force_cursor</item>
<item>fork</item>
<item>forward_in</item>
<item>forward_out</item>
<item>fowner</item>
<item>freeze</item>
<item>fsetid</item>
<item>get_property</item>
<item>get_value</item>
<item>getattr</item>
<item>getcap</item>
<item>getfocus</item>
<item>getgrp</item>
<item>gethost</item>
<item>getopt</item>
<item>getpgid</item>
<item>getpwd</item>
<item>getrlimit</item>
<item>getsched</item>
<item>getserv</item>
<item>getsession</item>
<item>getstat</item>
<item>grab</item>
<item>halt</item>
<item>hide</item>
<item>hide_cursor</item>
<item>impersonate</item>
<item>implement</item>
<item>import</item>
<item>ingress</item>
<item>insert</item>
<item>install</item>
<item>install_module</item>
<item>ioctl</item>
<item>ipc_info</item>
<item>ipc_lock</item>
<item>ipc_owner</item>
<item>kill</item>
<item>lease</item>
<item>link</item>
<item>linux_immutable</item>
<item>list_child</item>
<item>list_property</item>
<item>listen</item>
<item>load_module</item>
<item>load_policy</item>
<item>lock</item>
<item>mac_admin</item>
<item>mac_override</item> <!-- Unused by SELinux -->
<item>manage</item>
<item>manage_subnet</item>
<item>map</item>
<item>map_create</item>
<item>map_read</item>
<item>map_write</item>
<item>mknod</item>
<item>mmap_zero</item>
<item>module_load</item>
<item>module_request</item>
<item>mount</item>
<item>mounton</item>
<item>name_bind</item>
<item>name_connect</item>
<item>net_admin</item>
<item>net_bind_service</item>
<item>net_broadcast</item>
<item>net_raw</item>
<item>newconn</item>
<item>next_value</item>
<item>nlmsg_read</item>
<item>nlmsg_readpriv</item>
<item>nlmsg_relay</item>
<item>nlmsg_tty_audit</item>
<item>nlmsg_write</item>
<item>nnp_transition</item>
<item>noatsecure</item>
<item>node_bind</item>
<item>nosuid_transition</item>
<item>open</item>
<item>override</item>
<item>passwd</item>
<item>paste</item>
<item>paste_after_confirm</item>
<item>polmatch</item>
<item>prog_load</item>
<item>prog_run</item>
<item>ptrace</item>
<item>query</item>
<item>quotaget</item>
<item>quotamod</item>
<item>quotaon</item>
<item>rawip_recv</item>
<item>rawip_send</item>
<item>read</item>
<item>read_policy</item>
<item>reboot</item>
<item>receive</item>
<item>record</item>
<item>recv</item>
<item>recv_msg</item>
<item>recvfrom</item>
<item>relabelfrom</item>
<item>relabelto</item>
<item>reload</item>
<item>remount</item>
<item>remove</item>
<item>remove_child</item>
<item>remove_color</item>
<item>remove_glyph</item>
<item>remove_name</item>
<item>rename</item>
<item>reparent</item>
<item>rlimitinh</item>
<item>rmdir</item>
<item>rootok</item>
<item>saver_getattr</item>
<item>saver_hide</item>
<item>saver_setattr</item>
<item>saver_show</item>
<item>search</item>
<item>select</item>
<item>send</item>
<item>send_msg</item>
<item>sendto</item>
<item>set_context_mgr</item>
<item>set_property</item>
<item>set_value</item>
<item>setattr</item>
<item>setbool</item>
<item>setcap</item>
<item>setcheckreqprot</item>
<item>setcontext</item>
<item>setcurrent</item>
<item>setenforce</item>
<item>setexec</item>
<item>setfcap</item>
<item>setfocus</item>
<item>setfscreate</item>
<item>setgid</item>
<item>setkeycreate</item>
<item>setopt</item>
<item>setpcap</item>
<item>setpgid</item>
<item>setrlimit</item>
<item>setsched</item>
<item>setsecparam</item>
<item>setsockcreate</item>
<item>setuid</item>
<item>share</item>
<item>shmemgrp</item>
<item>shmemhost</item>
<item>shmempwd</item>
<item>shmemserv</item>
<item>show</item>
<item>show_cursor</item>
<item>shutdown</item>
<item>sigchld</item>
<item>siginh</item>
<item>sigkill</item>
<item>signal</item>
<item>signull</item>
<item>sigstop</item>
<item>start</item>
<item>status</item>
<item>stop</item>
<item>swapon</item>
<item>sys_admin</item>
<item>sys_boot</item>
<item>sys_chroot</item>
<item>sys_module</item>
<item>sys_nice</item>
<item>sys_pacct</item>
<item>sys_ptrace</item>
<item>sys_rawio</item>
<item>sys_resource</item>
<item>sys_time</item>
<item>sys_tty_config</item>
<item>syslog</item>
<item>syslog_console</item>
<item>syslog_mod</item>
<item>syslog_read</item>
<item>tcp_recv</item>
<item>tcp_send</item>
<item>transfer</item>
<item>transition</item>
<item>udp_recv</item>
<item>udp_send</item>
<item>uninstall</item>
<item>unix_read</item>
<item>unix_write</item>
<item>unlink</item>
<item>unmount</item>
<item>unused_perm</item>
<item>update</item>
<item>use</item>
<item>use_as_override</item>
<item>validate_trans</item>
<item>view</item>
<item>wake_alarm</item>
<item>watch</item>
<item>watch_mount</item>
<item>watch_reads</item>
<item>watch_sb</item>
<item>watch_with_perm</item>
<item>write</item>
<!-- Deprecated: flow_in, flow_out, get_param, set_param -->
</list>
<!-- Additional AV Permissions for Android.
Permissions & Classes:
https://android.googlesource.com/platform/system/sepolicy/+/master/private/access_vectors
https://android.googlesource.com/platform/system/security/+/master/keystore/permissions.cpp
More details:
https://selinuxproject.org/page/NB_SEforAndroid_1#Android_Classes_and_Permissions -->
<list name="av_permissions_android">
<item>add_auth</item>
<item>clear_uid</item>
<item>closeDecryptSession</item>
<item>consumeRights</item>
<item>decrypt</item>
<item>duplicate</item>
<item>exist</item>
<item>finalizeDecryptUnit</item>
<item>find</item>
<item>gen_unique_id</item>
<item>get</item>
<item>get_state</item>
<item>grant</item>
<item>initializeDecryptUnit</item>
<item>is_empty</item>
<item>list</item>
<item>openDecryptSession</item>
<item>password</item>
<item>pread</item>
<item>reset</item>
<item>set</item>
<item>setPlaybackStatus</item>
<item>sign</item>
<item>unlock</item>
<item>user_changed</item>
<item>verify</item>
</list>
<!-- FS & VFS Types -->
<list name="filesystem">
<include>rule_mount_fstypes##AppArmor Security Profile</include>
</list>
<!-- Keywords/Functions provided by SELinux Reference Policy -->
<list name="refpolicy_keywords">
<item>policy_module</item>
<item>gen_require</item>
<item>template</item>
<item>interface</item>
<item>optional_policy</item>
<item>gen_tunable</item>
<item>tunable_policy</item>
<item>gen_user</item>
<item>gen_context</item>
<item>gen_bool</item>
<item>gen_cats</item>
<item>gen_sens</item>
<item>gen_levels</item>
<item>mls_systemlow</item>
<item>mls_systemhigh</item>
<item>mcs_systemlow</item>
<item>mcs_systemhigh</item>
<item>mcs_allcats</item>
<item>ifndef</item>
</list>
<!-- M4 Built-in Keywords (obtained from "m4.xml") -->
<list name="m4_builtin">
<include>builtins##GNU M4</include>
<include>m4_builtins##GNU M4</include>
</list>
<list name="m4_builtin_regexp">
<item>regexp</item>
<item>patsubst</item>
<item>m4_regexp</item>
<item>m4_patsubst</item>
</list>
<contexts>
<context name="_normal" attribute="Normal Text" lineEndContext="#stay">
<IncludeRules context="_m4_preprocessor"/>
<IncludeRules context="_find_all_comments"/>
<IncludeRules context="_m4_special_arguments"/>
<!-- Content Quoted (M4).
NOTE: The default quotes (`text') are highlighted,
but another type of quotation mark can be used. -->
<IncludeRules context="_m4_string_simple"/> <!-- `simple text' -->
<IncludeRules context="_m4_quotes"/> <!-- &m4Quotes; -->
<DetectChar context="_quoted" attribute="Text Quoted" char="""/>
<DetectChar context="_path" attribute="Path" char="/"/>
<RegExpr context="_input_sel" attribute="Input Selector" String="\b&identifier;(?=\s*\=\s*[^\s\=,;\}\)\]#!\^:])"/>
<!-- Keywords & Statements -->
<keyword context="#stay" attribute="Booleans" String="booleans"/>
<keyword context="#stay" attribute="Special Keys" String="self"/>
<keyword context="_statement_policycap" attribute="Policy Config. Statements" String="statements_policycap"/>
<!-- Highlight class -->
<keyword context="_statement_find_class" attribute="Access Keys" String="statements_access"/>
<keyword context="_statement_find_class" attribute="Statements" String="statements_type"/>
<keyword context="_statement_find_class" attribute="Statements" String="statements_role_transition"/>
<!-- Special contexts in statements -->
<keyword context="_statement_range_transition" attribute="Statements" String="statements_range_transition"/>
<keyword context="_statement_default" attribute="Statements" String="statements_default"/>
<keyword context="_statement_default_range" attribute="Statements" String="statements_default_range"/>
<keyword context="_statement_cexpr" attribute="Statements" String="statements_cexpr"/>
<!-- Detect identifier after statement -->
<keyword context="_find_identifier" attribute="Statements" String="statements_def"/>
<keyword context="_find_mls_level" attribute="Statements" String="statements_mls_level_def"/>
<keyword context="_find_mls_level_range" attribute="Statements" String="mls_range_def"/>
<keyword context="#stay" attribute="Statements" String="statements"/>
<keyword context="#stay" attribute="Statements" String="statements_fc"/>
<keyword context="#stay" attribute="Statements" String="keywords"/>
<keyword context="#stay" attribute="Expression Keys" String="cond_operators"/>
<!-- Keywords/Functions of M4 & Reference Policy -->
<WordDetect context="_function_gen_context" attribute="Refpolicy Keywords" String="gen_context"/>
<keyword context="#stay" attribute="Refpolicy Keywords" String="refpolicy_keywords"/>
<IncludeRules context="_m4_builtin_keywords"/>
<RegExpr context="#stay" attribute="Function" String="\b&identifier;(?=\()"/>
<!-- IP Addresses -->
<IncludeRules context="_ip_addr"/>
<!-- Keywords: Access Vectors Permissions & Filesystem -->
<IncludeRules context="_av_permissions"/>
<keyword context="#stay" attribute="Filesystem" String="filesystem"/>
<!-- Boolean Operators -->
<Detect2Chars context="#stay" attribute="Boolean Operators" char="=" char1="="/>
<Detect2Chars context="#stay" attribute="Boolean Operators" char="!" char1="="/>
<Detect2Chars context="#stay" attribute="Boolean Operators" char="&" char1="&"/>
<Detect2Chars context="#stay" attribute="Boolean Operators" char="|" char1="|"/>
<AnyChar context="#stay" attribute="Boolean Operators" String="!^"/>
<!-- Symbols/Operators -->
<DetectChar context="#stay" attribute="Operator" char="{" beginRegion="Bracket"/>
<DetectChar context="#stay" attribute="Operator" char="}" endRegion="Bracket"/>
<DetectChar context="#stay" char="(" beginRegion="ParenthesesBlock"/>
<DetectChar context="#stay" char=")" endRegion="ParenthesesBlock"/>
<Detect2Chars context="#stay" attribute="Operator" char="-" char1=">"/>
<AnyChar context="#stay" attribute="Operator" String="~[]"/>
<AnyChar context="#stay" attribute="Symbol" String=",;:-"/>
<IncludeRules context="_common_special_char"/>
<IncludeRules context="_line_continue_escape"/>
<!-- File Contexts -->
<RegExpr context="_file_contexts" attribute="File Contexts" String="\b&identifierWithArg;(?:\:&identifierWithArg;){2}(?:\:&mlsLevel;(?:\s*\-\s*&mlsLevel;)?)?\b" lookAhead="true"/>
<!-- This avoids highlighting numbers in identifiers -->
<RegExpr context="#stay" String="&identifier;"/>
<!-- Numbers -->
<RegExpr context="#stay" attribute="Number" String="\b&versionIdentifier;"/>
<HlCHex context="#stay" attribute="Hexadecimal"/>
<Float context="#stay" attribute="Number"/>
<Int context="#stay" attribute="Number"/>
<RegExpr context="#stay" attribute="Reserved Keywords" String="(?:\s|^)\-[bcdpls\-](?=\s|$)"/>
<DetectChar context="#stay" attribute="Symbol" char="."/>
</context>
<!-- Statements -->
<!-- Highlight class after ":", in some statements -->
<context name="_statement_find_class" attribute="Normal Text" lineEndContext="#stay">
<DetectChar context="#pop!_class" attribute="Symbol" char=":"/>
<DetectChar context="#pop" attribute="Symbol" char=";" lookAhead="true"/> <!-- End rule -->
<IncludeRules context="_normal"/>
</context>
<context name="_class" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<!-- Class -->
<RegExpr context="#pop" attribute="Class" String="\s*&identifier;(?=[^:\w\-\.,]|$)"/>
</context>
<!-- Special keywords in some statements -->
<context name="_statement_default" attribute="Normal Text" lineEndContext="#stay">
<keyword context="#stay" attribute="Reserved Keywords" String="source_target"/>
<DetectChar context="#pop" attribute="Symbol" char=";" lookAhead="true"/>
<IncludeRules context="_normal"/>
</context>
<context name="_statement_default_range" attribute="Normal Text" lineEndContext="#stay">
<keyword context="#stay" attribute="Range" String="range"/>
<IncludeRules context="_statement_default"/>
</context>
<context name="_statement_cexpr" attribute="Normal Text" lineEndContext="#stay">
<keyword context="#stay" attribute="Expression Keys" String="cexpr_operators"/>
<keyword context="#stay" attribute="Special Keys" String="cexpr_keywords"/>
<keyword context="#stay" attribute="Reserved Keywords" String="source_target"/>
<keyword context="#stay" attribute="Reserved Keywords" String="sameuser"/>
<DetectChar context="#pop" attribute="Symbol" char=";" lookAhead="true"/>
<IncludeRules context="_normal"/>
</context>
<context name="_statement_policycap" attribute="Normal Text" lineEndContext="#stay">
<keyword context="#stay" attribute="Policy Capability" String="policy_capabilities"/>
<DetectChar context="#pop" attribute="Symbol" char=";" lookAhead="true"/>
<IncludeRules context="_normal"/>
</context>
<!-- RANGE_TRANSITION: Highlight level/range and fix class after ":" -->
<context name="_statement_range_transition" attribute="Normal Text" lineEndContext="#stay">
<DetectChar context="#pop" attribute="Symbol" char=";" lookAhead="true"/>
<RegExpr context="_class_range_transition_statement" String="&identifierWithArg;\s*:\s*&identifierWithArg;\s+[a-zA-Z\$]" lookAhead="true"/>
<RegExpr context="#pop!_mls_level_range" String="&mls_level_range_ident;\s+\-\s+&identifierWithArg;|&mls_level_range_ident;(?:\s*\-\s*&mls_level_range_ident;)?(?=\s*;)" lookAhead="true" minimal="1"/>
<IncludeRules context="_normal"/>
</context>
<context name="_class_range_transition_statement" attribute="Normal Text" lineEndContext="#pop">
<DetectChar context="#pop!_class" attribute="Symbol" char=":"/>
<IncludeRules context="_m4_special_arguments"/>
<keyword context="#stay" attribute="Special Keys" String="self"/>
</context>
<!-- Detect identifier (highlight it as "Normal Text") -->
<context name="_find_identifier" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<IncludeRules context="_default_find_identifier"/>
<RegExpr context="#pop" attribute="Normal Text" String="&identifier;"/>
</context>
<context name="_default_find_identifier" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces context="#stay"/>
<IncludeRules context="_m4_preprocessor"/>
<IncludeRules context="_find_all_comments"/>
<RegExpr context="#pop" attribute="Function" String="\b&identifier;(?=\()" lookAhead="true"/>
</context>
<!-- Detect MLS/MCS Level (s0.s1:c0,c1) -->
<context name="_find_mls_level" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<IncludeRules context="_default_find_identifier"/>
<RegExpr context="#pop!_mls_level" String="&identifierWithArg;" lookAhead="true" minimal="1"/>
</context>
<!-- Detect MLS/MCS Range (s0:c0 - s1:c1) -->
<context name="_find_mls_level_range" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<IncludeRules context="_default_find_identifier"/>
<RegExpr context="#pop!_mls_level_range" String="&identifierWithArg;" lookAhead="true" minimal="1"/>
</context>
<!-- MLS/MCS Range: Sensitivity:Category - Sensitivity:Category -->
<context name="_mls_level_range" attribute="MLS/MCS Level/Range" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr context="#pop!_mls_level_range_cat" attribute="Symbol" String=":(?=&identifierWithArg;)"/> <!-- Find Category -->
<RegExpr context="#pop!_mls_level" attribute="Symbol" String="\s*\-\s*(?=&mlsLevel;)"/> <!-- Find Range -->
<RegExpr context="#stay" attribute="Symbol" String="\.(?=&identifierWithArg;)"/>
<IncludeRules context="_default_mls_level"/>
</context>
<context name="_mls_level_range_cat" attribute="MLS/MCS Level/Range" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr context="#pop!_mls_level" attribute="Symbol" String="\s*\-\s*(?=&mlsLevel;)"/> <!-- Find Range -->
<RegExpr context="#stay" attribute="Symbol" String="(?:\.|\s*,\s*)(?=&identifierWithArg;)"/>
<IncludeRules context="_default_mls_level"/>
</context>
<!-- MLS/MCS Level: Sensitivity:Category -->
<context name="_mls_level" attribute="MLS/MCS Level/Range" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr context="#pop!_mls_level_cat" attribute="Symbol" String=":(?=&identifierWithArg;)"/> <!-- Find Category -->
<RegExpr context="#stay" attribute="Symbol" String="\.(?=&identifierWithArg;)"/>
<IncludeRules context="_default_mls_level"/>
</context>
<context name="_mls_level_cat" attribute="MLS/MCS Level/Range" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr context="#stay" attribute="Symbol" String="(?:\.|\s*,\s*)(?=&identifierWithArg;)"/>
<IncludeRules context="_default_mls_level"/>
</context>
<context name="_default_mls_level" attribute="MLS/MCS Level/Range" lineEndContext="#pop">
<RegExpr context="#stay" attribute="MLS/MCS Level/Range" String="\w+"/>
<DetectChar context="#stay" attribute="MLS/MCS Level/Range" char="-"/>
<IncludeRules context="_m4_special_arguments"/>
</context>
<!-- Double Quotes String (does not support line breaks and line continuation escape) -->
<context name="_quoted" attribute="Text Quoted"
lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!_filename_quoted">
<RegExpr context="#pop!_path_quoted" attribute="Text Quoted" String="[^"/]*/" lookAhead="true"/> <!-- Find path -->
</context>
<context name="_filename_quoted" attribute="Text Quoted" lineEndContext="#pop">
<DetectChar context="#pop" attribute="Text Quoted" char="""/>
<IncludeRules context="_m4_special_arguments"/>
<RegExpr context="#stay" attribute="Text Quoted Open" String="[^\s"\\](?=\s*$)"/>
</context>
<context name="_path_quoted" attribute="Text Quoted" lineEndContext="#pop">
<DetectChar context="#pop" attribute="Text Quoted" char="""/>
<!-- Quote escaped is not allowed? (see line 260-261 in "selinux/checkpolicy/policy_scan.l") -->
<IncludeRules context="_m4_special_arguments"/>
<IncludeRules context="_regex_quoted"/>
<RegExpr context="#stay" attribute="Text Quoted Open" String="[^\s"\[\(\\](?=\s*$)"/>
</context>
<!-- Path -->
<context name="_path" attribute="Path" lineEndContext="#pop">
<DetectSpaces context="#pop" lookAhead="true"/>
<IncludeRules context="_m4_special_arguments"/>
<IncludeRules context="_regex"/>
</context>
<!-- Input Selectors: selector=value
NOTE: "seapp_contexts" in the Android policy use this. -->
<context name="_input_sel" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces context="#stay"/>
<DetectChar context="#stay" attribute="Symbol" char="="/>
<keyword context="#pop" attribute="Booleans" String="booleans"/>
<keyword context="#pop" attribute="Special Keys" String="self"/>
<DetectChar context="#pop" char=""" lookAhead="true"/>
<RegExpr context="#pop" attribute="Normal Text" String="&identifier;(?=[,;]?(?:\s|$))"/>
<!-- Find RegExp -->
<AnyChar context="#pop!_path" String="[(" lookAhead="true"/>
<RegExpr context="#pop!_path" String="[^\=\s"\{\}\[\]\(\);#]+[\{\[\(\*\+\?]|[^\=\s"\{\}\[\]\(\);#\d]+\." lookAhead="true"/>
</context>
<!-- Special functions of Refpolicy -->
<context name="_function_gen_context" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectChar context="#pop!_function_gen_context_find_fc" attribute="Normal Text" char="(" beginRegion="ParenthesesBlock"/>
</context>
<context name="_function_gen_context_find_fc" attribute="File Contexts"
lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!_function_gen_context_content">
<RegExpr context="_file_contexts" String="&identifierWithArg;(?:\:&identifierWithArg;){2}\b" lookAhead="true"/>
<DetectSpaces context="#stay"/>
</context>
<context name="_function_gen_context_content" attribute="File Contexts" lineEndContext="#pop">
<DetectChar context="#pop" attribute="Normal Text" char=")" endRegion="ParenthesesBlock"/>
<AnyChar context="#stay" attribute="Normal Text" String=".:-"/>
<AnyChar context="#stay" attribute="Symbol" String=",;"/>
<IncludeRules context="_m4_special_arguments"/>
<IncludeRules context="_find_all_comments"/>
<IncludeRules context="_common_special_char"/>
<IncludeRules context="_line_continue_escape"/>
</context>
<!-- File Contexts.
NOTE: File contexts with spaces before and after each ":" are not highlighted. -->
<!-- user:role:type -->
<context name="_file_contexts" attribute="File Contexts" lineEndContext="#pop">
<DetectChar context="#pop!_fc_role" attribute="Symbol" char=":"/>
<IncludeRules context="_m4_special_arguments"/>
</context>
<context name="_fc_role" attribute="File Contexts" lineEndContext="#pop">
<DetectChar context="#pop!_fc_type" attribute="Symbol" char=":"/>
<IncludeRules context="_m4_special_arguments"/>
</context>
<context name="_fc_type" attribute="File Contexts (Type Enforcement)" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!_after_fc">
<RegExpr context="#pop!_fc_level_range" attribute="Symbol" String=":(?=&mlsLevel;)"/> <!-- Find Level/Range -->
<RegExpr context="#stay" attribute="File Contexts (Type Enforcement)" String="\.?[\w\-]+|\.(?=\$)"/>
<IncludeRules context="_m4_special_arguments"/>
</context>
<!-- (MLS/MCS) user:role:type:level -->
<context name="_fc_level_range" attribute="File Contexts" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!_after_fc">
<RegExpr context="#pop!_fc_level_range_cat" attribute="Symbol" String=":(?=&identifierWithArg;)"/> <!-- Find Category -->
<RegExpr context="#pop!_fc_level" attribute="Symbol" String="\s*\-\s*(?=&mlsLevel;)"/> <!-- Find Range -->
<RegExpr context="#stay" attribute="Symbol" String="\.(?=&identifierWithArg;)"/>
<IncludeRules context="_default_fc_level"/>
</context>
<context name="_fc_level_range_cat" attribute="File Contexts" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!_after_fc">
<RegExpr context="#pop!_fc_level" attribute="Symbol" String="\s*\-\s*(?=&mlsLevel;)"/> <!-- Find Range -->
<RegExpr context="#stay" attribute="Symbol" String="(?:\.|\s*,\s*)(?=&identifierWithArg;)"/>
<IncludeRules context="_default_fc_level"/>