Skip to content

Commit be95ebc

Browse files
committed
Fix warning in SECCOMP killing build.
Instead tell user what it means really. This means that Travis can build with SECCOMP.
1 parent b480b16 commit be95ebc

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ sudo: false
1717
script:
1818
- "uname -a"
1919
- "bash node_build/run_jshint"
20-
# travis' new container infrastructure's libc doesn't have SIGSYS signal info
21-
- "Seccomp_NO=1 ./do"
20+
- "./do"

util/Seccomp.c

+9-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "util/Seccomp.h"
2020
#include "util/Bits.h"
2121
#include "util/ArchInfo.h"
22+
#include "util/Defined.h"
2223

2324
// getpriority()
2425
#include <sys/resource.h>
@@ -51,14 +52,21 @@
5152
#if defined(si_syscall)
5253
# define GET_SYSCALL_NUM(si) ((si)->si_syscall)
5354
#else
54-
# warning "your libc doesn't define SIGSYS signal info! Try build witch Seccomp_NO=1"
55+
#pragma message "your libc doesn't define SIGSYS signal info! \
56+
info about syscall number in case of SECCOMP crash can be invalid"
5557
# define GET_SYSCALL_NUM(si) ((si)->si_value.sival_int)
5658
#endif
5759

5860
static void catchViolation(int sig, siginfo_t* si, void* threadContext)
5961
{
6062
printf("Attempted banned syscall number [%d] see doc/Seccomp.md for more information\n",
6163
GET_SYSCALL_NUM(si));
64+
65+
if (Defined(si_syscall)) {
66+
printf("Your libc doesn't define SIGSYS signal info. "
67+
"Above information about syscall number can be invalid.\n");
68+
}
69+
6270
Assert_failure("Disallowed Syscall");
6371
}
6472

0 commit comments

Comments
 (0)