Skip to content

Commit

Permalink
profiles/seccomp.Syscall: use pointers and omitempty
Browse files Browse the repository at this point in the history
These fields are optional, and this makes the JSON representation
slightly less verbose.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Jun 17, 2021
1 parent d927397 commit c7cd1b9
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 132 deletions.
104 changes: 24 additions & 80 deletions profiles/seccomp/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,7 @@
"write",
"writev"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {},
"excludes": {}
"action": "SCMP_ACT_ALLOW"
},
{
"names": [
Expand All @@ -405,11 +402,9 @@
"ptrace"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"minKernel": "4.8"
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -422,10 +417,7 @@
"value": 0,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
]
},
{
"names": [
Expand All @@ -438,10 +430,7 @@
"value": 8,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
]
},
{
"names": [
Expand All @@ -454,10 +443,7 @@
"value": 131072,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
]
},
{
"names": [
Expand All @@ -470,10 +456,7 @@
"value": 131080,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
]
},
{
"names": [
Expand All @@ -486,23 +469,18 @@
"value": 4294967295,
"op": "SCMP_CMP_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {}
]
},
{
"names": [
"sync_file_range2"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"arches": [
"ppc64le"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -514,43 +492,37 @@
"set_tls"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"arches": [
"arm",
"arm64"
]
},
"excludes": {}
}
},
{
"names": [
"arch_prctl"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"arches": [
"amd64",
"x32"
]
},
"excludes": {}
}
},
{
"names": [
"modify_ldt"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"arches": [
"amd64",
"x32",
"x86"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -559,27 +531,23 @@
"s390_runtime_instr"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"arches": [
"s390",
"s390x"
]
},
"excludes": {}
}
},
{
"names": [
"open_by_handle_at"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_DAC_READ_SEARCH"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -606,13 +574,11 @@
"unshare"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_ADMIN"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -626,8 +592,6 @@
"op": "SCMP_CMP_MASKED_EQ"
}
],
"comment": "",
"includes": {},
"excludes": {
"caps": [
"CAP_SYS_ADMIN"
Expand Down Expand Up @@ -668,26 +632,22 @@
"reboot"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_BOOT"
]
},
"excludes": {}
}
},
{
"names": [
"chroot"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_CHROOT"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -696,26 +656,22 @@
"finit_module"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_MODULE"
]
},
"excludes": {}
}
},
{
"names": [
"acct"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_PACCT"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -727,27 +683,23 @@
"ptrace"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_PTRACE"
]
},
"excludes": {}
}
},
{
"names": [
"iopl",
"ioperm"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_RAWIO"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -756,26 +708,22 @@
"clock_settime"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_TIME"
]
},
"excludes": {}
}
},
{
"names": [
"vhangup"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_TTY_CONFIG"
]
},
"excludes": {}
}
},
{
"names": [
Expand All @@ -784,26 +732,22 @@
"set_mempolicy"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYS_NICE"
]
},
"excludes": {}
}
},
{
"names": [
"syslog"
],
"action": "SCMP_ACT_ALLOW",
"comment": "",
"includes": {
"caps": [
"CAP_SYSLOG"
]
},
"excludes": {}
}
}
]
}
Loading

0 comments on commit c7cd1b9

Please sign in to comment.