summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2013-01-17 09:19:53 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2013-01-17 09:19:53 +0100
commitff52cf806fcc00ceea3068c07d557cc44c240b4a (patch)
tree72214a6c6ee325ba49cf179392fd281fe689b73c
parentDo not hardcode size. (diff)
downloadtelnet-password-honeypot-ff52cf806fcc00ceea3068c07d557cc44c240b4a.tar.xz
telnet-password-honeypot-ff52cf806fcc00ceea3068c07d557cc44c240b4a.zip
Don't allow more privs.
-rw-r--r--honeypot.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/honeypot.c b/honeypot.c
index 34292e6..02fc17a 100644
--- a/honeypot.c
+++ b/honeypot.c
@@ -434,6 +434,8 @@ void drop_privileges()
setrlimit(RLIMIT_CORE, &limit);
limit.rlim_cur = limit.rlim_max = 100;
setrlimit(RLIMIT_NPROC, &limit);
+
+ prctl(PR_SET_NO_NEW_PRIVS, 1);
}
void handle_connection(int fd, char *ipaddr)