From: Lennart Poettering Date: Tue, 7 Jan 2025 09:13:42 +0000 (+0100) Subject: coredump: port to pidref_namespace_open() X-Git-Tag: v258-rc1~1634^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36812cb65976869ef80dbe7fd552565740ab6b11;p=thirdparty%2Fsystemd.git coredump: port to pidref_namespace_open() --- diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index 1125298786c..9210d30688d 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -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");