]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: rename AccessContainer= to EnterNamespace=
authorMichal Sekletar <msekleta@redhat.com>
Tue, 10 Sep 2024 17:32:57 +0000 (19:32 +0200)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 30 Oct 2024 12:38:27 +0000 (12:38 +0000)
man/coredump.conf.xml
src/coredump/coredump.c
src/coredump/coredump.conf

index 65772d84d7eaaa3700b7d8e90acdf8405fd54a1a..80019de44cdfc2f1054ae2ce365eb47b07dcfc69 100644 (file)
       </varlistentry>
 
       <varlistentry>
-        <term><varname>AccessContainer=</varname></term>
+        <term><varname>EnterNamespace=</varname></term>
 
         <listitem><para>Controls whether <command>systemd-coredump</command> 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 <literal>yes</literal>, then <command>systemd-coredump</command> 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 <filename>/var/lib/systemd/coredump/</filename> even if <varname>AccessContainer=</varname>
+        binary and libraries from the mount namespace. Note that the coredump of the namespaced process might
+        still be saved in <filename>/var/lib/systemd/coredump/</filename> even if <varname>EnterNamespace=</varname>
         is set to <literal>no</literal>. Defaults to <literal>no</literal>.</para>
 
         <xi:include href="version-info.xml" xpointer="v257"/>
index 1a138932227fb6c806a75df4aa687bc4c4d48903..72e964aa08885e8a912cb10730ef3321bf6cc857 100644 (file)
@@ -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;
index 2790bf1be640bf56f775d0f8ef31d0a3d21245cb..181aede9da0119867ddb8f72513761ed194fcddf 100644 (file)
@@ -25,4 +25,4 @@
 #JournalSizeMax=767M
 #MaxUse=
 #KeepFree=
-#AccessContainer=no
+#EnterNamespace=no