The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8032

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
Somehow the compiler didn't detect that we called a non-existing function.

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
From 00587b8755563027597bc42e2d7d85570f658519 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brau...@ubuntu.com>
Date: Wed, 14 Oct 2020 18:22:43 +0200
Subject: [PATCH] forksyscall: use correct function

Somehow the compiler didn't detect that we called a non-existing function.

Signed-off-by: Christian Brauner <christian.brau...@ubuntu.com>
---
 lxd/main_forksyscall.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lxd/main_forksyscall.go b/lxd/main_forksyscall.go
index 4b770e73e7..a5b9c565da 100644
--- a/lxd/main_forksyscall.go
+++ b/lxd/main_forksyscall.go
@@ -35,7 +35,7 @@ import (
 extern char* advance_arg(bool required);
 extern void attach_userns_fd(int ns_fd);
 extern int pidfd_nsfd(int pidfd, pid_t pid);
-extern int preserve_ns(const int pid, const char *ns);
+extern int preserve_ns(pid_t pid, int ns_fd, const char *ns);
 extern bool change_namespaces(int pidfd, int nsfd, unsigned int flags);
 
 static bool chdirchroot_in_mntns(int cwd_fd, int root_fd)
@@ -371,7 +371,7 @@ static void mount_emulate(void)
                data = advance_arg(false);
        }
 
-       mnt_fd = preserve_ns(getpid(), "mnt");
+       mnt_fd = preserve_ns(getpid(), ns_fd, "mnt");
        if (mnt_fd < 0)
                _exit(EXIT_FAILURE);
 
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to