summaryrefslogtreecommitdiffhomepage
path: root/runsc/container
diff options
context:
space:
mode:
authorLantao Liu <lantaol@google.com>2018-09-04 13:36:26 -0700
committerShentubot <shentubot@google.com>2018-09-04 13:37:40 -0700
commit9ae4e28f75979905a6396962a232e217323499f9 (patch)
tree2af27d93429e174aae3d05686aac87c897d4252e /runsc/container
parent3944cb41cbef64ac507e87f258441000a46424d5 (diff)
runsc: fix container rootfs path.
PiperOrigin-RevId: 211515350 Change-Id: Ia495af57447c799909aa97bb873a50b87bee2625
Diffstat (limited to 'runsc/container')
-rw-r--r--runsc/container/fs.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/runsc/container/fs.go b/runsc/container/fs.go
index b93c866ea..fb352fc7c 100644
--- a/runsc/container/fs.go
+++ b/runsc/container/fs.go
@@ -78,9 +78,6 @@ func setupFS(spec *specs.Spec, conf *boot.Config, bundleDir string) error {
continue
}
src := m.Source
- if !filepath.IsAbs(src) {
- src = filepath.Join(bundleDir, src)
- }
srcfi, err := os.Stat(src)
if err != nil {
return fmt.Errorf("failed to stat() mount source: %v", err)
@@ -130,9 +127,6 @@ func setupFS(spec *specs.Spec, conf *boot.Config, bundleDir string) error {
log.Infof("Remounting root as readonly: %q", spec.Root.Path)
flags := uintptr(syscall.MS_BIND | syscall.MS_REMOUNT | syscall.MS_RDONLY | syscall.MS_REC)
src := spec.Root.Path
- if !filepath.IsAbs(src) {
- src = filepath.Join(bundleDir, src)
- }
if err := syscall.Mount(src, src, "bind", flags, ""); err != nil {
return fmt.Errorf("failed to remount root as readonly with source: %q, target: %q, flags: %#x, err: %v", spec.Root.Path, spec.Root.Path, flags, err)
}