summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ftp-proxy/ftp-proxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ftp-proxy/ftp-proxy.c')
-rw-r--r--usr.sbin/ftp-proxy/ftp-proxy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ftp-proxy/ftp-proxy.c b/usr.sbin/ftp-proxy/ftp-proxy.c
index 5af8b46b042..366a6fabcac 100644
--- a/usr.sbin/ftp-proxy/ftp-proxy.c
+++ b/usr.sbin/ftp-proxy/ftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ftp-proxy.c,v 1.33 2015/12/22 08:35:17 mmcc Exp $ */
+/* $OpenBSD: ftp-proxy.c,v 1.34 2016/02/12 08:12:48 ajacoutot Exp $ */
/*
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -706,6 +706,9 @@ main(int argc, char *argv[])
if (getuid() != 0)
errx(1, "needs to start as root");
+ if (getpwnam(NOPRIV_USER) == NULL)
+ errx(1, "unknown user %s", NOPRIV_USER);
+
/* Raise max. open files limit to satisfy max. sessions. */
rlp.rlim_cur = rlp.rlim_max = (2 * max_sessions) + 10;
if (setrlimit(RLIMIT_NOFILE, &rlp) == -1)