container_create: follow symlink for mount host path

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2017-09-18 15:53:48 +02:00
parent 5e7c932771
commit 59c0218a9c
No known key found for this signature in database
GPG key ID: B2BEAD150DE936B9

View file

@ -66,6 +66,11 @@ func addOCIBindMounts(mountLabel string, containerConfig *pb.ContainerConfig, sp
} }
} }
src, err := resolveSymbolicLink(src)
if err != nil {
return nil, fmt.Errorf("failed to resolve symlink %q: %v", src, err)
}
options := []string{"rw"} options := []string{"rw"}
if mount.Readonly { if mount.Readonly {
options = []string{"ro"} options = []string{"ro"}