From 9777f5ca4eacad1bdfd283e10eb23828c0a8a2b4 Mon Sep 17 00:00:00 2001 From: Jia Zhang Date: Thu, 25 Jun 2020 00:37:11 +0800 Subject: [PATCH] rune: Minor code cleanup Signed-off-by: Jia Zhang --- rune/libcontainer/configs/validate/validator.go | 2 +- rune/libcontainer/container_linux.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rune/libcontainer/configs/validate/validator.go b/rune/libcontainer/configs/validate/validator.go index c7794b1..fc66053 100644 --- a/rune/libcontainer/configs/validate/validator.go +++ b/rune/libcontainer/configs/validate/validator.go @@ -224,7 +224,7 @@ func (v *ConfigValidator) enclave(config *configs.Config) error { path := config.Enclave.Path if config.Enclave.Signer != "server" { var err error - path, err = securejoin.SecureJoin(config.Rootfs, config.Enclave.Path) + path, err = securejoin.SecureJoin(config.Rootfs, path) if err != nil { return err } diff --git a/rune/libcontainer/container_linux.go b/rune/libcontainer/container_linux.go index 66dd1c4..0e7c850 100644 --- a/rune/libcontainer/container_linux.go +++ b/rune/libcontainer/container_linux.go @@ -532,11 +532,11 @@ func (c *linuxContainer) commandTemplate(p *Process, childInitPipe *os.File, chi } if c.config.Enclave.Path != "" { - cmd.Env = append(cmd.Env, "_LIBCONTAINER_PAL_PATH="+string(c.config.Enclave.Path)) + cmd.Env = append(cmd.Env, "_LIBCONTAINER_PAL_PATH="+c.config.Enclave.Path) } if c.config.Enclave.Signer != "server" { - cmd.Env = append(cmd.Env, "_LIBCONTAINER_PAL_ROOTFS="+string(c.config.Rootfs)) + cmd.Env = append(cmd.Env, "_LIBCONTAINER_PAL_ROOTFS="+c.config.Rootfs) } if detached { -- GitLab