From: Joshua Brindle <method@manicmethod.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: "Clarkson, Mike R (US SSA)" <mike.clarkson@baesystems.com>,
selinux@tycho.nsa.gov,
"Christopher J. PeBenito" <cpebenito@tresys.com>,
Karl MacMillan <kmacmillan@mentalrootkit.com>
Subject: Re: using semodule_package
Date: Wed, 11 Jul 2007 08:48:10 -0400 [thread overview]
Message-ID: <4694D18A.9030502@manicmethod.com> (raw)
In-Reply-To: <1184156241.3392.41.camel@moss-spartans.epoch.ncsc.mil>
Stephen Smalley wrote:
> On Tue, 2007-07-10 at 19:10 -0700, Clarkson, Mike R (US SSA) wrote:
>
>> The manpage for semodule_package gives examples for how to use it:
>> semodule_package -o httpd.pp -m httpd.mod -f httpd.fc
>>
>> Am I supposed to get the *.mod files for modules when I compile the
>> policy? I have a base.mod file, but no *.mod files for the loadable
>> modules. The closest that I have is <module_name>.mod.role files under
>> the .../policy/tmp directory.
>>
>> I'd like to be able to use semodule_package to update file contexts
>> without having to recompile.
>>
>
> It appears that the .mod files are removed at the end of the build
> process after they have been packaged into .pp files. Not sure why.
>
Its a feature of make, all intermediate files without a specific target
are deleted after the build process. This use to be preventable by
adding .secondary to the Makefile but there has been a long standing bug
that keeps that from working.
> Options, aside from tracking down the relevant makefile rule and
> removing it, might include:
> - regenerating the .mod via checkmodule on tmp/<name>.tmp, e.g.
> checkmodule -M -m tmp/zebra.tmp -o tmp/zebra.mod
> or
> - extracting the already built .mod file from the .pp file
>
> I took the semodule_package.c code once and created a
> semodule_unpackage.c file from it to unpack the .mod file, but never got
> around to generalizing it (e.g. unpacking all of the files) or
> committing it. Attached below for your amusement.
> $ gcc -lsepol -o semodule_unpackage semodule_unpackage.c
> $ ./semodule_unpackage zebra.pp zebra.mod
>
>
--
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:[~2007-07-11 12:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 2:10 using semodule_package Clarkson, Mike R (US SSA)
2007-07-11 12:17 ` Stephen Smalley
2007-07-11 12:48 ` Joshua Brindle [this message]
2007-07-25 17:40 ` Clarkson, Mike R (US SSA)
2007-07-25 17:51 ` Stephen Smalley
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=4694D18A.9030502@manicmethod.com \
--to=method@manicmethod.com \
--cc=cpebenito@tresys.com \
--cc=kmacmillan@mentalrootkit.com \
--cc=mike.clarkson@baesystems.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.