Description
When using the "github.com/docker/docker/pkg/mount" package's Mounted function, it falsely claims that a certain path is not mounted when in fact it is. It appears that a path containing spaces is not properly unescaped from /proc/self/mountinfo before being compared.
Steps to reproduce the issue:
mount /dev/sdx /mnt/foo\ bar
- call
mount.Mounted("/mnt/foo bar")
Describe the results you received:
false, nil
Describe the results you expected:
true, nil
Additional information you deem important (e.g. issue happens only occasionally):
This is probably something to check for on non-Linux platforms too.
Description
When using the "github.com/docker/docker/pkg/mount" package's
Mountedfunction, it falsely claims that a certain path is not mounted when in fact it is. It appears that a path containing spaces is not properly unescaped from/proc/self/mountinfobefore being compared.Steps to reproduce the issue:
mount /dev/sdx /mnt/foo\ barmount.Mounted("/mnt/foo bar")Describe the results you received:
false, nilDescribe the results you expected:
true, nilAdditional information you deem important (e.g. issue happens only occasionally):
This is probably something to check for on non-Linux platforms too.