Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cmd/runtimetest/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,10 @@ func validateMaskedPaths(spec *rspec.Spec) error {
if err != io.EOF {
return fmt.Errorf("%v should not be readable", maskedPath)
}

if !filepath.IsAbs(maskedPath) {
return fmt.Errorf("maskdePath %v is not an absoulte path", maskedPath)
}
}
return nil
}
Expand All @@ -421,6 +425,10 @@ func validateROPaths(spec *rspec.Spec) error {
if err == nil {
return fmt.Errorf("%v should be readonly", v)
}

if !filepath.IsAbs(v) {
return fmt.Errorf("readonlyPath %v is not an absoulte path", v)
}
}

return nil
Expand Down