Move role declarations to the top of base.conf
PATCH 1/1 Move role declarations to the top of base.conf
system_r is required by the policy_module macro, which however will be expanded as empty if the module is built into base.pp. system_r is defined in the kernel.te, its definition should be moved to the top of base.conf so that other modules copied earlier into base.conf than kernel.te could reference system_r in their unconditional block properly.
--- support/comment_move_decl.sed | 1 + support/get_type_attr_decl.sed | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletions(-)
support/comment_move_decl.sed +1 -0
@@ -10,5 +10,6 @@ /^[[:blank:]]*fs_use_(xattr|task|trans) /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*sid /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*bool /s/^/# this line was moved by the build process: &/ +/^[[:blank:]]*role[[:blank:]]+[a-zA-Z_]+[[:blank:]]*;/s/^/# this line was moved by the build process: &/ :nextline
support/get_type_attr_decl.sed +6 -1
@@ -1,5 +1,5 @@ #n -# print out type and attribute declarations that +# print out type, role and attribute declarations that # are not inside require and optional blocks. /require \{/,/} # end require/b nextline
@@ -10,4 +10,9 @@ p } +/^[[:blank:]]*role[[:blank:]]+[a-zA-Z_]+[[:blank:]]*;/{ + s/^[[:blank:]]+// + p +} + :nextline
Signature · 1 line
1.7.0.4
PATCH 1/1 Move role declarations to the top of base.conf
Quoted 6 lines · Harry Ciao
system_ris required by thepolicy_modulemacro, which however will be expanded as empty if the module is built into base.pp.system_ris defined in the kernel.te, its definition should be moved to the top of base.conf so that other modules copied earlier into base.conf than kernel.te could referencesystem_rin their unconditional block properly.
Merged.
Quoted 38 lines
Signed-off-by Harry Ciao <[email protected]>--- support/comment_move_decl.sed | 1 + support/get_type_attr_decl.sed | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletions(-)support/comment_move_decl.sed +1
-0@@ -10,5 +10,6 @@ /^[[:blank:]]*fs_use_(xattr|task|trans) /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*sid /s/^/# this line was moved by the build process: &/ /^[[:blank:]]*bool /s/^/# this line was moved by the build process: &/ +/^[[:blank:]]*role[[:blank:]]+[a-zA-Z_]+[[:blank:]]*;/s/^/# this line was moved by the build process: &/ :nextlinesupport/get_type_attr_decl.sed +6
-1@@ -1,5 +1,5 @@ #n -# print out type and attribute declarations that +# print out type, role and attribute declarations that # are not inside require and optional blocks. /require \{/,/} # end require/b nextline@@ -10,4 +10,9 @@ p } +/^[[:blank:]]*role[[:blank:]]+[a-zA-Z_]+[[:blank:]]*;/{ + s/^[[:blank:]]+// + p +} + :nextline
Signature · 3 lines
Chris PeBenito Tresys Technology, LLC www.tresys.com | oss.tresys.com