selinux: Re: [PATCH] checkpolicy: implement handling of unknown
Re: [PATCH] checkpolicy: implement handling of unknown classes andpermissions
From: Christopher J. PeBenito <cpebenito_at_nospam>
Date: Fri Sep 21 2007 - 17:27:24 GMT To: Stephen Smalley <sds@tycho.nsa.gov>
On Tue, 2007-09-18 at 15:48 -0400, Stephen Smalley wrote:
> On Thu, 2007-09-06 at 14:26 -0400, Eric Paris wrote: > > Add a new command line options, -U (allow,reject,deny), to > checkmodule > > and checkpolicy which sets the handle_unknown config flag. Default > to > > deny unknowns which is how things have been in the past. Also add > > dismod and dispol support. > > > > -Eric > > Thanks, merged as of checkpolicy 2.0.4. > > Chris/Dan: we need some way to select the flag setting for the policy > build. The -U {allow,reject,deny} setting needs to be passed to > checkmodule _only_ when building the base module, or to checkpolicy > when > building a monolithic policy.
Here is a patch for this, I haven't committed this to trunk yet, as I'd
prefer to wait for the next stable release of the toolchain (when its
that, btw?).
+# Unknown Permissions Handling
+# The behavior for handling permissions defined in the
+# kernel but missing from the policy. The permissions
+# can either be allowed, denied, or the policy loading
+# can be rejected.
+# allow, deny, and reject are current options.
+UNK_PERMS = deny
+
# Direct admin init
# Setting this will allow sysadm to directly
# run init scripts, instead of requring run_init.
Index: Rules.modular
Rules.monolithic (revision 2425)
+++ Rules.monolithic (working copy)
@@ -70,7 +70,7 @@
@echo "WARNING: Policy version mismatch! Is your OUTPUT_POLICY set correctly?"
@echo
endif
- $(verbose) $(CHECKPOLICY) $^ -o $@
+ $(verbose) $(CHECKPOLICY) -U $(UNK_PERMS) $^ -o $@
########################################
#
@@ -84,7 +84,7 @@
@echo "WARNING: Policy version mismatch! Is your OUTPUT_POLICY set correctly?"
@echo
endif
- $(verbose) $(CHECKPOLICY) $^ -o $@
+ $(verbose) $(CHECKPOLICY) -U $(UNK_PERMS) $^ -o $@
########################################
#
--
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150
--
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.