All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Joshua Brindle <jbrindle@tresys.com>
Cc: Eamon Walsh <ewalsh@tycho.nsa.gov>,
	Mark Goldman <mgoldman@tresys.com>,
	SE Linux <selinux@tycho.nsa.gov>,
	Daniel J Walsh <dwalsh@redhat.com>
Subject: RE: [patch 1/3] libsemanage: genhomedircon replacement
Date: Fri, 22 Jun 2007 12:04:47 -0400	[thread overview]
Message-ID: <1182528287.3014.29.camel@localhost.localdomain> (raw)
In-Reply-To: <6FE441CD9F0C0C479F2D88F959B01588D019AE@exchange.columbia.tresys.com>

On Fri, 2007-06-22 at 11:31 -0400, Joshua Brindle wrote:
> Karl MacMillan wrote:
> > On Thu, 2007-06-21 at 16:54 -0400, Eamon Walsh wrote:
> >> Karl MacMillan wrote:
> >>> On Thu, 2007-06-21 at 14:25 -0400, Joshua Brindle wrote:
> >>>> Karl MacMillan wrote:
> >>>>> On Thu, 2007-06-21 at 14:09 -0400, Joshua Brindle wrote:
> 
> > 
> > I'm not convinced by this. First, we've been doing this for a
> > long time and haven't had a single problem. Second,
> > libsemanage is not a typical library (like, say, libm).
> > Callers likely need to be fairly familiar with how it works and use
> > it carefully. 
> > 
> > Other than being in-process, what are the other advantageous
> > of writing this in C (I've heard none). If it is just making
> > it in-process why don't we just embed the python interpreter :)
> >
> 
> Wow, talk about hacky... Anyway, I've already told you the advantage.

Err - you mentioned generating labels for object managers (could be done
in genhomedircon) and the locking issues that I've addressed.

> We'll have to get rid of genhomedircon as it currently exists (as an
> independent user of libsemanage itself) and completely rewrite it to
> operate on the sandbox to get equivalent functionality.

That is a bit of an overstatement - I don't think the changes would be
hard.

>  The C rewrite is
> already complete and is consistent with the way the rest of libsemanage
> works (doing work in the sandbox in the library). Why should
> genhomedircon be different than any of the other activities libsemanage
> does on the files in the sandbox (including parsing, rewriting, etc)?
> 

Because this type of string manipulation is so painful in C. Can you
post a more recent patch - I just looked and couldn't find a new patch
that addressed the comments in the archives. The original version had
some fairly significant flaws, including potentially security relevant
flaws (which doesn't help the "let's just implement it correctly"
argument).

> IIRC running genhomedircon out of the library was always considered
> temporary until we got around to rewriting it to be a proper part of the
> library, I'm not sure why you are objecting so strongly, this is the
> natural progression. This also makes it much easier to use modular
> policy in embedded deployments since they often do not have python. With
> libpolicyrep being in c++ and libsemanage being completely in C one
> could use policy modules without python altogether (and even reimplement
> parts of semanage in C if that functionality were desired)

Removing the dependency is fairly nice - but I'm not convinced that
embedded environments will use modular policy.

I'm not totally against this - it's just that the C version is always
going to be ugly.

Karl


