summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorUrvashi Mohnani <umohnani@redhat.com>2020-12-07 10:57:46 -0500
committerUrvashi Mohnani <umohnani@redhat.com>2020-12-08 09:42:33 -0500
commit239bd57662162e9754421a31db9cf529cee8d701 (patch)
tree243ff699ca572057e974d3c546d46b9340529d65 /cmd
parente6f80fa61aa082d2226b8258ea247186451d84d3 (diff)
downloadpodman-239bd57662162e9754421a31db9cf529cee8d701.tar.gz
podman-239bd57662162e9754421a31db9cf529cee8d701.tar.bz2
podman-239bd57662162e9754421a31db9cf529cee8d701.zip
Add systempaths=unconfined option
Add the systempaths=unconfined option to --security-opt to match the docker options for unmasking all the paths that are masked by default. Add the mask and unmask options to the podman create doc. Signed-off-by: Urvashi Mohnani <umohnani@redhat.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/specgen.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index e0da142ad..c416d0d7b 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -531,6 +531,13 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
case "seccomp":
s.SeccompProfilePath = con[1]
s.Annotations[define.InspectAnnotationSeccomp] = con[1]
+ // this option is for docker compatibility, it is the same as unmask=ALL
+ case "systempaths":
+ if con[1] == "unconfined" {
+ s.ContainerSecurityConfig.Unmask = append(s.ContainerSecurityConfig.Unmask, []string{"ALL"}...)
+ } else {
+ return fmt.Errorf("invalid systempaths option %q, only `unconfined` is supported", con[1])
+ }
case "unmask":
s.ContainerSecurityConfig.Unmask = append(s.ContainerSecurityConfig.Unmask, strings.Split(con[1], ":")...)
default: