summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2015-07-16 12:02:11 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2015-07-16 12:02:11 +0200
commitb0b03cde704129d9a8b85349a12c40777fe8da7b (patch)
tree0d02e350d652e96411c792c13c016882117c85f1
parentWhoops forgot to change host name. (diff)
downloadtelnet-password-honeypot-b0b03cde704129d9a8b85349a12c40777fe8da7b.tar.xz
telnet-password-honeypot-b0b03cde704129d9a8b85349a12c40777fe8da7b.zip
Newest glibc requires mmap and fstat for fprintf'ing to a socket. Ugh
-rw-r--r--honeypot.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/honeypot.c b/honeypot.c
index be3a625..1e8ba38 100644
--- a/honeypot.c
+++ b/honeypot.c
@@ -441,6 +441,11 @@ void drop_privileges()
perror("prctl(NO_NEW_PRIVS");
exit(EXIT_FAILURE);
}
+
+ if (prctl(PR_SET_DUMPABLE, 0, 0, 0, 0)) {
+ perror("prctl(PR_SET_DUMPABLE)");
+ exit(EXIT_FAILURE);
+ }
}
void seccomp_enable_filter()
@@ -457,6 +462,8 @@ void seccomp_enable_filter()
ALLOW_SYSCALL(read),
ALLOW_SYSCALL(write),
ALLOW_SYSCALL(alarm),
+ ALLOW_SYSCALL(fstat),
+ ALLOW_SYSCALL(mmap),
KILL_PROCESS
};
struct sock_fprog prog = {