Skip to content

Commit ceaa6aa

Browse files
committed
seccomp: let's update @File-system a bit
Let's add fremovexattr which was the only xattr syscall so far missing from the group, even though lremovexattr and friends where included. Add inotify_init, which is an older (but still supported) version of inotify_init1. Add oldfstat, oldlstat, oldstat which are old versions of the stat syscalls on some archs. Add utime, which is an older more limited version of utimes and utimensat. Enclose the "statx" entry in some ifdeffery to ensure libseccomp actually knows the syscall. If libseccomp doesn't know it, then we'd get EINVAL rather than EDOM (which is what is returned if a syscall is known but not available on the local system) when resolving the syscall name and we really don't want that, as we use the EDOM vs. EINVAL check for determining whether a syscall makes sense at all. Also, order things alphabetically.
1 parent 648a0ed commit ceaa6aa

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

src/shared/seccomp-util.c

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -362,24 +362,26 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
362362
"fchdir\0"
363363
"fchmod\0"
364364
"fchmodat\0"
365-
"fcntl64\0"
366365
"fcntl\0"
366+
"fcntl64\0"
367367
"fgetxattr\0"
368368
"flistxattr\0"
369+
"fremovexattr\0"
369370
"fsetxattr\0"
370-
"fstat64\0"
371371
"fstat\0"
372+
"fstat64\0"
372373
"fstatat64\0"
373-
"fstatfs64\0"
374374
"fstatfs\0"
375-
"ftruncate64\0"
375+
"fstatfs64\0"
376376
"ftruncate\0"
377+
"ftruncate64\0"
377378
"futimesat\0"
378379
"getcwd\0"
379-
"getdents64\0"
380380
"getdents\0"
381+
"getdents64\0"
381382
"getxattr\0"
382383
"inotify_add_watch\0"
384+
"inotify_init\0"
383385
"inotify_init1\0"
384386
"inotify_rm_watch\0"
385387
"lgetxattr\0"
@@ -389,36 +391,43 @@ const SyscallFilterSet syscall_filter_sets[_SYSCALL_FILTER_SET_MAX] = {
389391
"llistxattr\0"
390392
"lremovexattr\0"
391393
"lsetxattr\0"
392-
"lstat64\0"
393394
"lstat\0"
395+
"lstat64\0"
394396
"mkdir\0"
395397
"mkdirat\0"
396398
"mknod\0"
397399
"mknodat\0"
398-
"mmap2\0"
399400
"mmap\0"
401+
"mmap2\0"
400402
"munmap\0"
401403
"newfstatat\0"
404+
"oldfstat\0"
405+
"oldlstat\0"
406+
"oldstat\0"
402407
"open\0"
403408
"openat\0"
404409
"readlink\0"
405410
"readlinkat\0"
406411
"removexattr\0"
407412
"rename\0"
408-
"renameat2\0"
409413
"renameat\0"
414+
"renameat2\0"
410415
"rmdir\0"
411416
"setxattr\0"
412-
"stat64\0"
413417
"stat\0"
418+
"stat64\0"
414419
"statfs\0"
420+
"statfs64\0"
421+
#ifdef __PNR_statx
415422
"statx\0"
423+
#endif
416424
"symlink\0"
417425
"symlinkat\0"
418-
"truncate64\0"
419426
"truncate\0"
427+
"truncate64\0"
420428
"unlink\0"
421429
"unlinkat\0"
430+
"utime\0"
422431
"utimensat\0"
423432
"utimes\0"
424433
},

0 commit comments

Comments
 (0)