mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
runtime: use filepath.Clean() to clean the mount path
Fix path check bypassed issuse introduced by #6082, use filepath.Clean() to clean path before check Fixes: #6082 Signed-off-by: XDTG <click1799@163.com>
This commit is contained in:
@@ -41,6 +41,10 @@ func TestIsSystemMount(t *testing.T) {
|
||||
{"/home", false},
|
||||
{"/dev/block/", false},
|
||||
{"/mnt/dev/foo", false},
|
||||
{"/../sys", true},
|
||||
{"/../sys/", true},
|
||||
{"/../sys/fs/cgroup", true},
|
||||
{"/../sysfoo", false},
|
||||
}
|
||||
|
||||
for _, test := range tests {
|
||||
|
||||
Reference in New Issue
Block a user