From 301af7e4853ad0281402f8d86f5a77c6cb7ce9f4 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 29 Nov 2014 01:06:48 -0800 Subject: [PATCH] coredump: Support coredump.conf.d directories in the usual search paths --- Makefile-man.am | 6 ++++-- man/coredump.conf.xml | 14 +++++++++++--- src/journal/coredump.c | 9 +++++---- src/journal/coredump.conf | 3 +++ 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Makefile-man.am b/Makefile-man.am index 593dc4063..01d34087b 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -714,8 +714,10 @@ MANPAGES += \ man/coredumpctl.1 \ man/systemd-coredump.8 MANPAGES_ALIAS += \ - # - + man/coredump.conf.d.5 +man/coredump.conf.d.5: man/coredump.conf.5 +man/coredump.conf.d.html: man/coredump.conf.html + $(html-alias) endif diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml index 5eb5c5f19..37916f040 100644 --- a/man/coredump.conf.xml +++ b/man/coredump.conf.xml @@ -22,7 +22,8 @@ along with systemd; If not, see . --> - + coredump.conf systemd @@ -44,20 +45,27 @@ coredump.conf - Coredump storage configuration file + coredump.conf.d + Coredump storage configuration files /etc/systemd/coredump.conf + /etc/systemd/coredump.conf.d/*.conf + /run/systemd/coredump.conf.d/*.conf + /usr/lib/systemd/coredump.conf.d/*.conf Description - This file configures the behaviour of systemd-coredump, + These files configure the behaviour of systemd-coredump, a handler for core dumps invoked by the kernel. + + + Options diff --git a/src/journal/coredump.c b/src/journal/coredump.c index d889ed1f8..be45a684e 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -120,10 +120,11 @@ static int parse_config(void) { {} }; - return config_parse(NULL, "/etc/systemd/coredump.conf", NULL, - "Coredump\0", - config_item_table_lookup, items, - false, false, true, NULL); + return config_parse_many("/etc/systemd/coredump.conf", + CONF_DIRS_NULSTR("systemd/coredump.conf"), + "Coredump\0", + config_item_table_lookup, items, + false, NULL); } static int fix_acl(int fd, uid_t uid) { diff --git a/src/journal/coredump.conf b/src/journal/coredump.conf index 0cc328f54..0fe9fe801 100644 --- a/src/journal/coredump.conf +++ b/src/journal/coredump.conf @@ -5,6 +5,9 @@ # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. # +# You can override the directives in this file by creating files in +# /etc/systemd/coredump.conf.d/*.conf. +# # See coredump.conf(5) for details [Coredump] -- 2.30.2