]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
seccomp: two fixes for the syscall set tables
authorLennart Poettering <lennart@poettering.net>
Fri, 21 Oct 2016 19:15:43 +0000 (21:15 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Oct 2016 15:32:50 +0000 (17:32 +0200)
"oldumount()" is not a syscall, but simply a wrapper for it, the actual syscall
nr is called "umount" (and the nr of umount() is called umount2 internally).

"sysctl()" is not a syscall, but "_syscall()" is. Fix this in the table.

Without these changes libseccomp cannot actually translate the tables in full.
This wasn't noticed before as the code was written defensively for this case.

src/shared/seccomp-util.c

index 0b9fa47c4403af7fcfb32e2425b6ac0f9e9d0357..f1e9de05b2fe40054eedcbfd40d1fc8ac592dca1 100644 (file)
@@ -272,7 +272,6 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 .value =
                 "chroot\0"
                 "mount\0"
-                "oldumount\0"
                 "pivot_root\0"
                 "umount2\0"
                 "umount\0"
@@ -371,7 +370,7 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
                 "setuid\0"
                 "swapoff\0"
                 "swapon\0"
-                "sysctl\0"
+                "_sysctl\0"
                 "vhangup\0"
         },
         [SYSCALL_FILTER_SET_PROCESS] = {