We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5e5e247 + 447a73b commit 89907b6Copy full SHA for 89907b6
cmd/runtimetest/main.go
@@ -233,6 +233,17 @@ func validateMaskedPaths(spec *rspec.Spec) error {
233
return nil
234
}
235
236
+func validateROPaths(spec *rspec.Spec) error {
237
+ fmt.Println("validating readonlyPaths")
238
+ for _, v := range spec.Linux.ReadonlyPaths {
239
+ err := testWriteAccess(v)
240
+ if err == nil {
241
+ return fmt.Errorf("%v should be readonly", v)
242
+ }
243
244
+ return nil
245
+}
246
+
247
func main() {
248
spec, err := loadSpecConfig()
249
if err != nil {
@@ -247,6 +258,7 @@ func main() {
258
validateRlimits,
259
validateSysctls,
260
validateMaskedPaths,
261
+ validateROPaths,
250
262
251
263
252
264
for _, v := range validations {
0 commit comments