summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/task_start.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-02-20 23:23:04 +0000
committergVisor bot <gvisor-bot@google.com>2020-02-20 23:23:04 +0000
commitf7f6b5ae0fad1f5bfd050b3b290e63efc83d7a28 (patch)
treedc72bfda207b99be7ee6ab527728d67e524f1552 /pkg/sentry/kernel/task_start.go
parentb1b3ef0213be56f5c3636b6399700ac313203f53 (diff)
parent4a73bae269ae9f52a962ae3b08a17ccaacf7ba80 (diff)
Merge release-20200211.0-57-g4a73bae (automated)
Diffstat (limited to 'pkg/sentry/kernel/task_start.go')
-rw-r--r--pkg/sentry/kernel/task_start.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/task_start.go b/pkg/sentry/kernel/task_start.go
index f9236a842..a5035bb7f 100644
--- a/pkg/sentry/kernel/task_start.go
+++ b/pkg/sentry/kernel/task_start.go
@@ -17,6 +17,7 @@ package kernel
import (
"gvisor.dev/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/sentry/arch"
+ "gvisor.dev/gvisor/pkg/sentry/inet"
"gvisor.dev/gvisor/pkg/sentry/kernel/auth"
"gvisor.dev/gvisor/pkg/sentry/kernel/futex"
"gvisor.dev/gvisor/pkg/sentry/kernel/sched"
@@ -65,9 +66,8 @@ type TaskConfig struct {
// Niceness is the niceness of the new task.
Niceness int
- // If NetworkNamespaced is true, the new task should observe a non-root
- // network namespace.
- NetworkNamespaced bool
+ // NetworkNamespace is the network namespace to be used for the new task.
+ NetworkNamespace *inet.Namespace
// AllowedCPUMask contains the cpus that this task can run on.
AllowedCPUMask sched.CPUSet
@@ -133,7 +133,7 @@ func (ts *TaskSet) newTask(cfg *TaskConfig) (*Task, error) {
allowedCPUMask: cfg.AllowedCPUMask.Copy(),
ioUsage: &usage.IO{},
niceness: cfg.Niceness,
- netns: cfg.NetworkNamespaced,
+ netns: cfg.NetworkNamespace,
utsns: cfg.UTSNamespace,
ipcns: cfg.IPCNamespace,
abstractSockets: cfg.AbstractSocketNamespace,