1/*-
2 * Copyright (c) 2011 James Gritton
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 11 unchanged lines hidden (view full) ---
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/usr.sbin/jail/config.c 241196 2012-10-04 18:59:46Z jamie $");
29
30#include <sys/types.h>
31#include <sys/errno.h>
32#include <sys/socket.h>
33#include <sys/sysctl.h>
34
35#include <arpa/inet.h>
36#include <netinet/in.h>
--- 39 unchanged lines hidden (view full) ---
76 [IP_EXEC_SYSTEM_JAIL_USER]= {"exec.system_jail_user",
77 PF_INTERNAL | PF_BOOL},
78 [IP_EXEC_SYSTEM_USER] = {"exec.system_user", PF_INTERNAL},
79 [IP_EXEC_TIMEOUT] = {"exec.timeout", PF_INTERNAL | PF_INT},
80#if defined(INET) || defined(INET6)
81 [IP_INTERFACE] = {"interface", PF_INTERNAL},
82 [IP_IP_HOSTNAME] = {"ip_hostname", PF_INTERNAL | PF_BOOL},
83#endif
84 [IP_MOUNT] = {"mount", PF_INTERNAL},
85 [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL},
86 [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL},
87 [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT},
88 [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL},
89#ifdef INET
90 [IP__IP4_IFADDR] = {"ip4.addr", PF_INTERNAL | PF_CONV},
91#endif
92#ifdef INET6
93 [IP__IP6_IFADDR] = {"ip6.addr", PF_INTERNAL | PF_CONV},
94#endif
95 [IP__MOUNT_FROM_FSTAB] = {"mount.fstab", PF_INTERNAL | PF_CONV},
96 [IP__OP] = {NULL, PF_CONV},
97 [KP_ALLOW_CHFLAGS] = {"allow.chflags", 0},
98 [KP_ALLOW_MOUNT] = {"allow.mount", 0},
99 [KP_ALLOW_RAW_SOCKETS] = {"allow.raw_sockets", 0},
100 [KP_ALLOW_SET_HOSTNAME]= {"allow.set_hostname", 0},
101 [KP_ALLOW_SOCKET_AF] = {"allow.socket_af", 0},
102 [KP_ALLOW_SYSVIPC] = {"allow.sysvipc", 0},
103 [KP_DEVFS_RULESET] = {"devfs_ruleset", 0},
--- 730 unchanged lines hidden ---
2 * Copyright (c) 2011 James Gritton
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
--- 11 unchanged lines hidden (view full) ---
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/usr.sbin/jail/config.c 241196 2012-10-04 18:59:46Z jamie $");
29
30#include <sys/types.h>
31#include <sys/errno.h>
32#include <sys/socket.h>
33#include <sys/sysctl.h>
34
35#include <arpa/inet.h>
36#include <netinet/in.h>
--- 39 unchanged lines hidden (view full) ---
76 [IP_EXEC_SYSTEM_JAIL_USER]= {"exec.system_jail_user",
77 PF_INTERNAL | PF_BOOL},
78 [IP_EXEC_SYSTEM_USER] = {"exec.system_user", PF_INTERNAL},
79 [IP_EXEC_TIMEOUT] = {"exec.timeout", PF_INTERNAL | PF_INT},
80#if defined(INET) || defined(INET6)
81 [IP_INTERFACE] = {"interface", PF_INTERNAL},
82 [IP_IP_HOSTNAME] = {"ip_hostname", PF_INTERNAL | PF_BOOL},
83#endif
84 [IP_MOUNT] = {"mount", PF_INTERNAL},
85 [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL},
86 [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL},
87 [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT},
88 [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL},
89#ifdef INET
90 [IP__IP4_IFADDR] = {"ip4.addr", PF_INTERNAL | PF_CONV},
91#endif
92#ifdef INET6
93 [IP__IP6_IFADDR] = {"ip6.addr", PF_INTERNAL | PF_CONV},
94#endif
95 [IP__MOUNT_FROM_FSTAB] = {"mount.fstab", PF_INTERNAL | PF_CONV},
96 [IP__OP] = {NULL, PF_CONV},
97 [KP_ALLOW_CHFLAGS] = {"allow.chflags", 0},
98 [KP_ALLOW_MOUNT] = {"allow.mount", 0},
99 [KP_ALLOW_RAW_SOCKETS] = {"allow.raw_sockets", 0},
100 [KP_ALLOW_SET_HOSTNAME]= {"allow.set_hostname", 0},
101 [KP_ALLOW_SOCKET_AF] = {"allow.socket_af", 0},
102 [KP_ALLOW_SYSVIPC] = {"allow.sysvipc", 0},
103 [KP_DEVFS_RULESET] = {"devfs_ruleset", 0},
--- 730 unchanged lines hidden ---