File tree 1 file changed +17
-0
lines changed
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"
31
31
32
32
var (
33
33
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 {
34
44
"RLIMIT_AS" ,
35
45
"RLIMIT_CORE" ,
36
46
"RLIMIT_CPU" ,
@@ -869,6 +879,13 @@ func (v *Validator) rlimitValid(rlimit rspec.POSIXRlimit) (errs error) {
869
879
}
870
880
871
881
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" {
872
889
for _ , val := range defaultRlimits {
873
890
if val == rlimit .Type {
874
891
return
You can’t perform that action at this time.
0 commit comments