abrt/0027-correct-usage-of-abrt-gdb-exploitable.patch
Matej Habrnal b52e1a767a Fix bugs in a-auto-reporting, dbus, a-hook-ccpp and abrt-cli
Correct usage of abrt-gdb-exploitable.

Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
2015-08-17 09:51:23 +02:00

47 lines
1.7 KiB
Diff

From d3e01c97970b11d400aad2058bc215778da95513 Mon Sep 17 00:00:00 2001
From: Jakub Filak <jfilak@redhat.com>
Date: Mon, 17 Aug 2015 09:34:22 +0200
Subject: [PATCH] correct usage of abrt-gdb-exploitable
Fixes #988
Related to bugzilla.redhat.com/1253590
Signed-off-by: Jakub Filak <jfilak@redhat.com>
---
src/plugins/abrt-action-analyze-vulnerability | 2 +-
src/plugins/abrt-gdb-exploitable | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/plugins/abrt-action-analyze-vulnerability b/src/plugins/abrt-action-analyze-vulnerability
index aa63ff0..be5a492 100755
--- a/src/plugins/abrt-action-analyze-vulnerability
+++ b/src/plugins/abrt-action-analyze-vulnerability
@@ -30,7 +30,7 @@ export SIGNO_OF_THE_COREDUMP
# with explanation if severity is >= 4
GDBOUT=$(
gdb --batch \
- -ex 'python execfile("/usr/libexec/abrt-gdb-exploitable")' \
+ -ex 'python exec(open("/usr/libexec/abrt-gdb-exploitable").read())' \
-ex 'core-file ./coredump' \
-ex 'abrt-exploitable 4 ./exploitable' \
2>&1 \
diff --git a/src/plugins/abrt-gdb-exploitable b/src/plugins/abrt-gdb-exploitable
index 758c4c5..ac19668 100755
--- a/src/plugins/abrt-gdb-exploitable
+++ b/src/plugins/abrt-gdb-exploitable
@@ -1,9 +1,9 @@
#!/usr/bin/python3
# This is a GDB plugin.
# Usage:
-# gdb --batch -ex 'python execfile("THIS_FILE")' -ex run -ex abrt-exploitable PROG
+# gdb --batch -ex 'python exec(open("THIS_FILE").read())' -ex run -ex abrt-exploitable PROG
# or
-# gdb --batch -ex 'python execfile("THIS_FILE")' -ex 'core COREDUMP' -ex abrt-exploitable
+# gdb --batch -ex 'python exec(open("THIS_FILE").read())' -ex 'core COREDUMP' -ex abrt-exploitable
import sys
import os
--
2.4.3