diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-12-03 00:49:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 00:49:23 +0100 |
commit | 5cf7aa65fb4786ee3dad191a725f6c37fae83bc3 (patch) | |
tree | 4cb2423eadbf20e7e0ab613845c21940beacb122 /docs/source/markdown/podman-run.1.md | |
parent | 7984842d7e55baa8fc9498afa23b62113850feac (diff) | |
parent | 0334b6195820f7261f87a4f4e5d739a6d560f4b2 (diff) | |
download | podman-5cf7aa65fb4786ee3dad191a725f6c37fae83bc3.tar.gz podman-5cf7aa65fb4786ee3dad191a725f6c37fae83bc3.tar.bz2 podman-5cf7aa65fb4786ee3dad191a725f6c37fae83bc3.zip |
Merge pull request #8408 from umohnani8/sec-opt
Add mask and unmask option to --security-opt
Diffstat (limited to 'docs/source/markdown/podman-run.1.md')
-rw-r--r-- | docs/source/markdown/podman-run.1.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 83aaa33e8..1038906c0 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -885,11 +885,16 @@ Security Options - **label=level:**_LEVEL_: Set the label level for the container processes - **label=filetype:**TYPE_: Set the label file type for the container files - **label=disable**: Turn off label separation for the container +- **mask**=_/path/1:/path/2_: The paths to mask separated by a colon. A masked path + cannot be accessed inside the container. - **no-new-privileges**: Disable container processes from gaining additional privileges - **seccomp=unconfined**: Turn off seccomp confinement for the container - **seccomp**=_profile.json_: Allowed syscall list seccomp JSON file to be used as a seccomp filter - **proc-opts**=_OPTIONS_ : Comma separated list of options to use for the /proc mount. More details for the possible mount options are specified at **proc(5)** man page. +- **unmask**=_ALL_ or _/path/1:/path/2_: Paths to unmask separated by a colon. If set to **ALL**, it will + unmask all the paths that are masked by default. + The default masked paths are **/proc/acpi, /proc/kcore, /proc/keys, /proc/latency_stats, /proc/sched_debug, /proc/scsi, /proc/timer_list, /proc/timer_stats, /sys/firmware, and /sys/fs/selinux.** Note: Labeling can be disabled for all containers by setting **label=false** in the **containers.conf**(5) file. @@ -1479,6 +1484,26 @@ $ podman run --security-opt label=type:svirt_apache_t -i -t centos bash Note you would have to write policy defining a **svirt_apache_t** type. +To mask additional specific paths in the container, specify the paths +separated by a colon using the **mask** option with the **--security-opt** +flag. + +``` +$ podman run --security-opt mask=/foo/bar:/second/path fedora bash +``` + +To unmask all the paths that are masked by default, set the **unmask** option to +**ALL**. Or to only unmask specific paths, specify the paths as shown above with +the **mask** option. + +``` +$ podman run --security-opt unmask=ALL fedora bash +``` + +``` +$ podman run --security-opt unmask=/foo/bar:/sys/firmware fedora bash +``` + ### Setting device weight If you want to set _/dev/sda_ device weight to **200**, you can specify the device |