]> git.proxmox.com Git - swtpm.git/commitdiff
swtpm: Fixed typo `fs_mount` vs `fsmount` and removed duplicates.
authorHans <49440977+hnj2@users.noreply.github.com>
Mon, 15 Aug 2022 12:06:27 +0000 (14:06 +0200)
committerStefan Berger <stefanb@us.ibm.com>
Mon, 15 Aug 2022 15:33:01 +0000 (11:33 -0400)
The project wouldn't compile on my ubuntu 20.04.1 based system with the error message:
```
  CC       libswtpm_libtpms_la-seccomp_profile.lo
In file included from seccomp_profile.c:44:
seccomp_profile.c: In function ‘create_seccomp_profile’:
seccomp_profile.c:105:9: error: ‘__SNR_fs_mount’ undeclared (first use in this function)
  105 |         SCMP_SYS(fs_mount),
      |         ^~~~~~~~
seccomp_profile.c:105:9: note: each undeclared identifier is reported only once for each function it appears in
```

Additionally, there were some duplicates in the profile.

Signed-off-by: Hans Niklas Jacob <hnj@posteo.de>
src/swtpm/seccomp_profile.c

index df27b2de98f3022e53e41d2b2a6990df051817c2..e22775d6fb2ea855b9c7d78af2bb706dc122f042 100644 (file)
@@ -102,7 +102,7 @@ int create_seccomp_profile(bool cusetpm, unsigned int action)
         SCMP_SYS(fsconfig),
 #endif
 #ifdef __NR_fsmount
-        SCMP_SYS(fs_mount),
+        SCMP_SYS(fsmount),
 #endif
 #ifdef __NR_fspick
         SCMP_SYS(fspick),
@@ -115,14 +115,8 @@ int create_seccomp_profile(bool cusetpm, unsigned int action)
         SCMP_SYS(mount_setattr),
 #endif
         SCMP_SYS(umount2),
-#ifdef __NR_fsmount
-        SCMP_SYS(fsmount),
-#endif
 #ifdef __NR_open_tree
         SCMP_SYS(open_tree),
-#endif
-#ifdef __NR_move_mount
-        SCMP_SYS(move_mount),
 #endif
         SCMP_SYS(swapon),
         SCMP_SYS(swapoff),