summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2012-07-26 18:48:43 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2012-07-26 18:48:43 +0200
commitcbf4c26e5f4e585e3c879ed4c2f766f4ef114f04 (patch)
treee056c983ee02ed2c0854ab6b1ccaa7b1609a7140
parentHarden opt for EOF and bad indicies. (diff)
downloadtelnet-password-honeypot-cbf4c26e5f4e585e3c879ed4c2f766f4ef114f04.tar.xz
telnet-password-honeypot-cbf4c26e5f4e585e3c879ed4c2f766f4ef114f04.zip
Increase address size limit for forks.
-rw-r--r--honeypot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/honeypot.c b/honeypot.c
index 6e5d0af..3075cab 100644
--- a/honeypot.c
+++ b/honeypot.c
@@ -427,8 +427,9 @@ void drop_privileges()
setrlimit(RLIMIT_DATA, &limit);
setrlimit(RLIMIT_FSIZE, &limit);
setrlimit(RLIMIT_MEMLOCK, &limit);
- setrlimit(RLIMIT_AS, &limit);
setrlimit(RLIMIT_STACK, &limit);
+ limit.rlim_cur = limit.rlim_max = 15728640 /* 15 megabytes */;
+ setrlimit(RLIMIT_AS, &limit);
limit.rlim_cur = limit.rlim_max = 0;
setrlimit(RLIMIT_CORE, &limit);
limit.rlim_cur = limit.rlim_max = 100;