(spec *specs.Process)
| 338 | } |
| 339 | |
| 340 | func validateProcessSpec(spec *specs.Process) error { |
| 341 | if spec == nil { |
| 342 | return errors.New("process property must not be empty") |
| 343 | } |
| 344 | if spec.Cwd == "" { |
| 345 | return errors.New("Cwd property must not be empty") |
| 346 | } |
| 347 | if !filepath.IsAbs(spec.Cwd) { |
| 348 | return errors.New("Cwd must be an absolute path") |
| 349 | } |
| 350 | if len(spec.Args) == 0 { |
| 351 | return errors.New("args must not be empty") |
| 352 | } |
| 353 | if spec.SelinuxLabel != "" && !selinux.GetEnabled() { |
| 354 | return errors.New("selinux label is specified in config, but selinux is disabled or not supported") |
| 355 | } |
| 356 | return nil |
| 357 | } |
| 358 | |
| 359 | type CtAct uint8 |
| 360 |
no outgoing calls
no test coverage detected
searching dependent graphs…