From: Daniel J Walsh <dwalsh@redhat.com>
To: "Christopher J. PeBenito" <cpebenito@tresys.com>
Cc: Michael C Thompson <thompsmc@us.ibm.com>,
SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Default Mikefile in /usr/share/selinux/devel not nice
Date: Mon, 02 Oct 2006 16:47:46 -0400 [thread overview]
Message-ID: <45217AF2.60701@redhat.com> (raw)
In-Reply-To: <1159803204.14831.34.camel@sgc>
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
Christopher J. PeBenito wrote:
> On Mon, 2006-10-02 at 10:20 -0500, Michael C Thompson wrote:
>
>> Chris PeBenito wrote:
>>
>>> On Fri, 2006-09-29 at 16:12 -0500, Michael C Thompson wrote:
>>>
>>>> I just discovered a nasty surprise waiting for me in the default
>>>> Makefile provided by selinux-policy-devel.
>>>>
>>>> Basically, the Makefile produces, on an MLS system, a TYPE value of
>>>> mls-msc (this is due to the SELINUXTYPE=mls line in
>>>> /etc/selinux/config). This will not 'enable_mls' for the M4FLAGS,
>>>> because the Makefile in /usr/share/selinux/devel/include/ does a
>>>> findstring for '-mls'.
>>>>
>>>> Dan Walsh has suggested a fix for the default Makefile, but I'm
>>>> wondering why we can't just change
>>>> /usr/share/selinux/devel/include/Makefile to do a $(findstring
>>>> mls,$TYPE)) instead, since its not unreasonable to think that TYPE=mls
>>>> makes sense.
>>>>
>>> There is some confusion here, the SELINUXTYPE is not the same as TYPE in
>>> refpolicy, it is NAME in refpolicy. The TYPE of the Redhat MLS policy
>>> is strict-mls. TYPE=mls does not make sense, since it does not specify
>>> if the policy is strict or targeted.
>>>
>> Are there flags (like 'enable_mls') in the policy which require this
>> delineation?
>>
>
> Yes, strict_policy and targeted_policy.
>
>
The latest Makefile in 2.3.17-2 should work properly.
[-- Attachment #2: Makefile --]
[-- Type: text/plain, Size: 437 bytes --]
# installation paths
SHAREDIR := /usr/share/selinux
AWK ?= gawk
NAME ?= $(strip $(shell $(AWK) -F= '/^SELINUXTYPE/{ print $$2 }' /etc/selinux/config))
MLSENABLED := $(shell cat /selinux/mls)
ifeq ($(MLSENABLED),)
MLSENABLED := 1
endif
ifeq ($(MLSENABLED),1)
MCSFLAG=-mcs
endif
ifeq ($(NAME), mls)
NAME = strict
MCSFLAG = -mls
endif
TYPE ?= $(NAME)${MCSFLAG}
HEADERDIR := $(SHAREDIR)/devel/include
include $(HEADERDIR)/Makefile
prev parent reply other threads:[~2006-10-02 22:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-29 21:12 Default Mikefile in /usr/share/selinux/devel not nice Michael C Thompson
2006-09-30 4:32 ` Chris PeBenito
2006-10-02 15:20 ` Michael C Thompson
2006-10-02 15:33 ` Christopher J. PeBenito
2006-10-02 20:47 ` Daniel J Walsh [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=45217AF2.60701@redhat.com \
--to=dwalsh@redhat.com \
--cc=cpebenito@tresys.com \
--cc=selinux@tycho.nsa.gov \
--cc=thompsmc@us.ibm.com \
/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.