|
 |
16d03e |
From 28daf0653d324fad545a7031e64b6891f399969b Mon Sep 17 00:00:00 2001
|
|
 |
16d03e |
From: Kir Kolyshkin <kolyshkin@gmail.com>
|
|
 |
16d03e |
Date: Tue, 23 Feb 2021 17:58:07 -0800
|
|
 |
16d03e |
Subject: [PATCH 1/5] libct/newInitConfig: nit
|
|
 |
16d03e |
|
|
 |
16d03e |
Move the initialization of Console* fields as they are unconditional.
|
|
 |
16d03e |
|
|
 |
16d03e |
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
|
|
 |
16d03e |
---
|
|
 |
16d03e |
libcontainer/container_linux.go | 7 ++++---
|
|
 |
16d03e |
1 file changed, 4 insertions(+), 3 deletions(-)
|
|
 |
16d03e |
|
|
 |
16d03e |
diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go
|
|
 |
16d03e |
index 3dca29e4c3f2..b6100aae9d5a 100644
|
|
 |
16d03e |
--- a/libcontainer/container_linux.go
|
|
 |
16d03e |
+++ b/libcontainer/container_linux.go
|
|
 |
16d03e |
@@ -594,6 +594,9 @@ func (c *linuxContainer) newInitConfig(process *Process) *initConfig {
|
|
 |
16d03e |
AppArmorProfile: c.config.AppArmorProfile,
|
|
 |
16d03e |
ProcessLabel: c.config.ProcessLabel,
|
|
 |
16d03e |
Rlimits: c.config.Rlimits,
|
|
 |
16d03e |
+ CreateConsole: process.ConsoleSocket != nil,
|
|
 |
16d03e |
+ ConsoleWidth: process.ConsoleWidth,
|
|
 |
16d03e |
+ ConsoleHeight: process.ConsoleHeight,
|
|
 |
16d03e |
}
|
|
 |
16d03e |
if process.NoNewPrivileges != nil {
|
|
 |
16d03e |
cfg.NoNewPrivileges = *process.NoNewPrivileges
|
|
 |
16d03e |
@@ -607,9 +610,7 @@ func (c *linuxContainer) newInitConfig(process *Process) *initConfig {
|
|
 |
16d03e |
if len(process.Rlimits) > 0 {
|
|
 |
16d03e |
cfg.Rlimits = process.Rlimits
|
|
 |
16d03e |
}
|
|
 |
16d03e |
- cfg.CreateConsole = process.ConsoleSocket != nil
|
|
 |
16d03e |
- cfg.ConsoleWidth = process.ConsoleWidth
|
|
 |
16d03e |
- cfg.ConsoleHeight = process.ConsoleHeight
|
|
 |
16d03e |
+
|
|
 |
16d03e |
return cfg
|
|
 |
16d03e |
}
|
|
 |
16d03e |
|
|
 |
16d03e |
--
|
|
 |
16d03e |
2.31.1
|
|
 |
16d03e |
|