[lxc-devel] [lxd/master] seccomp: fix error reporting

brauner on Github lxc-bot at linuxcontainers.org
Wed Jul 10 17:28:04 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190710/bd5fce15/attachment.bin>
-------------- next part --------------
From 52250ceceb90699fdd6fd1cc13ba53da6c76c441 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Wed, 10 Jul 2019 19:27:16 +0200
Subject: [PATCH] seccomp: fix error reporting

Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
 lxd/seccomp.go | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lxd/seccomp.go b/lxd/seccomp.go
index 9b935d6192..91b98603c8 100644
--- a/lxd/seccomp.go
+++ b/lxd/seccomp.go
@@ -861,6 +861,8 @@ func (s *SeccompServer) Handler(c net.Conn, clientFd int, ucred *ucred,
 				err = c.InsertSeccompUnixDevice(fmt.Sprintf("forkmknod.unix.%d", int(cPid)), dev, int(cPid))
 				if err != nil {
 					goErrno = int(-C.EPERM)
+				} else {
+					goErrno = 0
 				}
 			}
 		}


More information about the lxc-devel mailing list