Re: [PATCH 1/1] selinux: add support for installing a dummy policy (v2)

Previous thread: [PATCH] Export kmap_atomic_pfn for DRM-GEM. by Eric Anholt on Tuesday, August 26, 2008 - 12:43 pm. (9 messages)

Next thread: [PATCH 1/2] rcu: spinlocks take an unsigned long flags by Harvey Harrison on Tuesday, August 26, 2008 - 1:00 pm. (4 messages)
From: Serge E. Hallyn
Date: Tuesday, August 26, 2008 - 12:47 pm

This is a resend taking into account feedback from the last posting.
The Documentation/SELinux.txt file should as Stephen pointed out, have
general SELinux info.  I'm hoping someone will send a patch adding that,
perhaps in the form of a set of links to the latest and greatest online
docs.

=======================================================================

In August 2006 I posted a patch generating a minimal SELinux policy.  This
week, David P. Quigley posted an updated version of that as a patch against
the kernel.  It also had nice logic for auto-installing the policy.

Following is David's original patch intro (preserved especially
bc it has stats on the generated policies):

se interested in the changes there were only two significant
changes. The first is that the iteration through the list of classes
used NULL as a sentinel value. The problem with this is that the
class_to_string array actually has NULL entries in its table as place
holders for the user space object classes.

The second change was that it would seem at some point the initial sids
table was NULL terminated. This is no longer the case so that iteration
has to be done on array length instead of looking for NULL.

Some statistics on the policy that it generates:

The policy consists of 523 lines which contain no blank lines. Of those
523 lines 453 of them are class, permission, and initial sid
definitions. These lines are usually little to no concern to the policy
developer since they will not be adding object classes or permissions.
Of the remaining 70 lines there is one type, one role, and one user
statement. The remaining lines are broken into three portions. The first
group are TE allow rules which make up 29 of the remaining lines, the
second is assignment of labels to the initial sids which consist of 27
lines, and file system labeling statements which are the remaining 11.

In addition to the policy.conf generated there is a single file_contexts
file containing two lines which labels the ...
From: James Morris
Date: Wednesday, August 27, 2008 - 5:45 pm

Applied to 
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next


-- 
James Morris
<jmorris@namei.org>
--

Previous thread: [PATCH] Export kmap_atomic_pfn for DRM-GEM. by Eric Anholt on Tuesday, August 26, 2008 - 12:43 pm. (9 messages)

Next thread: [PATCH 1/2] rcu: spinlocks take an unsigned long flags by Harvey Harrison on Tuesday, August 26, 2008 - 1:00 pm. (4 messages)