|
| 1 | +class infoflow |
| 2 | +class infoflow2 |
| 3 | +class infoflow3 |
| 4 | +class infoflow4 |
| 5 | +class infoflow5 |
| 6 | +class infoflow6 |
| 7 | +class infoflow7 |
| 8 | + |
| 9 | +sid kernel |
| 10 | +sid security |
| 11 | + |
| 12 | +common infoflow |
| 13 | +{ |
| 14 | + low_w |
| 15 | + med_w |
| 16 | + hi_w |
| 17 | + low_r |
| 18 | + med_r |
| 19 | + hi_r |
| 20 | +} |
| 21 | + |
| 22 | +class infoflow |
| 23 | +inherits infoflow |
| 24 | + |
| 25 | +class infoflow2 |
| 26 | +inherits infoflow |
| 27 | +{ |
| 28 | + super_w |
| 29 | + super_r |
| 30 | +} |
| 31 | + |
| 32 | +class infoflow3 |
| 33 | +{ |
| 34 | + null |
| 35 | +} |
| 36 | + |
| 37 | +class infoflow4 |
| 38 | +inherits infoflow |
| 39 | + |
| 40 | +class infoflow5 |
| 41 | +inherits infoflow |
| 42 | + |
| 43 | +class infoflow6 |
| 44 | +inherits infoflow |
| 45 | + |
| 46 | +class infoflow7 |
| 47 | +inherits infoflow |
| 48 | +{ |
| 49 | + super_w |
| 50 | + super_r |
| 51 | + super_none |
| 52 | + super_both |
| 53 | + super_unmapped |
| 54 | +} |
| 55 | + |
| 56 | +sensitivity low_s; |
| 57 | +sensitivity medium_s alias med; |
| 58 | +sensitivity high_s; |
| 59 | + |
| 60 | +dominance { low_s med high_s } |
| 61 | + |
| 62 | +category here; |
| 63 | +category there; |
| 64 | +category elsewhere alias lost; |
| 65 | + |
| 66 | +#level decl |
| 67 | +level low_s:here.there; |
| 68 | +level med:here, elsewhere; |
| 69 | +level high_s:here.lost; |
| 70 | + |
| 71 | +#some constraints |
| 72 | +mlsconstrain infoflow hi_r ((l1 dom l2) or (t1 == mls_exempt)); |
| 73 | + |
| 74 | +attribute mls_exempt; |
| 75 | + |
| 76 | +type system; |
| 77 | +role system; |
| 78 | +role system types system; |
| 79 | + |
| 80 | +################################################################################ |
| 81 | +# Type enforcement declarations and rules |
| 82 | + |
| 83 | +allow system system:infoflow3 null; |
| 84 | + |
| 85 | +######################################## |
| 86 | +# |
| 87 | +# Role Query |
| 88 | +# |
| 89 | + |
| 90 | +# test 1 |
| 91 | +type test1; |
| 92 | + |
| 93 | +# test 2 |
| 94 | +role test2ra; |
| 95 | +role test2rb; |
| 96 | +type test2a; |
| 97 | +type test2b; |
| 98 | +role test2ra types { test2a test2b }; |
| 99 | +role test2rb types test2b; |
| 100 | + |
| 101 | +# test 3 |
| 102 | + |
| 103 | +role test3ra; |
| 104 | +role test3rb; |
| 105 | +role test3rc; |
| 106 | +role test3rd; |
| 107 | +type test3a; |
| 108 | +type test3b; |
| 109 | +type test3c; |
| 110 | +type test3d; |
| 111 | +role test3ra types { test3b test3c test3d }; |
| 112 | +role test3rb types { test3a test3c test3d }; |
| 113 | +role test3rc types { test3a test3b test3d }; |
| 114 | +role test3rd types { test3a test3b test3c }; |
| 115 | + |
| 116 | +################################################################################ |
| 117 | + |
| 118 | +#users |
| 119 | +user system roles system level med range low_s - high_s:here.lost; |
| 120 | + |
| 121 | +#normal constraints |
| 122 | +constrain infoflow hi_w (u1 == u2); |
| 123 | + |
| 124 | +#isids |
| 125 | +sid kernel system:system:system:medium_s:here |
| 126 | +sid security system:system:system:high_s:lost |
| 127 | + |
| 128 | +#fs_use |
| 129 | +fs_use_trans devpts system:object_r:system:low_s; |
| 130 | +fs_use_xattr ext3 system:object_r:system:low_s; |
| 131 | +fs_use_task pipefs system:object_r:system:low_s; |
| 132 | + |
| 133 | +#genfscon |
| 134 | +genfscon proc / system:object_r:system:med |
| 135 | +genfscon proc /sys system:object_r:system:low_s |
| 136 | +genfscon selinuxfs / system:object_r:system:high_s:here.there |
| 137 | + |
| 138 | +portcon tcp 80 system:object_r:system:low_s |
| 139 | + |
| 140 | +netifcon eth0 system:object_r:system:low_s system:object_r:system:low_s |
| 141 | + |
| 142 | +nodecon 127.0.0.1 255.255.255.255 system:object_r:system:low_s:here |
| 143 | +nodecon ::1 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff system:object_r:system:low_s:here |
| 144 | + |
0 commit comments