summaryrefslogtreecommitdiff
path: root/libpod/runtime_volume_linux.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-02-13 21:42:18 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2020-02-13 21:42:57 -0500
commitb4fa6f4f0819bcc0b85a5215564b937c374f315c (patch)
tree415ded3f8671a72252a5252391f32d9751ebe7a2 /libpod/runtime_volume_linux.go
parent0c060dace19710716ff8f3a65865a295312d9d94 (diff)
downloadpodman-b4fa6f4f0819bcc0b85a5215564b937c374f315c.tar.gz
podman-b4fa6f4f0819bcc0b85a5215564b937c374f315c.tar.bz2
podman-b4fa6f4f0819bcc0b85a5215564b937c374f315c.zip
Fix SELinux labels of volumes
If we attempt to label a volume and the file system does not support labeling, then just warn. SELinux may or may not work, on the volume. There is no way to setup a private label on a newly created volume without using the container mountlabel. If we don't have a mount label at the time of creation of the volume, the only option we have is to create a shared label. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/runtime_volume_linux.go')
-rw-r--r--libpod/runtime_volume_linux.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_volume_linux.go b/libpod/runtime_volume_linux.go
index e1f3480ce..037cf4cc2 100644
--- a/libpod/runtime_volume_linux.go
+++ b/libpod/runtime_volume_linux.go
@@ -85,7 +85,7 @@ func (r *Runtime) newVolume(ctx context.Context, options ...VolumeCreateOption)
if err := os.Chown(fullVolPath, volume.config.UID, volume.config.GID); err != nil {
return nil, errors.Wrapf(err, "error chowning volume directory %q to %d:%d", fullVolPath, volume.config.UID, volume.config.GID)
}
- if err := LabelVolumePath(fullVolPath, true); err != nil {
+ if err := LabelVolumePath(fullVolPath); err != nil {
return nil, err
}
volume.config.MountPoint = fullVolPath