Skip to content

Commit b9a113c

Browse files
committed
Don't use keyword "other" which is a reserved word in newer CIL policies
1 parent 40f794b commit b9a113c

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

data/expected_cil/non_virtual_inherit.cil

+11-11
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@
139139
(type kernel_sid)
140140
(roletype system_r kernel_sid)
141141
(typeattributeset domain (kernel_sid))
142-
(type other)
143-
(roletype system_r other)
144-
(typeattributeset domain (other))
145142
(type security_sid)
146143
(roletype object_r security_sid)
147144
(typeattributeset resource (security_sid))
145+
(type some_other)
146+
(roletype system_r some_other)
147+
(typeattributeset domain (some_other))
148148
(type unlabeled_sid)
149149
(roletype object_r unlabeled_sid)
150150
(typeattributeset resource (unlabeled_sid))
@@ -155,23 +155,23 @@
155155
(roletype system_r qux)
156156
(typeattributeset domain (qux))
157157
(macro bar-read ((type this) (type source)) (allow source this (file (read open getattr))))
158-
(macro baz-reference_foo ((type this) (type other)) (allow other bar (file (setattr))) (allow other foo (file (setattr))))
158+
(macro baz-reference_foo ((type this) (type some_other)) (allow some_other bar (file (setattr))) (allow some_other foo (file (setattr))))
159159
(macro foo-read ((type this) (type source)) (allow source this (file (read open getattr))))
160-
(macro qux-reference_foo ((type this) (type other)) (allow other bar (file (setattr))) (allow other foo (file (setattr))))
160+
(macro qux-reference_foo ((type this) (type some_other)) (allow some_other bar (file (setattr))) (allow some_other foo (file (setattr))))
161161
(call bar-read (bar baz))
162162
(call bar-read (bar qux))
163-
(call baz-reference_foo (baz other))
164-
(call baz-reference_foo (qux other))
163+
(call baz-reference_foo (baz some_other))
164+
(call baz-reference_foo (qux some_other))
165165
(allow baz bar (file (write)))
166166
(allow baz foo (file (write)))
167167
(allow qux bar (dir (write)))
168168
(allow qux bar (file (write)))
169169
(allow qux foo (dir (write)))
170170
(allow qux foo (file (write)))
171-
(typetransition baz bar process other)
172-
(typetransition baz foo process other)
173-
(typetransition qux bar process other)
174-
(typetransition qux foo process other)
171+
(typetransition baz bar process some_other)
172+
(typetransition baz foo process some_other)
173+
(typetransition qux bar process some_other)
174+
(typetransition qux foo process some_other)
175175
(sid kernel)
176176
(sidcontext kernel (system_u system_r kernel_sid ((s0) (s0))))
177177
(sid security)

data/policies/non_virtual_inherit.cas

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ resource bar inherits foo {}
1010
domain baz {
1111
bar.read();
1212
allow(this, foo, file, write);
13-
domain_transition(this, foo, other);
13+
domain_transition(this, foo, some_other);
1414

15-
fn reference_foo(domain other) {
16-
allow(other, foo, file, setattr);
15+
fn reference_foo(domain some_other) {
16+
allow(some_other, foo, file, setattr);
1717
}
1818
}
1919

2020
domain qux inherits baz {
2121
allow(this, foo, dir, write);
2222
}
2323

24-
domain other {
24+
domain some_other {
2525
baz.reference_foo(this);
2626
}
2727

src/test.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -757,11 +757,11 @@ fn non_virtual_inherit_test() {
757757
"(allow qux bar (file (write)))",
758758
"(allow qux foo (dir (write)))",
759759
"(allow qux bar (dir (write)))",
760-
"(typetransition baz bar process other)",
761-
"(typetransition baz foo process other)",
762-
"(typetransition qux bar process other)",
763-
"(typetransition qux foo process other)",
764-
"(macro baz-reference_foo ((type this) (type other)) (allow other bar (file (setattr))) (allow other foo (file (setattr))))",
760+
"(typetransition baz bar process some_other)",
761+
"(typetransition baz foo process some_other)",
762+
"(typetransition qux bar process some_other)",
763+
"(typetransition qux foo process some_other)",
764+
"(macro baz-reference_foo ((type this) (type some_other)) (allow some_other bar (file (setattr))) (allow some_other foo (file (setattr))))",
765765
],
766766
&["(allow baz foo (dir (write)))"],
767767
0);

0 commit comments

Comments
 (0)