* [PATCH] Fix a bug of executing "aureport -tm"
@ 2008-09-18 11:05 Peng Haitao
2008-09-19 21:08 ` Steve Grubb
0 siblings, 1 reply; 2+ messages in thread
From: Peng Haitao @ 2008-09-18 11:05 UTC (permalink / raw)
To: Steve Grubb; +Cc: audit-list
Hello steve,
Use option "-tm" cannot report about terminals, when message type is USER_AVC.
For example:
# echo "type=USER_AVC msg=audit(1221880640.759:4904436): user pid=4748 uid=81 auid=4294967295 subj=system_u:system_r:system_dbusd_t:s0 msg='avc: received policyload notice (seqno=37) : exe=\"?\" (sauid=81, hostname=?, addr=?, terminal=?)'" | aureport -tm
Terminal Report
====================================
# date time term host exe auid event
====================================
<no events of interest were found>
Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
src/ausearch-parse.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/ausearch-parse.c b/src/ausearch-parse.c
index e3ffa8c..da1730f 100644
--- a/src/ausearch-parse.c
+++ b/src/ausearch-parse.c
@@ -850,8 +850,11 @@ static int parse_user(const lnode *n, search_items *s)
if (str) {
str += 9;
term = strchr(str, ' ');
- if (term == NULL)
- return 17;
+ if (term == NULL) {
+ term = strchr(str, ')');
+ if (term == NULL)
+ return 17;
+ }
*term = 0;
s->terminal = strdup(str);
*term = ' ';
--
1.5.4.2
--
Regards
Peng Haitao
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-19 21:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-18 11:05 [PATCH] Fix a bug of executing "aureport -tm" Peng Haitao
2008-09-19 21:08 ` Steve Grubb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox