Have sepolgen return name field in AVC
This commit is contained in:
parent
6c13d007c9
commit
4f4e4913d7
@ -1,5 +1,5 @@
|
||||
diff --git a/sepolgen/src/sepolgen/audit.py b/sepolgen/src/sepolgen/audit.py
|
||||
index 24e308e..e23725f 100644
|
||||
index 24e308e..1b0a8e5 100644
|
||||
--- a/sepolgen/src/sepolgen/audit.py
|
||||
+++ b/sepolgen/src/sepolgen/audit.py
|
||||
@@ -68,6 +68,17 @@ def get_dmesg_msgs():
|
||||
@ -30,8 +30,11 @@ index 24e308e..e23725f 100644
|
||||
|
||||
class AVCMessage(AuditMessage):
|
||||
"""AVC message representing an access denial or granted message.
|
||||
@@ -167,6 +181,8 @@ class AVCMessage(AuditMessage):
|
||||
@@ -165,8 +179,11 @@ class AVCMessage(AuditMessage):
|
||||
self.comm = ""
|
||||
self.exe = ""
|
||||
self.path = ""
|
||||
+ self.name = ""
|
||||
self.accesses = []
|
||||
self.denial = True
|
||||
+ self.type = audit2why.TERULE
|
||||
@ -39,7 +42,12 @@ index 24e308e..e23725f 100644
|
||||
|
||||
def __parse_access(self, recs, start):
|
||||
# This is kind of sucky - the access that is in a space separated
|
||||
@@ -226,7 +242,31 @@ class AVCMessage(AuditMessage):
|
||||
@@ -223,10 +240,36 @@ class AVCMessage(AuditMessage):
|
||||
self.comm = fields[1][1:-1]
|
||||
elif fields[0] == "exe":
|
||||
self.exe = fields[1][1:-1]
|
||||
+ elif fields[0] == "name":
|
||||
+ self.name = fields[1][1:-1]
|
||||
|
||||
if not found_src or not found_tgt or not found_class or not found_access:
|
||||
raise ValueError("AVC message in invalid format [%s]\n" % self.message)
|
||||
@ -72,7 +80,7 @@ index 24e308e..e23725f 100644
|
||||
class PolicyLoadMessage(AuditMessage):
|
||||
"""Audit message indicating that the policy was reloaded."""
|
||||
def __init__(self, message):
|
||||
@@ -469,10 +509,10 @@ class AuditParser:
|
||||
@@ -469,10 +512,10 @@ class AuditParser:
|
||||
if avc_filter:
|
||||
if avc_filter.filter(avc):
|
||||
av_set.add(avc.scontext.type, avc.tcontext.type, avc.tclass,
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.1.7
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
# Based on git repository with tag 20101221
|
||||
@ -352,6 +352,9 @@ fi
|
||||
/bin/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Thu Oct 13 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.7-4
|
||||
- Have sepolgen return name field in AVC
|
||||
|
||||
* Thu Oct 6 2011 Dan Walsh <dwalsh@redhat.com> - 2.1.7-3
|
||||
- restorecond -u needs to watch terminal for exit if run outside of dbus.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user