All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Sven Vermeulen <sven.vermeulen@siphos.be>
Cc: selinux@tycho.nsa.gov
Subject: Re: sepolgen requires unofficial setools patch
Date: Wed, 23 May 2012 11:46:19 -0400	[thread overview]
Message-ID: <4FBD064B.5040707@redhat.com> (raw)
In-Reply-To: <20120521205849.GA8511@siphos.be>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/21/2012 04:58 PM, Sven Vermeulen wrote:
> Hi guys,
> 
> It looks like the current stable sepolgen release has requirements towards 
> an unofficial (well, fedora/rhel only) patch on setools. With the current 
> stable setools, it gives the following error when trying to use
> audit2allow on a denial that contains write & open:
> 
> Traceback (most recent call last): File "/usr/bin/audit2allow-2.7", line
> 354, in <module> app.main() File "/usr/bin/audit2allow-2.7", line 345, in
> main self.__output() File "/usr/bin/audit2allow-2.7", line 315, in
> __output g.add_access(self.__avs) File
> "/usr/lib64/python2.7/site-packages/sepolgen/policygen.py", line 211, in
> add_access self.__add_allow_rules(raw_allow) File
> "/usr/lib64/python2.7/site-packages/sepolgen/policygen.py", line 179, in
> __add_allow_rules self.domains = seinfo(ATTRIBUTE,
> name="domain")[0]["types"] NameError: global name 'seinfo' is not defined
> 
> The patch that RedHat (and Fedora) provides fixes this in Python 2
> systems, but doesn't work in Python 3 (because Python 3 has a different
> setup for Extension-based modules). I have a locally-tested patch on that,
> but I'm not sure this is a good way to go forward.
> 
> Perhaps it would be wise to remove the dependency towards the setools 
> binding and instead include the necessary code in the userspace libraries 
> themselves? policygen.py doesn't require the entire set of querying that 
> seinfo provides...
> 
> The patch that is suggested by RedHat/Fedora doesn't follow the same 
> structure as the other bindings do (like libqpol/libapol) in setools too.
> 
> Wkr, Sven Vermeulen
> 
> -- 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.


Well I am not sure if anyone has ever used the setools python binaries other
then the setools/sesearch and seinfo bindings.

I would suggest we drop the general python bindings or deemphasize them and
work on improving the seinfo/sesearch bindings.

I have generated quite a few tools based on these bindings, that I am trying
to figure out where how to package.

setrans, senetwork, secommunicate,  segenuserman, segendomainman

Currently these are just little python scripts but I think they are pretty
powerfull and if we figured out a good cli for them, would be a nice update of
settools.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk+9BksACgkQrlYvE4MpobNzIACgosigCJ247v7KA/g7nG+qusLR
EOwAoJQs6HK+VuP01ZclQbCHac2gvzZA
=Ow4G
-----END PGP SIGNATURE-----

--
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:[~2012-05-23 15:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-21 20:58 sepolgen requires unofficial setools patch Sven Vermeulen
2012-05-23 15:46 ` Daniel J Walsh [this message]
2012-05-23 17:32   ` Christopher J. PeBenito
2012-05-23 17:46     ` Daniel J Walsh
2012-05-23 18:29       ` Christopher J. PeBenito
2012-05-23 18:46         ` 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=4FBD064B.5040707@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=sven.vermeulen@siphos.be \
    /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.