From: Stephen Smalley <sds@tycho.nsa.gov>
To: Tim <elatllat@gmail.com>
Cc: SELinux@tycho.nsa.gov
Subject: Re: pp2te
Date: Thu, 08 Dec 2011 09:14:52 -0500 [thread overview]
Message-ID: <1323353692.13613.15.camel@moss-pluto> (raw)
In-Reply-To: <1323352081.13613.14.camel@moss-pluto>
On Thu, 2011-12-08 at 08:48 -0500, Stephen Smalley wrote:
> On Wed, 2011-12-07 at 14:13 -0500, Tim wrote:
> > Is there any way to convert targeted policy .pp files to .te files?
>
> Closest approximation would be to use semodule_unpackage to extract the
> binary .mod file from the .pp file, and then to use dismod to
> disassemble the binary .mod file. semodule_unpackage.c attached if you
> don't have it and dismod is in the checkpolicy source tree (but not
> built as part of the Fedora package).
>
> $ gcc -lsepol -o semodule_unpackage semodule_unpackage.c
> $ bunzip2 -c /usr/share/selinux/targeted/apache.pp.bz2 > apache.pp
> $ ./semodule_unpackage apache.pp apache.mod apache.fc
> $ checkpolicy/test/dismod apache.mod
Ah, looks like the Fedora checkpolicy package renames dismod to sedismod
to avoid naming conflicts. So you can just run sedismod on Fedora. And
semodule_unpackage has been added to recent versions of policycoreutils,
so you might have it depending on what version you are using.
--
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.
next prev parent reply other threads:[~2011-12-08 14:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 19:13 pp2te Tim
2011-12-08 13:48 ` pp2te Stephen Smalley
2011-12-08 14:14 ` Stephen Smalley [this message]
2011-12-08 15:02 ` pp2te Eric Paris
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=1323353692.13613.15.camel@moss-pluto \
--to=sds@tycho.nsa.gov \
--cc=SELinux@tycho.nsa.gov \
--cc=elatllat@gmail.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.