From 19863406cee41c1f806397173d04701b21e65478 Mon Sep 17 00:00:00 2001
From: Matej Habrnal <mhabrnal@redhat.com>
Date: Fri, 20 May 2016 15:50:05 +0200
Subject: [PATCH] a-dump-journal-xorg: allow *libexec/X* to be executable
element
Analyzed lot of xorg backtraces extracted from journal by ABRT and figured out
almost all crashes are from '/usr/libexec/Xorg' executable but default
executable /usr/bin/X(org) is wrongly used instead.
The rest of backtaces contain the substring 'bin/X' hence the
executable is determined right.
Allow executable element with "libexec/X" substring should limit using the
default executable wrongly.
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
---
src/plugins/xorg-utils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/xorg-utils.c b/src/plugins/xorg-utils.c
index 6039acd..a8dfc51 100644
--- a/src/plugins/xorg-utils.c
+++ b/src/plugins/xorg-utils.c
@@ -224,8 +224,8 @@ struct xorg_crash_info *process_xorg_bt(char *(*get_next_line)(void *), void *da
char *filename_end = skip_non_whitespace(filename);
char sv = *filename_end;
*filename_end = '\0';
- /* Does it look like "[/usr]/[s]bin/Xfoo"? */
- if (strstr(filename, "bin/X"))
+ /* Does it look like "[/usr]/[s]bin/Xfoo" or [/usr]/libexec/Xfoo"? */
+ if (strstr(filename, "bin/X") || strstr(filename, "libexec/X"))
exe = xstrdup(filename);
*filename_end = sv;
}
--
2.7.4