|
|
b225ea |
From ec6296c489571286f6ba4dc586fdd936b899ba92 Mon Sep 17 00:00:00 2001
|
|
|
b225ea |
From: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
b225ea |
Date: Thu, 21 Apr 2016 15:54:03 +0200
|
|
|
b225ea |
Subject: [PATCH] ccpp: add xfunc_die() if cannot get executable
|
|
|
b225ea |
|
|
|
b225ea |
Also remove extra checks of executable.
|
|
|
b225ea |
|
|
|
b225ea |
Related to rhbz#1277849
|
|
|
b225ea |
|
|
|
b225ea |
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
|
|
|
b225ea |
---
|
|
|
b225ea |
src/hooks/abrt-hook-ccpp.c | 8 ++++++--
|
|
|
b225ea |
1 file changed, 6 insertions(+), 2 deletions(-)
|
|
|
b225ea |
|
|
|
b225ea |
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
|
|
|
b225ea |
index 8afd0d3..2c05c78 100644
|
|
|
b225ea |
--- a/src/hooks/abrt-hook-ccpp.c
|
|
|
b225ea |
+++ b/src/hooks/abrt-hook-ccpp.c
|
|
|
b225ea |
@@ -839,17 +839,21 @@ int main(int argc, char** argv)
|
|
|
b225ea |
int src_fd_binary = -1;
|
|
|
b225ea |
char *executable = get_executable(pid, setting_SaveBinaryImage ? &src_fd_binary : NULL);
|
|
|
b225ea |
if (executable == NULL)
|
|
|
b225ea |
+ {
|
|
|
b225ea |
error_msg_not_process_crash(pid_str, NULL, (long unsigned)uid, signal_no,
|
|
|
b225ea |
signame, "ignoring (can't read /proc/PID/exe link)");
|
|
|
b225ea |
|
|
|
b225ea |
- if (executable && strstr(executable, "/abrt-hook-ccpp"))
|
|
|
b225ea |
+ xfunc_die();
|
|
|
b225ea |
+ }
|
|
|
b225ea |
+
|
|
|
b225ea |
+ if (strstr(executable, "/abrt-hook-ccpp"))
|
|
|
b225ea |
{
|
|
|
b225ea |
error_msg_and_die("PID %lu is '%s', not dumping it to avoid recursion",
|
|
|
b225ea |
(long)pid, executable);
|
|
|
b225ea |
}
|
|
|
b225ea |
|
|
|
b225ea |
const char *last_slash = strrchr(executable, '/');
|
|
|
b225ea |
- if (executable && is_path_ignored(setting_ignored_paths, executable))
|
|
|
b225ea |
+ if (is_path_ignored(setting_ignored_paths, executable))
|
|
|
b225ea |
{
|
|
|
b225ea |
error_msg_not_process_crash(pid_str, last_slash + 1, (long unsigned)uid, signal_no,
|
|
|
b225ea |
signame, "ignoring (listed in 'IgnoredPaths')");
|
|
|
b225ea |
--
|
|
|
b225ea |
1.8.3.1
|
|
|
b225ea |
|