From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Only call gen_requires once.
Date: Thu, 11 Sep 2008 09:35:54 -0400 [thread overview]
Message-ID: <48C91EBA.8050400@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 461 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Currently audit2allow/sepolgen will create two identical gen_requires
block if you have allow rules and a role statement.
This patch fixes this problem.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkjJHroACgkQrlYvE4MpobPgMQCghgAMBtaQO0BeZX+ug6IwsWB8
bNEAoMkRo4cZa0iJhGoGMmCvy5ncGpj8
=gMFg
-----END PGP SIGNATURE-----
[-- Attachment #2: diffsepol --]
[-- Type: text/plain, Size: 1184 bytes --]
diff --exclude-from=exclude -N -u -r nsasepolgen/src/sepolgen/policygen.py policycoreutils-2.0.55/sepolgen-1.0.13/src/sepolgen/policygen.py
--- nsasepolgen/src/sepolgen/policygen.py 2008-08-28 09:34:24.000000000 -0400
+++ policycoreutils-2.0.55/sepolgen-1.0.13/src/sepolgen/policygen.py 2008-09-11 09:26:52.000000000 -0400
@@ -134,6 +134,10 @@
m.refpolicy = False
def get_module(self):
+ # Generate the requires
+ if self.gen_requires:
+ gen_requires(self.module)
+
"""Return the generated module"""
return self.module
@@ -163,18 +167,10 @@
# Generate the raw allow rules from the filtered list
self.__add_allow_rules(raw_allow)
- # Generate the requires
- if self.gen_requires:
- gen_requires(self.module)
-
def add_role_types(self, role_type_set):
for role_type in role_type_set:
self.module.children.append(role_type)
- # Generate the requires
- if self.gen_requires:
- gen_requires(self.module)
-
def explain_access(av, ml=None, verbosity=SHORT_EXPLANATION):
"""Explain why a policy statement was generated.
[-- Attachment #3: diffsepol.sig --]
[-- Type: application/octet-stream, Size: 72 bytes --]
next reply other threads:[~2008-09-11 13:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-11 13:35 Daniel J Walsh [this message]
2008-09-12 13:59 ` Only call gen_requires once Joshua Brindle
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=48C91EBA.8050400@redhat.com \
--to=dwalsh@redhat.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.