Commit 5d2ada7
committed
api: add seccomp adjustment
This adds an adjustment for seccomp policies. The intent is that people can
wholesale replace policies, or parse them, make some changes, and then send
them back. Sending them *to* NRI via containerd requires some containerd
patches as well, those are here: https://github.com/tych0/containerd/commits/nri-seccomp/
Specifically, we are interested in making the listenerPath of the policy
dynamic based on a k8s pod spec, so we can't use the Localhost custom
policy (well, we can use most of it, except for listenerPath, which we have
an NRI plugin to change based on this code).
This patch is a lot of boilerplate, which is unfortunate. There is a much
smaller but similar patch:
tych0@a70547a
but it involves directly serializing a runtime-spec string
Finally, note the comment in generate.go: the runtime-tools generate code
does not have complete coverage for seccomp stuff, so I opted to not use
any of it, vs. adding more stuff to runtime-tools. The fact that there are
human and computer names is also confusing, it seems like we should stick
to the computer names for this particular interface.
Signed-off-by: Tycho Andersen <tycho@tycho.pizza>1 parent 6d486ac commit 5d2ada7
File tree
7 files changed
+963
-368
lines changed- pkg
- adaptation
- api
- runtime-tools/generate
7 files changed
+963
-368
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
222 | 225 | | |
223 | 226 | | |
224 | 227 | | |
| |||
738 | 741 | | |
739 | 742 | | |
740 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
741 | 760 | | |
742 | 761 | | |
743 | 762 | | |
| |||
976 | 995 | | |
977 | 996 | | |
978 | 997 | | |
| 998 | + | |
979 | 999 | | |
980 | 1000 | | |
981 | 1001 | | |
| |||
1096 | 1116 | | |
1097 | 1117 | | |
1098 | 1118 | | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1099 | 1123 | | |
1100 | 1124 | | |
1101 | 1125 | | |
| |||
1349 | 1373 | | |
1350 | 1374 | | |
1351 | 1375 | | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
1352 | 1384 | | |
1353 | 1385 | | |
1354 | 1386 | | |
| |||
0 commit comments