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 @@ -30,6 +30,16 @@ const specConfig = "config.json"
30
30
31
31
var (
32
32
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 {
33
43
"RLIMIT_AS" ,
34
44
"RLIMIT_CORE" ,
35
45
"RLIMIT_CPU" ,
@@ -821,6 +831,13 @@ func (v *Validator) rlimitValid(rlimit rspec.POSIXRlimit) (errs error) {
821
831
}
822
832
823
833
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" {
824
841
for _ , val := range defaultRlimits {
825
842
if val == rlimit .Type {
826
843
return
You can’t perform that action at this time.
0 commit comments