summaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-29 07:48:05 -0700
committerGitHub <noreply@github.com>2019-03-29 07:48:05 -0700
commit83cea5d5bc6af51cd7df66a34c80af0080d37ba6 (patch)
treef5b839ed15640e4c96a3d31cca4a2185b28c1ca6 /libpod/options.go
parentdd2bf915406444934e246fecf45e41937e2ff56f (diff)
parent1ae8a5b2858f43fc2f2b9640deae9dd945b52a98 (diff)
downloadpodman-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.go22
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 {