All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karl MacMillan <kmacmillan@mentalrootkit.com>
To: Eamon Walsh <ewalsh@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov
Subject: Re: [POLICYREP PATCH] Add generic iterators and a list data type to	libsepol
Date: Mon, 23 Apr 2007 11:48:46 -0400	[thread overview]
Message-ID: <1177343326.26236.18.camel@localhost.localdomain> (raw)
In-Reply-To: <46291A98.2040003@tycho.nsa.gov>

On Fri, 2007-04-20 at 15:55 -0400, Eamon Walsh wrote:
> Karl MacMillan wrote:
> > Add a generic iterator data structure and a linked-list implementation
> > based that uses the iterators to libsepol. Includes test cases for the
> > linked-list implementation.
> > 
> > This version is updated to remove improper use of void** based on comments 
> > from James Antill.
> > 
> > Signed-off-by: Karl MacMillan <kmacmillan@mentalrootkit.com>
> >
> 
> Is there no standard utility library out there that could provide these 
> things?  Glib?  APR?
> 

In the past, we had decided to not use external libraries because it
would pull in a fairly large library (like glib) close to the root of
the library dependency tree. If we maintain a complete split between
libsepol / libselinux then much of that concern seems to go away. It
also means that the extra dependency is only present on managed systems,
which doesn't make things worse for embedded.

APR seems aimed at a slightly different problem set (less data
structures, more system abstraction).

Glib, on the other hand, would provide everything that we need. In fact,
gobject is a perfect fit for the policy object abstraction that I
created with many advantages (including support for exporting the
objects to other languages like python).

The Pros of using glib:
* All the data structures that we need.
* Better tested foundation.
* Safe string functions.
* Familiar environment for many developers.
* Complete object-oriented layer for the policy rep.
* Easy export to Python and other languages.
* Our code gets much smaller (libsemanage in particular could shrink if
we used glib).

The Cons:
* Large dependency.
* Potential security issues in glib (not certain this is a real issue,
but glib is fairly big).
* Glib tends to be slightly verbose and boilerplate heavy.

So, if you ask me, I think we should start using glib in libsepol (and
eventually libsemanage). I can work up some code to see what the
policyrep stuff would look like based on glib if others think this is
worth exploring.

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-04-23 15:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20 13:34 [POLICYREP PATCH] Add generic iterators and a list data type to libsepol Karl MacMillan
2007-04-20 19:55 ` Eamon Walsh
2007-04-23 15:48   ` Karl MacMillan [this message]
2007-04-23 16:28     ` James Antill
2007-04-23 17:52       ` Stephen Smalley
2007-04-23 21:35         ` Karl MacMillan
2007-04-23 23:33           ` James Antill
2007-04-24 12:26           ` Stephen Smalley
2007-04-24 16:42 ` Stephen Smalley
2007-04-25 19:49   ` Karl MacMillan
2007-04-25 20:48     ` Joshua Brindle
2007-04-25 21:09       ` Karl MacMillan
2007-04-25 21:13         ` Joshua Brindle
2007-04-26 11:49       ` Stephen Smalley
2007-04-26 13:43         ` Joshua Brindle
2007-04-26 13:49           ` Stephen Smalley
2007-04-26 19:24             ` Karl MacMillan

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=1177343326.26236.18.camel@localhost.localdomain \
    --to=kmacmillan@mentalrootkit.com \
    --cc=ewalsh@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.