-
Notifications
You must be signed in to change notification settings - Fork 0
/
attr.go
27 lines (25 loc) · 1.28 KB
/
attr.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package forkexec
import (
"golang.org/x/net/bpf"
"syscall"
)
type Attr struct {
Dir string // Current working directory.
Env []string // Environment.
Files []uintptr // File descriptors.
Chroot string // Chroot.
Setsid bool // Create session.
Setpgid bool // Set process group ID to Pgid, or new pid if Pgid == 0.
Pdeathsig syscall.Signal // Signal that the process will get when its parent dies.
Pgid int // Child's process group ID if Setpgid.
Cloneflags uintptr // Flags for clone calls.
Seccomp []bpf.RawInstruction // The BPF seccomp syscall filter. Requires the no_new_privs attribute.
SeccompFlags uintptr // Flags for seccomp calls.
SetNoNewPrivs bool // Set the process' no_new_privs attribute.
UidMappings []syscall.SysProcIDMap // User ID mappings for user ns.
GidMappings []syscall.SysProcIDMap // Group ID mappings for user ns.
// No-op if GidMappings == nil. Otherwise, disable setgroups syscall
// for child. For unprivileged user namespace this should be set to
// false for mappings work.
GidMappingsEnableSetgroups bool
}