From 8ec1eb5d9ffa59732bd8d678c699d5e96e25ffe2 Mon Sep 17 00:00:00 2001 From: Xin Li Date: Fri, 9 Dec 2011 10:39:55 -0800 Subject: [PATCH 3/3] Utilize the new API to disable libc dlopens in ftpd(8). --- libexec/ftpd/ftpd.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 5894f3c..f0fb6db 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -71,6 +71,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1562,6 +1563,7 @@ skip: reply(550, "Can't change root."); goto bad; } + __FreeBSD_libc_enter_restricted_mode(); } else /* real user w/o chroot */ homedir = pw->pw_dir; /* -- 1.7.7.4