drop %e from the core_pattern
Signed-off-by: Matej Habrnal <mhabrnal@redhat.com>
This commit is contained in:
parent
ba52311fcb
commit
04b13c6fc9
99
0001-ccpp-drop-e-from-the-core_pattern.patch
Normal file
99
0001-ccpp-drop-e-from-the-core_pattern.patch
Normal file
@ -0,0 +1,99 @@
|
||||
From 51531e9ea72af09571688a20f00e55cad5fe9c3a Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Filak <jfilak@redhat.com>
|
||||
Date: Tue, 9 Feb 2016 17:55:29 +0100
|
||||
Subject: [PATCH] ccpp: drop %e from the core_pattern
|
||||
|
||||
The argument is no longer need and it must be placed either at the end
|
||||
of the command or enclosed with '' as it can contain white space.
|
||||
|
||||
Threads can have an arbitrary name:
|
||||
man 3 pthread_setname_np
|
||||
|
||||
Signed-off-by: Jakub Filak <jfilak@redhat.com>
|
||||
---
|
||||
src/hooks/abrt-hook-ccpp.c | 16 ++++++++--------
|
||||
src/hooks/abrt-install-ccpp-hook.in | 12 +-----------
|
||||
2 files changed, 9 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/hooks/abrt-hook-ccpp.c b/src/hooks/abrt-hook-ccpp.c
|
||||
index 8f1b813..dfe9526 100644
|
||||
--- a/src/hooks/abrt-hook-ccpp.c
|
||||
+++ b/src/hooks/abrt-hook-ccpp.c
|
||||
@@ -143,9 +143,9 @@ static struct dump_dir *dd;
|
||||
* %u - uid
|
||||
* %g - gid
|
||||
* %t - UNIX time of dump
|
||||
- * %e - executable filename
|
||||
- * %i - crash thread tid
|
||||
* %P - global pid
|
||||
+ * %I - crash thread tid
|
||||
+ * %e - executable filename (can contain white spaces)
|
||||
* %% - output one "%"
|
||||
*/
|
||||
/* Hook must be installed with exactly the same sequence of %c specifiers.
|
||||
@@ -661,9 +661,9 @@ int main(int argc, char** argv)
|
||||
|
||||
if (argc < 8)
|
||||
{
|
||||
- /* percent specifier: %s %c %p %u %g %t %e %P %i*/
|
||||
- /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9]*/
|
||||
- error_msg_and_die("Usage: %s SIGNO CORE_SIZE_LIMIT PID UID GID TIME BINARY_NAME GLOBAL_PID [TID]", argv[0]);
|
||||
+ /* percent specifier: %s %c %p %u %g %t %P %T */
|
||||
+ /* argv: [0] [1] [2] [3] [4] [5] [6] [7] [8] */
|
||||
+ error_msg_and_die("Usage: %s SIGNO CORE_SIZE_LIMIT PID UID GID TIME GLOBAL_PID GLOBAL_TID", argv[0]);
|
||||
}
|
||||
|
||||
/* Not needed on 2.6.30.
|
||||
@@ -704,8 +704,8 @@ int main(int argc, char** argv)
|
||||
/* set to max possible >0 value */
|
||||
ulimit_c = ~((off_t)1 << (sizeof(off_t)*8-1));
|
||||
}
|
||||
- const char *global_pid_str = argv[8];
|
||||
- pid_t pid = xatoi_positive(argv[8]);
|
||||
+ const char *global_pid_str = argv[7];
|
||||
+ pid_t pid = xatoi_positive(argv[7]);
|
||||
|
||||
user_pwd = get_cwd(pid); /* may be NULL on error */
|
||||
log_notice("user_pwd:'%s'", user_pwd);
|
||||
@@ -867,7 +867,7 @@ int main(int argc, char** argv)
|
||||
signal_no, signame, "dumping core");
|
||||
|
||||
pid_t tid = -1;
|
||||
- const char *tid_str = argv[9];
|
||||
+ const char *tid_str = argv[8];
|
||||
if (tid_str)
|
||||
{
|
||||
tid = xatoi_positive(tid_str);
|
||||
diff --git a/src/hooks/abrt-install-ccpp-hook.in b/src/hooks/abrt-install-ccpp-hook.in
|
||||
index 707c57d..660c209 100755
|
||||
--- a/src/hooks/abrt-install-ccpp-hook.in
|
||||
+++ b/src/hooks/abrt-install-ccpp-hook.in
|
||||
@@ -11,9 +11,7 @@ SAVED_PATTERN_DIR="@VAR_RUN@/abrt"
|
||||
SAVED_PATTERN_FILE="@VAR_RUN@/abrt/saved_core_pattern"
|
||||
HOOK_BIN="@libexecdir@/abrt-hook-ccpp"
|
||||
# Must match percent_specifiers[] order in abrt-hook-ccpp.c:
|
||||
-PATTERN="|$HOOK_BIN %s %c %p %u %g %t %e %P %I"
|
||||
-# Same, but with bogus "executable name" parameter
|
||||
-PATTERN1="|$HOOK_BIN %s %c %p %u %g %t e %P %I"
|
||||
+PATTERN="|$HOOK_BIN %s %c %p %u %g %t %P %I"
|
||||
|
||||
# core_pipe_limit specifies how many dump_helpers can run at the same time
|
||||
# 0 - means unlimited, but it's not guaranteed that /proc/<pid> of crashing
|
||||
@@ -39,14 +37,6 @@ start() {
|
||||
cur=`cat "$PATTERN_FILE"`
|
||||
cur_first=`printf "%s" "$cur" | sed 's/ .*//'`
|
||||
|
||||
- # Is there a %e (executable name) in old pattern anywhere?
|
||||
- if test x"${cur#*%e}" = x"${cur}"; then
|
||||
- # No. Can use PATTERN with less risk of overflow
|
||||
- # on expansion (executable names can be LONG).
|
||||
- # Overflow would cause kernel to abort coredump. BAD.
|
||||
- PATTERN="$PATTERN1"
|
||||
- fi
|
||||
-
|
||||
$verbose && printf "cur:'%s'\n" "$cur"
|
||||
# Is it already installed?
|
||||
if test x"$cur_first" != x"|$HOOK_BIN"; then # no
|
||||
--
|
||||
2.5.0
|
||||
|
@ -49,7 +49,7 @@
|
||||
Summary: Automatic bug detection and reporting tool
|
||||
Name: abrt
|
||||
Version: 2.8.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/System
|
||||
URL: https://abrt.readthedocs.org/
|
||||
@ -59,6 +59,7 @@ Patch0: disable-OpenGPGCheck-in-Fedora-Rawhide.patch
|
||||
|
||||
# git format-patch %%{Version} --topo-order -N -M;
|
||||
# i=1; for p in `ls 0*.patch`; do printf "Patch%04d: %s\n" $i $p; ((i++)); done
|
||||
Patch0001: 0001-ccpp-drop-e-from-the-core_pattern.patch
|
||||
|
||||
# '%%autosetup -S git' -> git
|
||||
BuildRequires: git
|
||||
@ -1086,6 +1087,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
|
||||
|
||||
%changelog
|
||||
* Wed Feb 10 2016 Matej Habrnal <mhabrnal@redhat.com> 2.8.0-2
|
||||
- drop %e from the core_pattern
|
||||
|
||||
* Wed Feb 03 2016 Matej Habrnal <mhabrnal@redhat.com> 2.8.0-1
|
||||
- a-a-save-package-data: do not blacklist firefox
|
||||
- Resolves: #1304310
|
||||
|
Loading…
Reference in New Issue
Block a user