Skip to content

Commit

Permalink
plugins: Suggest my-<command>.pp modules instead of mypol.pp
Browse files Browse the repository at this point in the history
You can have only one mypol modules in system, therefore when
a setroubleshoot plugin suggest to create and load mypol.pp, it
overrides the existing one. The new plugin name format is
my_<command>.pp where <command> is based on comm= field from the audit
event.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1329037
  • Loading branch information
bachradsusi committed Apr 21, 2016
1 parent 4271b72 commit 192f55e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions plugins/src/catchall.py
Expand Up @@ -54,8 +54,8 @@ def get_if_text(self, avc, args):

then_text = _('You should report this as a bug.\nYou can generate a local policy module to allow this access.')
do_text = _("""Allow this access for now by executing:
# ausearch -c $SOURCE --raw | audit2allow -M mypol
# semodule -i mypol.pp""")
# ausearch -c $SOURCE --raw | audit2allow -M my-$SOURCE
# semodule -i my-$SOURCE.pp""")

def __init__(self):
Plugin.__init__(self, __name__)
Expand Down
4 changes: 2 additions & 2 deletions plugins/src/leaks.py
Expand Up @@ -41,8 +41,8 @@ class plugin(Plugin):

if_text = _('you want to ignore $SOURCE_BASE_PATH trying to $ACCESS access the $TARGET_BASE_PATH $TARGET_CLASS, because you believe it should not need this access.')
then_text = _('You should report this as a bug. \nYou can generate a local policy module to dontaudit this access.')
do_text = _("""# ausearch -x $SOURCE_PATH --raw | audit2allow -D -M mypol
# semodule -i mypol.pp""")
do_text = _("""# ausearch -x $SOURCE_PATH --raw | audit2allow -D -M my-$SOURCE
# semodule -i my-$SOURCE.pp""")

def __init__(self):
Plugin.__init__(self,__name__)
Expand Down

0 comments on commit 192f55e

Please sign in to comment.