All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: jwcart2@tycho.nsa.gov
Cc: "Christopher J. PeBenito" <cpebenito@tresys.com>,
	SELinux <selinux@tycho.nsa.gov>,
	Steve Smalley <sds@epoch.ncsc.mil>
Subject: Re: Question concerning building policy modules
Date: Wed, 22 Aug 2007 12:31:55 -0400	[thread overview]
Message-ID: <46CC64FB.7010902@redhat.com> (raw)
In-Reply-To: <1187799601.20340.24.camel@moss-lions.epoch.ncsc.mil>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

James Carter wrote:
> On Tue, 2007-08-21 at 16:58 -0400, Daniel J Walsh wrote:
>> James Carter wrote:
>>> Why isn't the Makefile and other information needed to build a module
>>> separately in the appropriate /usr/share/selinux/<policy name>
>>> directory?  This seems like the logical place for that information.  The
>>> (not very well documented) "install-headers" make target in the
>>> refpolicy Makefile does this.
>>>
>>> Instead, the information to build a module for Fedora is in
>>> the /usr/share/selinux/devel directory.  This directory would seem to be
>>> independent of the policy type, even though it is only for building
>>> Fedora policies.  This seems confusing.  The devel directory should have
>>> stuff that all policies need or could use.
>>>
>>> Wouldn't it make sense that if I wanted to build a module for the
>>> current policy, I would use the Makefile in devel which would look
>>> at /etc/selinux/config and include the Makefile for the current policy,
>>> but if I wanted to compile for a particular policy, I would just use the
>>> Makefile in its /usr/share directory?
>>>
>>>   
>> This is an old argument, between strict and targeted policy.   I did not 
>> like the idea of building
>> policy modules different for each type of policy,  Since almost everyone 
>> is exactly the same or would not work on different policies.  This seems 
>> to be proven to be correct as we move to strict/targeted policy merge. 
>>
>> So you add a level of complexity with very little value.  
> I don't think my scheme is very complex and it is certainly less
> confusing.  I will, however, concede that it does cause difficulties to
> the poor person trying to package Fedora policy.  I suppose that
> selinux-policy-devel would have to create strict/include,
> targeted/include, and mls/include.
> 
>> Just imagine a 
>> third party shipping multiple policies for the
>> same package depending on an infinite number of policy packages.
>>
>> targeted, strict, mls, olpc, CDS-ABC.
>>
>> And almost guaranteed the same policy package would work for all or the 
>> package will only really work on one (MLS).  So I went with the least 
>> common denominator and only ship one devel package.  
> Which is certainly easier.
> 
> This patch would at least make it possible to use the devel/Makefile
> with refpolicy.  How about a compromise?
> 
> --- Makefile.old	2007-08-22 06:06:48.000000000 -0400
> +++ Makefile	2007-08-22 07:51:27.000000000 -0400
> @@ -16,9 +16,20 @@
>  ifeq ($(NAME), mls)
>  	NAME = strict
>  	MCSFLAG = -mls
> +	TYPE ?= $(NAME)${MCSFLAG}
> +	HEADERDIR = $(SHAREDIR)/devel/include
>  endif
>  
> -TYPE ?= $(NAME)${MCSFLAG}
> -HEADERDIR := $(SHAREDIR)/devel/include
> +ifeq ($(NAME), strict)
> +	TYPE ?= $(NAME)${MCSFLAG}
> +	HEADERDIR = $(SHAREDIR)/devel/include
> +endif
> +
> +ifeq ($(NAME), targeted)
> +	TYPE ?= $(NAME)${MCSFLAG}
> +	HEADERDIR = $(SHAREDIR)/devel/include
> +endif
> +
> +HEADERDIR ?= $(SHAREDIR)/$(NAME)/include
>  include $(HEADERDIR)/Makefile
>  
> 
You want this change in F-7 and RHEL5?  This file has changed with the
merging of strict/targeted
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGzGT6rlYvE4MpobMRAsbdAJ0dvcs88uTp66brdQkdBMZHeyBvWQCfX1Cv
9XqoxwuEGqhQni3J9fs1Uzo=
=fgH+
-----END PGP SIGNATURE-----

--
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:[~2007-08-22 16:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 18:50 Question concerning building policy modules James Carter
2007-08-21 20:58 ` Daniel J Walsh
2007-08-22 11:13   ` Stephen Smalley
2007-08-22 12:18     ` Daniel J Walsh
2007-08-22 12:57     ` Christopher J. PeBenito
2007-08-22 15:57       ` James Carter
2007-08-22 17:04         ` Christopher J. PeBenito
2007-08-22 16:20   ` James Carter
2007-08-22 16:31     ` Daniel J Walsh [this message]
2007-08-22 16:41       ` James Carter
2007-08-22 16:31   ` James Carter
2007-08-22 16:48     ` Daniel J Walsh
2007-08-22 17:01       ` James Carter
2007-08-22 18:36         ` Daniel J Walsh
2007-08-23 13:58           ` Christopher J. PeBenito

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=46CC64FB.7010902@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=cpebenito@tresys.com \
    --cc=jwcart2@tycho.nsa.gov \
    --cc=sds@epoch.ncsc.mil \
    --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.