Package: sepolgen
Version: 1.0.13-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu jaunty ubuntu-patch

Hello,

It's not yet clear if this is a Python2.6 bug, or if it is a bug in
sepolgen, but under python 2.6 (e.g. in Ubuntu[1]) "audit2allow" fails:

$ cat /dev/null | audit2allow1
...
  File "/var/lib/python-support/python2.6/sepolgen/access.py", line 316, in 
__len__
    return len(self.roles)
AttributeError: RoleTypeSet instance has no attribute 'roles'

I'm filing this here in case this become a problem in sepolgen in Debian
too once Python2.6 becomes the default.

A patch from Marshall Miller that fixes it is attached.  Thanks,

-Kees

[1] https://bugs.launchpad.net/bugs/352610

-- 
Kees Cook                                            @debian.org
diff -u -r orig-sepolgen-1.0.13/src/sepolgen/access.py sepolgen-1.0.13/src/sepolgen/access.py
--- orig-sepolgen-1.0.13/src/sepolgen/access.py	2008-08-26 09:40:22.000000000 -0400
+++ sepolgen-1.0.13/src/sepolgen/access.py	2009-03-31 14:10:18.000000000 -0400
@@ -313,7 +313,7 @@
 
     def __len__(self):
         """Return the unique number of role allow statements."""
-        return len(self.roles)
+        return len(self.role_types.keys())
 
     def add(self, role, type):
         if self.role_types.has_key(role):

Reply via email to