* [PATCH] ausearch: Fix parsing of uid in user space events
@ 2012-02-07 16:30 Marcelo Cerri
2012-02-07 22:11 ` Steve Grubb
0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Cerri @ 2012-02-07 16:30 UTC (permalink / raw)
To: linux-audit; +Cc: gcwilson, bryntcor
The function parse_user aborts when it tries to parse a record which contains
an uuid field (usually a VIRT_* record).
---
src/ausearch-parse.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/ausearch-parse.c b/src/ausearch-parse.c
index d38ed56..f83f84b 100644
--- a/src/ausearch-parse.c
+++ b/src/ausearch-parse.c
@@ -719,7 +719,7 @@ static int parse_user(const lnode *n, search_items *s)
str = strstr(term, "auid=");
if (str == NULL) { // Try the older one
str = strstr(term, "loginuid=");
- if (str == NULL)
+ if (str == NULL)
return 7;
ptr = str + 9;
} else
@@ -792,7 +792,7 @@ static int parse_user(const lnode *n, search_items *s)
term = str;
while (*term != ' ' && *term != ':')
term++;
- if (term == str)
+ if (term == str)
return 24;
saved = *term;
*term = 0;
@@ -804,9 +804,9 @@ static int parse_user(const lnode *n, search_items *s)
// USER_LOGIN for example.
str = strstr(term, "uid=");
if (str) {
- if (*(str-1)=='a' || *(str-1)=='s')
+ if (*(str - 1) == 'a' || *(str - 1) == 's' || *(str - 1) == 'u')
goto skip;
- if (!(*(str-1)=='\'' || *(str-1)==' '))
+ if (!(*(str - 1) == '\'' || *(str - 1) == ' '))
return 25;
ptr = str + 4;
term = ptr;
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ausearch: Fix parsing of uid in user space events
2012-02-07 16:30 [PATCH] ausearch: Fix parsing of uid in user space events Marcelo Cerri
@ 2012-02-07 22:11 ` Steve Grubb
0 siblings, 0 replies; 2+ messages in thread
From: Steve Grubb @ 2012-02-07 22:11 UTC (permalink / raw)
To: linux-audit; +Cc: gcwilson, bryntcor
On Tuesday, February 07, 2012 11:30:19 AM Marcelo Cerri wrote:
> The function parse_user aborts when it tries to parse a record which
> contains an uuid field (usually a VIRT_* record).
Thanks, looks like one fix for the parser messed up uuid parsing. Applied.
-Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-07 22:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 16:30 [PATCH] ausearch: Fix parsing of uid in user space events Marcelo Cerri
2012-02-07 22:11 ` Steve Grubb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox