From: Michal Sekletar Date: Tue, 10 Sep 2024 17:32:57 +0000 (+0200) Subject: coredump: rename AccessContainer= to EnterNamespace= X-Git-Tag: v257-rc1~99^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e26a7e08f57ab93981a95d3774dfb1e105f635e6;p=thirdparty%2Fsystemd.git coredump: rename AccessContainer= to EnterNamespace= --- diff --git a/man/coredump.conf.xml b/man/coredump.conf.xml index 65772d84d7e..80019de44cd 100644 --- a/man/coredump.conf.xml +++ b/man/coredump.conf.xml @@ -110,14 +110,14 @@ - AccessContainer= + EnterNamespace= Controls whether systemd-coredump will attempt to use the mount tree of - a process that crashed within a container. Access to the container's filesystem might be necessary to generate + a process that crashed in PID namespace. Access to the namespace's mount tree might be necessary to generate a fully symbolized backtrace. If set to yes, then systemd-coredump will obtain the mount tree from corresponding mount namespace and will try to generate the stack trace using the - binary and libraries from the mount namespace. Note that the coredump of the containerized process might - still be saved in /var/lib/systemd/coredump/ even if AccessContainer= + binary and libraries from the mount namespace. Note that the coredump of the namespaced process might + still be saved in /var/lib/systemd/coredump/ even if EnterNamespace= is set to no. Defaults to no. diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 1a138932227..72e964aa088 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -173,7 +173,9 @@ static uint64_t arg_external_size_max = EXTERNAL_SIZE_MAX; static uint64_t arg_journal_size_max = JOURNAL_SIZE_MAX; static uint64_t arg_keep_free = UINT64_MAX; static uint64_t arg_max_use = UINT64_MAX; -static bool arg_access_container = false; +#if HAVE_DWFL_SET_SYSROOT +static bool arg_enter_namespace = false; +#endif static int parse_config(void) { static const ConfigTableItem items[] = { @@ -185,9 +187,9 @@ static int parse_config(void) { { "Coredump", "KeepFree", config_parse_iec_uint64, 0, &arg_keep_free }, { "Coredump", "MaxUse", config_parse_iec_uint64, 0, &arg_max_use }, #if HAVE_DWFL_SET_SYSROOT - { "Coredump", "AccessContainer", config_parse_bool, 0, &arg_access_container }, + { "Coredump", "EnterNamespace", config_parse_bool, 0, &arg_enter_namespace }, #else - { "Coredump", "AccessContainer", config_parse_warn_compat, DISABLED_CONFIGURATION, 0 }, + { "Coredump", "EnterNamespace", config_parse_warn_compat, DISABLED_CONFIGURATION, 0 }, #endif {} }; @@ -1669,7 +1671,7 @@ static int gather_pid_mount_tree_fd(const Context *context, int *ret_fd) { assert(context); assert(ret_fd); - if (!arg_access_container) { + if (!arg_enter_namespace) { *ret_fd = -EHOSTDOWN; log_debug("EnterNamespace=no so we won't use mount tree of the crashed process for generating backtrace."); return 0; diff --git a/src/coredump/coredump.conf b/src/coredump/coredump.conf index 2790bf1be64..181aede9da0 100644 --- a/src/coredump/coredump.conf +++ b/src/coredump/coredump.conf @@ -25,4 +25,4 @@ #JournalSizeMax=767M #MaxUse= #KeepFree= -#AccessContainer=no +#EnterNamespace=no