All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: "Carlos Anísio Monteiro" <monteiro@ipen.br>
Cc: selinux <selinux@tycho.nsa.gov>
Subject: Re: Type attributes
Date: Thu, 27 Nov 2003 13:07:08 +1100	[thread overview]
Message-ID: <200311271307.08680.russell@coker.com.au> (raw)
In-Reply-To: <1069857041.30315.72.camel@moss-spartans.epoch.ncsc.mil>

On Thu, 27 Nov 2003 01:30, Stephen Smalley <sds@epoch.ncsc.mil> wrote:
> Answer:  Yes.  At one time, type attribute names were implicitly
> declared upon their first use in a type declaration, but explicit
> declarations were added and required to allow the compiler to catch
> mistakes.  Type attribute names are typically declared in attrib.te.

Currently the published policy only has them declared in attrib.te.  I 
strongly recommend that this practise be continued.

As Stephen explains below a defined attribute does not have to be used.  One 
thing he did not mention is that a defined attribute which is not used has no 
affect on the policy binary (try adding some attributes that are not assigned 
to any types and you will notice that the md5sum of the compiled policy does 
not change).

So there is no cost to defining extra attributes.

> etc).  Also, you may end up violation an assertion if you fail to use
> the attribute, as assertions are often based on attributes.

Recently I have been adding new assertions to more strictly check these 
things.  So a policy which creates a process type without the "domain" 
attribute will not compile.  These assertions unfortunately significantly 
increase the time taken to compile the policy, however there are only a small 
number of people who do thousands of compiles of policy, but a large number 
of people who might be expected to make such mistakes so the net result is 
positive.

Also I found a few policy mistakes that I had made when I added these 
rules.  ;)

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page


--
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.

      reply	other threads:[~2003-11-27  2:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-26 13:43 Type attributes Carlos Anísio Monteiro
2003-11-26 14:30 ` Stephen Smalley
2003-11-27  2:07   ` Russell Coker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200311271307.08680.russell@coker.com.au \
    --to=russell@coker.com.au \
    --cc=monteiro@ipen.br \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.