[lxc-devel] [lxd/master] exec: Expose command, env and mode in metadata

stgraber on Github lxc-bot at linuxcontainers.org
Wed Oct 31 16:16:29 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 370 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181031/9af07543/attachment.bin>
-------------- next part --------------
From 094938b78c1b2fd7d62ebfe56599171637118131 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Wed, 31 Oct 2018 12:15:17 -0400
Subject: [PATCH] exec: Expose command, env and mode in metadata
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Closes #5231

Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
 lxd/container_exec.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lxd/container_exec.go b/lxd/container_exec.go
index 1d0bfeec20..71c694a06d 100644
--- a/lxd/container_exec.go
+++ b/lxd/container_exec.go
@@ -53,7 +53,12 @@ func (s *execWs) Metadata() interface{} {
 		}
 	}
 
-	return shared.Jmap{"fds": fds}
+	return shared.Jmap{
+		"fds":         fds,
+		"command":     s.command,
+		"environment": s.env,
+		"interactive": s.interactive,
+	}
 }
 
 func (s *execWs) Connect(op *operation, r *http.Request, w http.ResponseWriter) error {


More information about the lxc-devel mailing list