]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: port to pidref_namespace_open()
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2025 09:13:42 +0000 (10:13 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Jan 2025 13:14:17 +0000 (14:14 +0100)
src/coredump/coredump.c

index 1125298786c656dca3a53ec1b4465d8c778fbe46..9210d30688d3234215c29889db2d465f991504bc 100644 (file)
@@ -1710,12 +1710,13 @@ static int acquire_pid_mount_tree_fd(const Context *context, int *ret_fd) {
         if (socketpair(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, pair) < 0)
                 return log_error_errno(errno, "Failed to create socket pair: %m");
 
-        r = namespace_open(context->pidref.pid,
-                           /* ret_pidns_fd= */ NULL,
-                           &mntns_fd,
-                           /* ret_netns_fd= */ NULL,
-                           /* ret_userns_fd= */ NULL,
-                           &root_fd);
+        r = pidref_namespace_open(
+                        &context->pidref,
+                        /* ret_pidns_fd= */ NULL,
+                        &mntns_fd,
+                        /* ret_netns_fd= */ NULL,
+                        /* ret_userns_fd= */ NULL,
+                        &root_fd);
         if (r < 0)
                 return log_error_errno(r, "Failed to open mount namespace of crashing process: %m");