All of lore.kernel.org
 help / color / mirror / Atom feed
* apol and active modules
@ 2011-07-24 11:26 Russell Coker
  2011-07-25 12:36 ` Christopher J. PeBenito
  0 siblings, 1 reply; 7+ messages in thread
From: Russell Coker @ 2011-07-24 11:26 UTC (permalink / raw)
  To: SE-Linux

Why can't apol (at least version 3.3.6.ds) parse the files in 
/etc/selinux/$SELINUXTYPE/modules/active/modules?  Is this considered a bug or 
a wontfix thing?
-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: apol and active modules
  2011-07-24 11:26 apol and active modules Russell Coker
@ 2011-07-25 12:36 ` Christopher J. PeBenito
  2011-07-25 12:48   ` Russell Coker
  0 siblings, 1 reply; 7+ messages in thread
From: Christopher J. PeBenito @ 2011-07-25 12:36 UTC (permalink / raw)
  To: russell; +Cc: SE-Linux

On 07/24/11 07:26, Russell Coker wrote:
> Why can't apol (at least version 3.3.6.ds) parse the files in
> /etc/selinux/$SELINUXTYPE/modules/active/modules?  Is this considered a bug or
> a wontfix thing?

Can you be more specific about your usage?  There shouldn't be a problem 
looking at those, since they're just a copy of what you install via 
semodule -i/-b.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: apol and active modules
  2011-07-25 12:36 ` Christopher J. PeBenito
@ 2011-07-25 12:48   ` Russell Coker
  2011-07-25 12:55     ` Christopher J. PeBenito
  2011-07-25 14:08     ` Stephen Smalley
  0 siblings, 2 replies; 7+ messages in thread
From: Russell Coker @ 2011-07-25 12:48 UTC (permalink / raw)
  To: Christopher J. PeBenito; +Cc: SE-Linux

On Mon, 25 Jul 2011, "Christopher J. PeBenito" <cpebenito@tresys.com> wrote:
> On 07/24/11 07:26, Russell Coker wrote:
> > Why can't apol (at least version 3.3.6.ds) parse the files in
> > /etc/selinux/$SELINUXTYPE/modules/active/modules?  Is this considered a
> > bug or a wontfix thing?
> 
> Can you be more specific about your usage?  There shouldn't be a problem
> looking at those, since they're just a copy of what you install via
> semodule -i/-b.

# diff /usr/share/selinux/default/base.pp \ 
/etc/selinux/default/modules/active/base.pp 
Binary files /usr/share/selinux/default/base.pp and 
/etc/selinux/default/modules/active/base.pp differ

The files are not just a copy.

When /tmp/base.pp is a copy of /etc/selinux/default/modules/active/base.pp I 
get the following:

$ apol  /tmp/base.pp 
Initializing libqpol... done.
Initializing libapol... done.
Initializing libsefs... done.
Initializing libapol_tcl... done.
Initializing Tk... done.
(unknown source)::ERROR 'syntax error' at token 'BZh91AY' on line 1:

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: apol and active modules
  2011-07-25 12:48   ` Russell Coker
@ 2011-07-25 12:55     ` Christopher J. PeBenito
  2011-07-25 13:08       ` Russell Coker
  2011-07-25 14:08     ` Stephen Smalley
  1 sibling, 1 reply; 7+ messages in thread
From: Christopher J. PeBenito @ 2011-07-25 12:55 UTC (permalink / raw)
  To: russell; +Cc: SE-Linux

On 07/25/11 08:48, Russell Coker wrote:
> On Mon, 25 Jul 2011, "Christopher J. PeBenito"<cpebenito@tresys.com>  wrote:
>> On 07/24/11 07:26, Russell Coker wrote:
>>> Why can't apol (at least version 3.3.6.ds) parse the files in
>>> /etc/selinux/$SELINUXTYPE/modules/active/modules?  Is this considered a
>>> bug or a wontfix thing?
>>
>> Can you be more specific about your usage?  There shouldn't be a problem
>> looking at those, since they're just a copy of what you install via
>> semodule -i/-b.
>
> # diff /usr/share/selinux/default/base.pp \
> /etc/selinux/default/modules/active/base.pp
> Binary files /usr/share/selinux/default/base.pp and
> /etc/selinux/default/modules/active/base.pp differ
>
> The files are not just a copy.

It sounds like there might be some corruption.  I did the same diff on 
my system and came up with no changes.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: apol and active modules
  2011-07-25 12:55     ` Christopher J. PeBenito
