1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
freebsd-ports/ftp/proftpd/files/extra-patch-7-src-fsio.c
Martin Matuska 9f6afb2449 Allow build on patched FreeBSD 7.x (FreeBSD-SA-11:07.chroot)
WITH_SHAPER requires WITH_CTRLS [1]

PR:		ports/163941 [1]
Reported by:	Matthew Pounsett <matt@conundrum.com> [1]
2012-01-13 20:18:39 +00:00

20 lines
460 B
C

--- src/fsio.c.orig 2010-04-12 12:00:00.000000000 -0700
+++ src/fsio.c 2011-12-16 15:12:07.799166185 -0800
@@ -50,6 +50,8 @@
# include <acl/libacl.h>
#endif
+#include <unistd.h>
+
typedef struct fsopendir fsopendir_t;
struct fsopendir {
@@ -287,6 +289,7 @@
static int sys_chroot(pr_fs_t *fs, const char *path) {
if (chroot(path) < 0)
return -1;
+ __FreeBSD_libc_enter_restricted_mode();
session.chroot_path = (char *) path;
return 0;