File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,6 +30,16 @@ const specConfig = "config.json"
3030
3131var (
3232 defaultRlimits = []string {
33+ "RLIMIT_AS" ,
34+ "RLIMIT_CORE" ,
35+ "RLIMIT_CPU" ,
36+ "RLIMIT_DATA" ,
37+ "RLIMIT_FSIZE" ,
38+ "RLIMIT_NOFILE" ,
39+ "RLIMIT_STACK" ,
40+ }
41+
42+ defaultLinuxRlimits = []string {
3343 "RLIMIT_AS" ,
3444 "RLIMIT_CORE" ,
3545 "RLIMIT_CPU" ,
@@ -821,6 +831,13 @@ func (v *Validator) rlimitValid(rlimit rspec.POSIXRlimit) (errs error) {
821831 }
822832
823833 if v .platform == "linux" {
834+ for _ , val := range defaultLinuxRlimits {
835+ if val == rlimit .Type {
836+ return
837+ }
838+ }
839+ errs = multierror .Append (errs , fmt .Errorf ("rlimit type %q is invalid" , rlimit .Type ))
840+ } else if v .platform == "solaris" {
824841 for _ , val := range defaultRlimits {
825842 if val == rlimit .Type {
826843 return
You can’t perform that action at this time.
0 commit comments