Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 6f1145e

Browse files
authored
Merge pull request #64 from thaJeztah/18.09_backport_syslog
[18.09 backport] move the syslog syscall to be gated by CAP_SYS_ADMIN or CAP_SYSLOG
2 parents ef87a66 + 16836e6 commit 6f1145e

2 files changed

Lines changed: 26 additions & 2 deletions

File tree

profiles/seccomp/default.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@
329329
"sync_file_range",
330330
"syncfs",
331331
"sysinfo",
332-
"syslog",
333332
"tee",
334333
"tgkill",
335334
"time",
@@ -561,6 +560,7 @@
561560
"setdomainname",
562561
"sethostname",
563562
"setns",
563+
"syslog",
564564
"umount",
565565
"umount2",
566566
"unshare"
@@ -762,6 +762,20 @@
762762
]
763763
},
764764
"excludes": {}
765+
},
766+
{
767+
"names": [
768+
"syslog"
769+
],
770+
"action": "SCMP_ACT_ALLOW",
771+
"args": [],
772+
"comment": "",
773+
"includes": {
774+
"caps": [
775+
"CAP_SYSLOG"
776+
]
777+
},
778+
"excludes": {}
765779
}
766780
]
767781
}

profiles/seccomp/seccomp_default.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ func DefaultProfile() *types.Seccomp {
322322
"sync_file_range",
323323
"syncfs",
324324
"sysinfo",
325-
"syslog",
326325
"tee",
327326
"tgkill",
328327
"time",
@@ -492,6 +491,7 @@ func DefaultProfile() *types.Seccomp {
492491
"setdomainname",
493492
"sethostname",
494493
"setns",
494+
"syslog",
495495
"umount",
496496
"umount2",
497497
"unshare",
@@ -642,6 +642,16 @@ func DefaultProfile() *types.Seccomp {
642642
Caps: []string{"CAP_SYS_NICE"},
643643
},
644644
},
645+
{
646+
Names: []string{
647+
"syslog",
648+
},
649+
Action: types.ActAllow,
650+
Args: []*types.Arg{},
651+
Includes: types.Filter{
652+
Caps: []string{"CAP_SYSLOG"},
653+
},
654+
},
645655
}
646656

647657
return &types.Seccomp{

0 commit comments

Comments
 (0)