Skip to content

Commit d349388

Browse files
authored
Merge pull request #877 from Mashimiao/fix-valuetwo-optional
ValueTwo of arg in seccomp should be optional
2 parents c3ed25a + 42ee56e commit d349388

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

config-linux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ The following parameters can be specified to set up seccomp:
556556

557557
* **`index`** *(uint, REQUIRED)* - the index for syscall arguments in seccomp.
558558
* **`value`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
559-
* **`valueTwo`** *(uint64, REQUIRED)* - the value for syscall arguments in seccomp.
559+
* **`valueTwo`** *(uint64, OPTIONAL)* - the value for syscall arguments in seccomp.
560560
* **`op`** *(string, REQUIRED)* - the operator for syscall arguments in seccomp.
561561
A valid list of constants as of libseccomp v2.3.2 is shown below.
562562

schema/config-windows.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@
113113
"layerFolders"
114114
]
115115
}
116-
}
116+
}

schema/defs-linux.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,12 @@
6969
"op": {
7070
"$ref": "#/definitions/SeccompOperators"
7171
}
72-
}
72+
},
73+
"required": [
74+
"index",
75+
"value",
76+
"op"
77+
]
7378
},
7479
"Syscall": {
7580
"type": "object",

specs-go/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ const (
550550
type LinuxSeccompArg struct {
551551
Index uint `json:"index"`
552552
Value uint64 `json:"value"`
553-
ValueTwo uint64 `json:"valueTwo"`
553+
ValueTwo uint64 `json:"valueTwo,omiempty"`
554554
Op LinuxSeccompOperator `json:"op"`
555555
}
556556

0 commit comments

Comments
 (0)