@ 2011-07-25 13:08       ` Russell Coker
  0 siblings, 0 replies; 7+ messages in thread
From: Russell Coker @ 2011-07-25 13:08 UTC (permalink / raw)
  To: Christopher J. PeBenito; +Cc: SE-Linux

On Mon, 25 Jul 2011, "Christopher J. PeBenito" <cpebenito@tresys.com> wrote:
> > The files are not just a copy.
> 
> It sounds like there might be some corruption.  I did the same diff on 
> my system and came up with no changes.

On Debian/Squeeze and Debian/Unstable I can reliably rebuild the policy (via 
the selinux-policy-upgrade script that runs semodule to reinsert all modules 
from the original policy tree) and get the same result.  Every time it results 
in different files in the active tree and apol not liking them.

It must be an issue of which versions of the libraries etc are being used.  
The systems work quite well like this, I just have to use the original .pp 
files for apol.

-- 
My Main Blog         http://etbe.coker.com.au/
My Documents Blog    http://doc.coker.com.au/


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: apol and active modules
  2011-07-25 12:48   ` Russell Coker
  2011-07-25 12:55     ` Christopher J. PeBenito
@ 2011-07-25 14:08     ` Stephen Smalley
  2011-07-25 14:48       ` Christopher J. PeBenito
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Smalley @ 2011-07-25 14:08 UTC (permalink / raw)
  To: russell; +Cc: Christopher J. PeBenito, SE-Linux

On Mon, 2011-07-25 at 22:48 +1000, Russell Coker wrote:
> On Mon, 25 Jul 2011, "Christopher J. PeBenito" <cpebenito@tresys.com> wrote:
> > On 07/24/11 07:26, Russell Coker wrote:
> > > Why can't apol (at least version 3.3.6.ds) parse the files in
> > > /etc/selinux/$SELINUXTYPE/modules/active/modules?  Is this considered a
> > > bug or a wontfix thing?
> > 
> > Can you be more specific about your usage?  There shouldn't be a problem
> > looking at those, since they're just a copy of what you install via
> > semodule -i/-b.
> 
> # diff /usr/share/selinux/default/base.pp \ 
> /etc/selinux/default/modules/active/base.pp 
> Binary files /usr/share/selinux/default/base.pp and 
> /etc/selinux/default/modules/active/base.pp differ
> 
> The files are not just a copy.
> 
> When /tmp/base.pp is a copy of /etc/selinux/default/modules/active/base.pp I 
> get the following:
> 
> $ apol  /tmp/base.pp 
> Initializing libqpol... done.
> Initializing libapol... done.
> Initializing libsefs... done.
> Initializing libapol_tcl... done.
> Initializing Tk... done.
> (unknown source)::ERROR 'syntax error' at token 'BZh91AY' on line 1:

BZh is the bzip2 magic string.  I'd guess your installed modules are
compressed (the default) and thus can't be opened by apol unless it
knows to decompress them first?

-- 
Stephen Smalley
National Security Agency


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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: apol and active modules
  2011-07-25 14:08     ` Stephen Smalley
@ 2011-07-25 14:48       ` Christopher J. PeBenito
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher J. PeBenito @ 2011-07-25 14:48 UTC (permalink / raw)
  To: Stephen Smalley; +Cc: russell, SE-Linux

On 07/25/11 10:08, Stephen Smalley wrote:
> On Mon, 2011-07-25 at 22:48 +1000, Russell Coker wrote:
>> On Mon, 25 Jul 2011, "Christopher J. PeBenito"<cpebenito@tresys.com>  wrote:
>>> On 07/24/11 07:26, Russell Coker wrote:
>>>> Why can't apol (at least version 3.3.6.ds) parse the files in
>>>> /etc/selinux/$SELINUXTYPE/modules/active/modules?  Is this considered a
>>>> bug or a wontfix thing?
>>>
>>> Can you be more specific about your usage?  There shouldn't be a problem
>>> looking at those, since they're just a copy of what you install via
>>> semodule -i/-b.
>>
>> # diff /usr/share/selinux/default/base.pp \
>> /etc/selinux/default/modules/active/base.pp
>> Binary files /usr/share/selinux/default/base.pp and
>> /etc/selinux/default/modules/active/base.pp differ
>>
>> The files are not just a copy.
>>
>> When /tmp/base.pp is a copy of /etc/selinux/default/modules/active/base.pp I
>> get the following:
>>
>> $ apol  /tmp/base.pp
>> Initializing libqpol... done.
>> Initializing libapol... done.
>> Initializing libsefs... done.
>> Initializing libapol_tcl... done.
>> Initializing Tk... done.
>> (unknown source)::ERROR 'syntax error' at token 'BZh91AY' on line 1:
>
> BZh is the bzip2 magic string.  I'd guess your installed modules are
> compressed (the default) and thus can't be opened by apol unless it
> knows to decompress them first?

Ah, I forgot about that.  SETools gained the bzip2 support in 3.3.7.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-07-25 14:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-24 11:26 apol and active modules Russell Coker
2011-07-25 12:36 ` Christopher J. PeBenito
2011-07-25 12:48   ` Russell Coker
2011-07-25 12:55     ` Christopher J. PeBenito
2011-07-25 13:08       ` Russell Coker
2011-07-25 14:08     ` Stephen Smalley
2011-07-25 14:48       ` Christopher J. PeBenito

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.