diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-03-29 07:48:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-29 07:48:05 -0700 |
commit | 83cea5d5bc6af51cd7df66a34c80af0080d37ba6 (patch) | |
tree | f5b839ed15640e4c96a3d31cca4a2185b28c1ca6 /libpod/options.go | |
parent | dd2bf915406444934e246fecf45e41937e2ff56f (diff) | |
parent | 1ae8a5b2858f43fc2f2b9640deae9dd945b52a98 (diff) | |
download | podman-83cea5d5bc6af51cd7df66a34c80af0080d37ba6.tar.gz podman-83cea5d5bc6af51cd7df66a34c80af0080d37ba6.tar.bz2 podman-83cea5d5bc6af51cd7df66a34c80af0080d37ba6.zip |
Merge pull request #2730 from giuseppe/userns-take-rid-of-intermediate-mountns
userns: do not use an intermediate mount namespace
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 55a0c0999..24f126e66 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1274,6 +1274,28 @@ func WithVolumeName(name string) VolumeCreateOption { } } +// WithVolumeUID sets the uid of the owner. +func WithVolumeUID(uid int) VolumeCreateOption { + return func(volume *Volume) error { + if volume.valid { + return ErrVolumeFinalized + } + volume.config.UID = uid + return nil + } +} + +// WithVolumeGID sets the gid of the owner. +func WithVolumeGID(gid int) VolumeCreateOption { + return func(volume *Volume) error { + if volume.valid { + return ErrVolumeFinalized + } + volume.config.GID = gid + return nil + } +} + // WithVolumeLabels sets the labels of the volume. func WithVolumeLabels(labels map[string]string) VolumeCreateOption { return func(volume *Volume) error { |