--
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:[~2007-06-22 16:04 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-21  9:54 [patch 0/3] genhomedircon replacement in libsemanage jbrindle
2007-05-21  9:54 ` [patch 1/3] libsemanage: genhomedircon replacement jbrindle
2007-05-22 21:08   ` Karl MacMillan
2007-05-24 14:04     ` Mark Goldman
2007-05-24 14:45       ` Karl MacMillan
2007-05-24 15:44         ` Daniel J Walsh
2007-05-24 19:20         ` Mark Goldman
2007-05-25 15:52           ` Karl MacMillan
2007-05-25 17:06             ` Joshua Brindle
2007-05-26  0:02               ` Karl MacMillan
2007-05-29 20:25                 ` audit2allow module generation Anand Patel
2007-05-29 21:11                   ` Karl MacMillan
2007-05-30 14:44                     ` Anand Patel
2007-05-31 16:05                       ` Karl MacMillan
2007-06-08 15:36                       ` Karl MacMillan
2007-06-11 13:47                         ` Anand Patel
2007-08-30 13:43                           ` Anand Patel
2007-09-03 16:13                             ` Karl MacMillan
2007-09-10 14:10                               ` Anand Patel
2007-09-10 16:01                                 ` Karl MacMillan
2007-06-19 15:09                 ` [patch 1/3] libsemanage: genhomedircon replacement Joshua Brindle
2007-06-21 16:29                   ` Karl MacMillan
2007-06-21 16:49                     ` Joshua Brindle
2007-06-21 18:04                       ` Karl MacMillan
2007-06-21 18:09                         ` Joshua Brindle
2007-06-21 18:18                           ` Karl MacMillan
2007-06-21 18:25                             ` Joshua Brindle
2007-06-21 18:35                               ` Karl MacMillan
2007-06-21 20:54                                 ` Eamon Walsh
2007-06-22 11:50                                   ` Daniel J Walsh
2007-06-22 15:22                                   ` Karl MacMillan
2007-06-22 15:31                                     ` Joshua Brindle
2007-06-22 16:04                                       ` Karl MacMillan [this message]
2007-06-22 16:58                                     ` Eamon Walsh
2007-06-22 19:30                                       ` Karl MacMillan
2007-06-22 20:55                                         ` Eamon Walsh
2007-07-02 14:00                                           ` Joshua Brindle
2007-07-02 14:23                                             ` Karl MacMillan
2007-07-02 15:54                                               ` Joshua Brindle
2007-07-02 21:26                                               ` Joshua Brindle
2007-07-03  1:12                                                 ` James Antill
2007-07-03 11:15                                                   ` Can someone please assist me with selinux issue David Cottle
     [not found]                                                     ` <1183464455.12218.243.camel@moss-spartans.epoch.ncs! c.mil>
2007-07-03 12:07                                                     ` Stephen Smalley
2007-07-04 23:30                                                       ` David Cottle
2007-07-05 12:33                                                         ` Stephen Smalley
2007-07-12 19:03                                                           ` Libsemanage dependency on version of Linux Hasan Rezaul-CHR010
2007-07-12 19:39                                                             ` Stephen Smalley
2007-07-12 19:48                                                               ` Hasan Rezaul-CHR010
2007-07-12 19:57                                                                 ` Stephen Smalley
2007-07-12 19:49                                                               ` Stephen Smalley
2007-07-02 14:54                                             ` [patch 1/3] libsemanage: genhomedircon replacement James Antill
2007-06-22 20:00                                       ` James Antill
2007-05-24 15:05       ` Steve G
2007-05-24 15:27         ` Karl MacMillan
2007-05-24 16:00       ` James Antill
2007-05-25 14:22         ` Mark Goldman
2007-05-21  9:54 ` [patch 2/3] libsemanage: test functions jbrindle
2007-05-21  9:54 ` [patch 3/3] Remove legacy genhomedircon python script jbrindle
2007-05-22 17:23 ` [patch 0/3] genhomedircon replacement in libsemanage Daniel J Walsh
2007-05-22 17:35   ` Joshua Brindle
2007-05-22 21:10     ` Karl MacMillan
2007-05-22 21:11 ` Karl MacMillan
  -- strict thread matches above, loose matches on Subject: below --
2007-08-08 20:22 [patch 0/3] libsemanage: genhomedircon replacement tmiller
2007-08-08 20:22 ` [patch 1/3] " tmiller

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=1182528287.3014.29.camel@localhost.localdomain \
    --to=kmacmillan@mentalrootkit.com \
    --cc=dwalsh@redhat.com \
    --cc=ewalsh@tycho.nsa.gov \
    --cc=jbrindle@tresys.com \
    --cc=mgoldman@tresys.com \
    --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.