All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: SE Linux <selinux@tycho.nsa.gov>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: semodule patch to use new semanage interfaces
Date: Mon, 05 Jan 2009 15:42:27 -0500	[thread overview]
Message-ID: <496270B3.4050405@manicmethod.com> (raw)
In-Reply-To: <49626F43.9000702@redhat.com>

Daniel J Walsh wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Joshua Brindle wrote:
>   
>> Daniel J Walsh wrote:
>>     
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Joshua Brindle wrote:
>>>  
>>>       
>>>> Daniel J Walsh wrote:
>>>> Allows semodule to read bzip compressed policy packages directly.
>>>>     
>>>>         
>>>  
>>>       
>>>> I'm finally looking at these (sorry it took so long)..
>>>>     
>>>>         
>>>  
>>>       
>>>> I thought one part of it was suppose to make hard links to files if you
>>>> install but after merging this patch and the compression support I try
>>>> semodule -i /usr/share/selinux/targeted/somepolicy.pp.bz2 (I'm on F10
>>>> and they are already bzip'd) and instead of making a hard link to the
>>>> bz2 it looks like it writes the uncompressed file to
>>>> /etc/selinux/targeted/modules/active/modules. Am I misunderstanding the
>>>> intention of these patches?
>>>>     
>>>>         
>>> Originally this was the intention but it was wrong.  The problem is the
>>> file context would start to get screwed up every where and we end up
>>> with the /etc/selinux/targeted/modules/active/ directory looking like a
>>> patchwork of labels.
>>>
>>> So the patch makes a compressed copy whether or not the file is
>>> originally compressed in the new location.
>>>
>>> It does use the hard links for creating the snapshot directory though.
>>>
>>>   
>>>       
>> So... what is the purpose of the *_file functions if you don't copy the
>> data anymore?
>>
>> I see now that the files in /etc/selinux/.../modules/active are bzip
>> files but with a .pp extension, confusing.
>>
>>     
> Because you don't know if the file you are installing is a compressed pp
> or a regular one.
>
> I want to ship compressed pp files for now on, but existing pp files are
> not compressed.  semodule should be smart enough to not care

I see now, the *_file does the same thing semodule use to do but also 
checks if the data is a bzip.

We might want to mark those old functions as deprecated since it is 
likely they won't be able to use any policy modules shipped going forward.

--
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.

  parent reply	other threads:[~2009-01-05 20:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 14:41 semodule patch to use new semanage interfaces Daniel J Walsh
2009-01-05 19:52 ` Joshua Brindle
2009-01-05 19:58   ` Daniel J Walsh
2009-01-05 20:07     ` Joshua Brindle
     [not found]       ` <49626F43.9000702@redhat.com>
2009-01-05 20:42         ` Joshua Brindle [this message]
2009-01-12 20:58 ` Joshua Brindle

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=496270B3.4050405@manicmethod.com \
    --to=method@manicmethod.com \
    --cc=dwalsh@redhat.com \
    --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.