File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,16 @@ const specConfig = "config.json"
3131
3232var (
3333 defaultRlimits = []string {
34+ "RLIMIT_AS" ,
35+ "RLIMIT_CORE" ,
36+ "RLIMIT_CPU" ,
37+ "RLIMIT_DATA" ,
38+ "RLIMIT_FSIZE" ,
39+ "RLIMIT_NOFILE" ,
40+ "RLIMIT_STACK" ,
41+ }
42+
43+ defaultLinuxRlimits = []string {
3444 "RLIMIT_AS" ,
3545 "RLIMIT_CORE" ,
3646 "RLIMIT_CPU" ,
@@ -869,6 +879,13 @@ func (v *Validator) rlimitValid(rlimit rspec.POSIXRlimit) (errs error) {
869879 }
870880
871881 if v .platform == "linux" {
882+ for _ , val := range defaultLinuxRlimits {
883+ if val == rlimit .Type {
884+ return
885+ }
886+ }
887+ errs = multierror .Append (errs , fmt .Errorf ("rlimit type %q is invalid" , rlimit .Type ))
888+ } else if v .platform == "solaris" {
872889 for _ , val := range defaultRlimits {
873890 if val == rlimit .Type {
874891 return
You can’t perform that action at this time.
0 commit comments