summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavor Kapsa <davor.kapsa@gmail.com>2019-10-11 06:38:26 +0200
committerGitHub <noreply@github.com>2019-10-11 06:38:26 +0200
commitfec0663bb7a8ca8273a8f51480e183ef207d0e2a (patch)
treeaebaed2d9e3c24fb18e15e2535af254c55e7181d
parent53960d48c7ecb9422b3cece2372060e434cb073e (diff)
Set base to root
-rw-r--r--runsc/cmd/gofer.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/runsc/cmd/gofer.go b/runsc/cmd/gofer.go
index 7dfe00399..4c2fb80bf 100644
--- a/runsc/cmd/gofer.go
+++ b/runsc/cmd/gofer.go
@@ -423,6 +423,7 @@ func resolveSymlinksImpl(root, base, rel string, followCount uint) (string, erro
path := filepath.Join(base, name)
if !strings.HasPrefix(path, root) {
// One cannot '..' their way out of root.
+ base = root
continue
}
fi, err := os.Lstat(path)