From b74a08dda968a161e066c92c1bf5b4489e5a4fbd Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 18 Mar 2025 02:17:46 +0900 Subject: sandbox: prepare ops early Some setup code needs to run in host root. This change allows that to happen. Signed-off-by: Ophestra --- sandbox/path.go | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'sandbox/path.go') diff --git a/sandbox/path.go b/sandbox/path.go index 6c5a6e2c..4057748d 100644 --- a/sandbox/path.go +++ b/sandbox/path.go @@ -26,25 +26,6 @@ func toHost(name string) string { return path.Join(hostPath, name) } -func realpathHost(name string) (string, error) { - source := toHost(name) - rp, err := os.Readlink(source) - - if err != nil { - if errors.Is(err, syscall.EINVAL) { - // not a symlink - return name, nil - } - return "", err - } - - if !path.IsAbs(rp) { - return name, nil - } - msg.Verbosef("path %q resolves to %q", name, rp) - return rp, nil -} - func createFile(name string, perm os.FileMode, content []byte) error { if err := os.MkdirAll(path.Dir(name), 0755); err != nil { return err -- cgit v1.3.1