diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-08-08 02:11:55 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-08-08 02:11:55 +0900 |
| commit | edd6f2cfa9b08c5c43cea545f9ecc8b5021cf9d6 (patch) | |
| tree | eae14df2f830a2970671ef60c22d761c468aeab9 /container/container.go | |
| parent | acffa76812eb2972f2478b55fe2ba1e0ae8fa41d (diff) | |
container: document ambient capabilities
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'container/container.go')
| -rw-r--r-- | container/container.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/container/container.go b/container/container.go index a0e1c2d5..ea715d96 100644 --- a/container/container.go +++ b/container/container.go @@ -145,8 +145,14 @@ func (p *Container) Start() error { Cloneflags: CLONE_NEWUSER | CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | CLONE_NEWUTS | CLONE_NEWCGROUP, - // remain privileged for setup - AmbientCaps: []uintptr{CAP_SYS_ADMIN, CAP_SETPCAP, CAP_DAC_OVERRIDE}, + AmbientCaps: []uintptr{ + // general container setup + CAP_SYS_ADMIN, + // drop capabilities + CAP_SETPCAP, + // overlay access to upperdir and workdir + CAP_DAC_OVERRIDE, + }, UseCgroupFD: p.Cgroup != nil, } |
