All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Daniel J Walsh <dwalsh@redhat.com>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: This patch adds permissive to semanage
Date: Wed, 02 Jul 2008 09:09:23 -0400	[thread overview]
Message-ID: <486B7E03.1060304@manicmethod.com> (raw)
In-Reply-To: <1215000045.22447.252.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Mon, 2008-06-30 at 13:58 -0400, Joshua Brindle wrote:
>> Daniel J Walsh wrote:
>>> Gives users the ability to set a domain as permissive
>>>
>>>
>>> semanage permissive -a http_t
>>>
>>> It created a policy module named permissive_httpd_t.pp with the
>>> permissive call.
>>>
>> So, a really quick glance brings up a couple issues. First you have '-n', '--noheading' which aren't documented in the man page or elsewhere. Second (and more importantly) why are you executing semodule like that? libsemanage is the library that manages modules, and also the library used by semanage for everything else. 
>>
>> I would prefer a more 'pure' approach where we keep a list of
>> permissive types and inject them into the kernel policy after linking
>> (like libsemanage does with users, ports, nodes, etc) but I understand
>> that adding a whole new set of databases and interfaces is both
>> annoying and time consuming so I'm fine with it working on modules,
>> I'd just like to see it using libsemanage interfaces instead of
>> calling semodule.
> 
> Why do you see direct use of the libsemanage interfaces as preferable to
> invoking semodule (aside from performance, and this isn't really
> performance critical)?
> 
> I'm unclear on the tradeoff being made there, as composing small
> programs together to perform more complex operation is the Unix (tm)
> way ;)
> 
> The advantage of just invoking semodule is that semodule is already a
> well-tested program that performs that function well, does proper error
> checking and handling of the various libsemanage calls, etc.  And if we
> later fix a bug or introduce new functionality there, we only have to do
> it once vs. in multiple places.
> 
> And the semanage permissive code already has to invoke a helper program
> to compile the policy module from source to binary, at least today, so
> it isn't much different to invoke semodule to install the binary module.
> 
> Then there is the issue of being able to run the semodule stage of
> processing in a separate domain, although at present semanage and
> semodule operate in the same domain so it makes no difference at
> present.
> 

Maybe its just personal preference but I see using library interfaces as much more clean than invoking semodule and grepping. semanage already uses the library interfaces for everything else so this would be the one case where it doesn't. He already fixed it up to use the interfaces so its moot at this point. 


--
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:[~2008-07-02 13:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-30 16:02 This patch adds permissive to semanage Daniel J Walsh
2008-06-30 17:58 ` Joshua Brindle
2008-07-02  0:50   ` Daniel J Walsh
2008-07-02 12:00   ` Stephen Smalley
2008-07-02 13:09     ` Joshua Brindle [this message]
2008-07-02 13:17       ` Stephen Smalley
2008-07-02 13:37         ` Joshua Brindle
2008-07-02 14:29           ` Stephen Smalley
2008-07-02 18:09             ` Daniel J Walsh
2008-07-02 19:06             ` Joshua Brindle
2008-07-02 19:13               ` Stephen Smalley
2008-07-02 19:22                 ` Joshua Brindle
2008-07-02 19:25                   ` Stephen Smalley
2008-07-02 19:54                     ` Joshua Brindle
2008-07-02 18:07       ` Daniel J Walsh

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=486B7E03.1060304@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.