From f60a814e4d9da87ac0dd5835b9a790a0b63f54b3 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 18 Oct 2019 13:40:21 -0400 Subject: Add parsing for UID, GID in volume "o" option Everything else is a flag to mount, but "uid" and "gid" are not. We need to parse them out of "o" and handle them separately. Signed-off-by: Matthew Heon --- pkg/varlinkapi/volumes.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/varlinkapi/volumes.go') diff --git a/pkg/varlinkapi/volumes.go b/pkg/varlinkapi/volumes.go index 0ba76902e..2dddd3008 100644 --- a/pkg/varlinkapi/volumes.go +++ b/pkg/varlinkapi/volumes.go @@ -24,7 +24,11 @@ func (i *LibpodAPI) VolumeCreate(call iopodman.VarlinkCall, options iopodman.Vol volumeOptions = append(volumeOptions, libpod.WithVolumeLabels(options.Labels)) } if len(options.Options) > 0 { - volumeOptions = append(volumeOptions, libpod.WithVolumeOptions(options.Options)) + parsedOptions, err := shared.ParseVolumeOptions(options.Options) + if err != nil { + return call.ReplyErrorOccurred(err.Error()) + } + volumeOptions = append(volumeOptions, parsedOptions...) } newVolume, err := i.Runtime.NewVolume(getContext(), volumeOptions...) if err != nil { -- cgit v1.2.3-54-g00ecf