oci-executor: eval symlink for root

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
This commit is contained in:
Akihiro Suda
2018-06-07 16:04:55 +09:00
parent 5646fa3aa0
commit 43af03e59a

View File

@@ -73,7 +73,10 @@ func New(opt Opt) (executor.Executor, error) {
if err != nil {
return nil, err
}
// TODO: check that root is not symlink to fail early
root, err = filepath.EvalSymlinks(root)
if err != nil {
return nil, err
}
runtime := &runc.Runc{
Command: cmd,