Re: [v0 PATCH 2/5] Make role_transition parser to handle class field

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Paris wrote:
On Wed, 2011-03-23 at 10:28 +0800, Harry Ciao wrote:
From: Harry Ciao<harrytaurus2002@xxxxxxxxxxx>

If no class is specified in the role_transition rule, then it would
be set to the "process" class by default.

Signed-off-by: Harry Ciao<qingtao.cao@xxxxxxxxxxxxx>
---
  checkpolicy/policy_define.c |   89 ++++++++++++++++++++++++++++++++-----------
  checkpolicy/policy_define.h |    2 +-
  checkpolicy/policy_parse.y  |    4 +-
  3 files changed, 71 insertions(+), 24 deletions(-)

diff --git a/checkpolicy/policy_define.c b/checkpolicy/policy_define.c
index 82ab44c..6c28d8a 100644
--- a/checkpolicy/policy_define.c
+++ b/checkpolicy/policy_define.c
@@ -2050,17 +2050,18 @@ static int set_roles(role_set_t * set, char *id)
  	return 0;
  }

-int define_role_trans(void)
+int define_role_trans(int class_specified)
  {
  	char *id;
  	role_datum_t *role;
  	role_set_t roles;
  	type_set_t types;
-	ebitmap_t e_types, e_roles;
-	ebitmap_node_t *tnode, *rnode;
+	class_datum_t *cladatum;
+	ebitmap_t e_types, e_roles, classes;

minor nit, most of this code uses e_* for ebitmaps.  You don't need to
change that.....


There is only a single instance of e_* for ebitmaps in checkpolicy (which is what this patch is against)

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@xxxxxxxxxxxxx with
the words "unsubscribe selinux" without quotes as the message.


[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux