All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Paul Howarth <paul@city-fan.org>
Cc: KaiGai Kohei <kaigai@kaigai.gr.jp>,
	Stephen Smalley <sds@tycho.nsa.gov>,
	selinux@tycho.nsa.gov, fedora-selinux-list@redhat.com
Subject: Re: Guideline for RPM packages
Date: Thu, 26 Jul 2007 17:57:26 +0900	[thread overview]
Message-ID: <46A861F6.10709@ak.jp.nec.com> (raw)
In-Reply-To: <46681ED6.1010408@kaigai.gr.jp>

>>> If I remember correctly, someone posted a guideline to make
>>> a RPM package which contains binary security policy, several
>>> weeks ago.
>>>
>>> If you know the URL, would you tell me the location?
>> There is a draft guide at:
>> http://fedoraproject.org/wiki/PackagingDrafts/SELinux/PolicyModules
> 
> Thanks, so much!

I have a comment for the Policy Module Packaging Guideline.

The document says every *.pp files should be installed for any sort of policies
(targeted, strict, mls) in the %post section.
However, it can cause a problem when a part of policies are not installed yet.

When we try to install an application including policy package on the system
which has only targeted policy, installation of *.pp files for strict/mls will
be failed no need to say.
If we want to install selinux-policy-strict or -mls later, the oraphan *.pp files
are not linked automatically because "/usr/bin/semodule -i" is not invoked.
It will cause a simple problem, but a bit difficult to find out.

I have an idea that uses "%triggerin" to invoke "/use/bin/semodule -i" to link
orphan *.pp files on instllation of selinux-policy-* packages later, as follows:

----------------
  %triggerin -- selinux-policy-targeted
  if [ $0 -eq 1 ]; then
      /usr/sbin/semodule -s targeted -i %{_datadir}/selinux/targeted/mymodule.pp &> /dev/null || :
  fi
  %triggerin -- selinux-policy-strict
  if [ $0 -eq 1 ]; then
      /usr/sbin/semodule -s strict -i %{_datadir}/selinux/strict/mymodule.pp &> /dev/null || :
  fi
  %triggerin -- selinux-policy-mls
  if [ $0 -eq 1 ]; then
      /usr/sbin/semodule -s mls -i %{_datadir}/selinux/mls/mymodule.pp &> /dev/null || :
  fi
----------------

If the application is installed on the system which already has selinux-policy-strict,
"%triggerin -- selinux-policy-strict" will be invoked just when the application is
installed, so there is no degrading.

Thanks,
-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.com>

--
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-07-26  8:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-07 14:32 Guideline for RPM packages KaiGai Kohei
2007-06-07 14:45 ` Stephen Smalley
2007-06-07 15:05   ` KaiGai Kohei
2007-07-26  8:57     ` KaiGai Kohei [this message]
2007-07-26 16:25       ` SE-PostgreSQL for Fedora (Re: Guideline for RPM packages) KaiGai Kohei
2007-08-02 16:34         ` Joshua Brindle
2007-08-02 17:51           ` KaiGai Kohei
2007-08-02 18:02             ` Joshua Brindle
2007-08-02 22:01               ` KaiGai Kohei
     [not found]       ` <46AE00BD.80900@city-fan.org>
2007-07-30 15:47         ` Guideline for RPM packages KaiGai Kohei
     [not found]           ` <46AFDFA4.5060303@ak.jp.nec.com>
     [not found]             ` <20070801075747.7ff9cfd2@metropolis.intra.city-fan.org>
2007-08-01  9:44               ` KaiGai Kohei

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=46A861F6.10709@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=fedora-selinux-list@redhat.com \
    --cc=kaigai@kaigai.gr.jp \
    --cc=paul@city-fan.org \
    --cc=sds@tycho.nsa.gov \
    --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.