Research
.
Skip Search Box

SELinux Mailing List

Re: [PATCH] Basic policy representation

From: Stephen Smalley <sds_at_tycho.nsa.gov>
Date: Tue, 08 May 2007 12:50:53 -0400


On Tue, 2007-05-08 at 10:45 -0400, Joshua Brindle wrote:
> Karl MacMillan wrote:
>snip>
> > +static char *typeid_strings[] = {
> > + "none",
> > + "object",
> > + "parent",
> > + "policy",
> > + "module",
> > + "block",
> > + "cond",
> > + "optional",
> > + "type",
> > + "class",
> > + "attribute",
> > + "typealias",
> > + "boolean",
> > + "avrule",
> > + "typerule",
> > + "security context",
> > + "initial sid",
> > + "typeattribute",
> > + "conditional expression",
> > + "sensitivity",
> > + "dominance",
> > + "category",
> > + "role dominance",
> > + "role"
> > +};
> > +
> >
> It would be nice if these were in the same place as the enum so they
> could be updated easier, but I understand that the strings are private
> and the enum is exported :\

One thing that would make them nicer for maintenance and readability would be explicit indices in the array definition here, ala: static char *typeid_strings[] = {
[SEPOL_TYPEID_NONE] = "none",
[SEPOL_TYPEID_OBJECT] = "object",
...

-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Tue 8 May 2007 - 12:50:56 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service