All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peng Haitao <penght@cn.fujitsu.com>
To: sgrubb@redhat.com
Cc: audit-list <linux-audit@redhat.com>
Subject: [PATCH] fix a bug that output of "aureport -au" is imperfection
Date: Tue, 22 Jul 2008 16:18:59 +0800	[thread overview]
Message-ID: <488597F3.9060302@cn.fujitsu.com> (raw)

Hello Steve, 

Execute command "aureport -au", the output is imperfection.

For example:
[root@RHEL5 ~]# aureport -au

Authentication Report
============================================
# date time acct host term exe success event
============================================
1. 07/22/2008 09:24:39 acct="aulltest rhel5.2ga ssh /usr/sbin/sshd yes 5208350

The reports have a column label at the top to help with interpretation of the various fields,
So 'acct="aulltest' should be modified to 'aulltest' in the line 1.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
---
 src/ausearch-parse.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/ausearch-parse.c b/src/ausearch-parse.c
index 5fdf8c7..141fdee 100644
--- a/src/ausearch-parse.c
+++ b/src/ausearch-parse.c
@@ -786,7 +786,8 @@ static int parse_user(const lnode *n, search_items *s)
 					term++;
 				saved = *term;
 				*term = 0;
-				s->acct = strdup(str);
+				ptr++;
+				s->acct = strdup(ptr);
 				*term = saved;
 			} else { 
 				/* Handle legacy accts */
@@ -802,11 +803,11 @@ static int parse_user(const lnode *n, search_items *s)
 				}
 				term = end;
 				if (!legacy)
-					s->acct = unescape(str);
+					s->acct = unescape(ptr);
 				else {
 					saved = *term;
 					*term = 0;
-					s->acct = strdup(str);
+					s->acct = strdup(ptr);
 					*term = saved;
 				}
 			}


-- 
Regards
Peng Haitao

             reply	other threads:[~2008-07-22  8:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-22  8:18 Peng Haitao [this message]
2008-07-22 23:16 ` [PATCH] fix a bug that output of "aureport -au" is imperfection Steve Grubb

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=488597F3.9060302@cn.fujitsu.com \
    --to=penght@cn.fujitsu.com \
    --cc=linux-audit@redhat.com \
    --cc=sgrubb@redhat.com \
    /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.