* [refpolicy] [v1 PATCH 1/1] Move role declarations to the top of base.conf
@ 2012-02-29 8:16 Harry Ciao
2012-02-29 17:59 ` Christopher J. PeBenito
0 siblings, 1 reply; 2+ messages in thread
From: Harry Ciao @ 2012-02-29 8:16 UTC (permalink / raw)
To: refpolicy
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.
Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
---
| 1 +
support/get_type_attr_decl.sed | 7 ++++++-
2 files changed, 7 insertions(+), 1 deletions(-)
--git a/support/comment_move_decl.sed b/support/comment_move_decl.sed
index 601c4f7..00b94b6 100644
--- a/support/comment_move_decl.sed
+++ b/support/comment_move_decl.sed
@@ -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
diff --git a/support/get_type_attr_decl.sed b/support/get_type_attr_decl.sed
index 69c6ccd..5c7a6a8 100644
--- a/support/get_type_attr_decl.sed
+++ b/support/get_type_attr_decl.sed
@@ -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
--
1.7.0.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [refpolicy] [v1 PATCH 1/1] Move role declarations to the top of base.conf
2012-02-29 8:16 [refpolicy] [v1 PATCH 1/1] Move role declarations to the top of base.conf Harry Ciao
@ 2012-02-29 17:59 ` Christopher J. PeBenito
0 siblings, 0 replies; 2+ messages in thread
From: Christopher J. PeBenito @ 2012-02-29 17:59 UTC (permalink / raw)
To: refpolicy
On 02/29/12 03:16, Harry Ciao wrote:
> 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.
Merged.
> Signed-off-by: Harry Ciao <qingtao.cao@windriver.com>
> ---
> support/comment_move_decl.sed | 1 +
> support/get_type_attr_decl.sed | 7 ++++++-
> 2 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/support/comment_move_decl.sed b/support/comment_move_decl.sed
> index 601c4f7..00b94b6 100644
> --- a/support/comment_move_decl.sed
> +++ b/support/comment_move_decl.sed
> @@ -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
> diff --git a/support/get_type_attr_decl.sed b/support/get_type_attr_decl.sed
> index 69c6ccd..5c7a6a8 100644
> --- a/support/get_type_attr_decl.sed
> +++ b/support/get_type_attr_decl.sed
> @@ -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
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-29 17:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-29 8:16 [refpolicy] [v1 PATCH 1/1] Move role declarations to the top of base.conf Harry Ciao
2012-02-29 17:59 ` Christopher J. PeBenito
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.