Deleted Added
full compact
config.c (223351) config.c (232242)
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>
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: projects/jailconf/usr.sbin/jail/config.c 223351 2011-06-20 23:04:13Z jamie $");
28__FBSDID("$FreeBSD: projects/jailconf/usr.sbin/jail/config.c 232242 2012-02-27 22:37:35Z 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_USER] = {"exec.system_user", PF_INTERNAL},
77 [IP_EXEC_TIMEOUT] = {"exec.timeout", PF_INTERNAL | PF_INT},
78#if defined(INET) || defined(INET6)
79 [IP_INTERFACE] = {"interface", PF_INTERNAL},
80 [IP_IP_HOSTNAME] = {"ip_hostname", PF_INTERNAL | PF_BOOL},
81#endif
82 [IP_MOUNT] = {"mount", PF_INTERNAL},
83 [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL},
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_USER] = {"exec.system_user", PF_INTERNAL},
77 [IP_EXEC_TIMEOUT] = {"exec.timeout", PF_INTERNAL | PF_INT},
78#if defined(INET) || defined(INET6)
79 [IP_INTERFACE] = {"interface", PF_INTERNAL},
80 [IP_IP_HOSTNAME] = {"ip_hostname", PF_INTERNAL | PF_BOOL},
81#endif
82 [IP_MOUNT] = {"mount", PF_INTERNAL},
83 [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL},
84 [IP_MOUNT_DEVFS_RULESET]= {"mount.devfs.ruleset", PF_INTERNAL},
85 [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL},
86 [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT},
87 [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL},
88#ifdef INET
89 [IP__IP4_IFADDR] = {"ip4.addr", PF_INTERNAL | PF_CONV},
90#endif
91#ifdef INET6
92 [IP__IP6_IFADDR] = {"ip6.addr", PF_INTERNAL | PF_CONV},
93#endif
94 [IP__MOUNT_FROM_FSTAB] = {"mount.fstab", PF_INTERNAL | PF_CONV},
95 [IP__OP] = {NULL, PF_CONV},
96 [KP_ALLOW_CHFLAGS] = {"allow.chflags", 0},
97 [KP_ALLOW_MOUNT] = {"allow.mount", 0},
98 [KP_ALLOW_RAW_SOCKETS] = {"allow.raw_sockets", 0},
99 [KP_ALLOW_SET_HOSTNAME]= {"allow.set_hostname", 0},
100 [KP_ALLOW_SOCKET_AF] = {"allow.socket_af", 0},
101 [KP_ALLOW_SYSVIPC] = {"allow.sysvipc", 0},
84 [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL},
85 [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT},
86 [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL},
87#ifdef INET
88 [IP__IP4_IFADDR] = {"ip4.addr", PF_INTERNAL | PF_CONV},
89#endif
90#ifdef INET6
91 [IP__IP6_IFADDR] = {"ip6.addr", PF_INTERNAL | PF_CONV},
92#endif
93 [IP__MOUNT_FROM_FSTAB] = {"mount.fstab", PF_INTERNAL | PF_CONV},
94 [IP__OP] = {NULL, PF_CONV},
95 [KP_ALLOW_CHFLAGS] = {"allow.chflags", 0},
96 [KP_ALLOW_MOUNT] = {"allow.mount", 0},
97 [KP_ALLOW_RAW_SOCKETS] = {"allow.raw_sockets", 0},
98 [KP_ALLOW_SET_HOSTNAME]= {"allow.set_hostname", 0},
99 [KP_ALLOW_SOCKET_AF] = {"allow.socket_af", 0},
100 [KP_ALLOW_SYSVIPC] = {"allow.sysvipc", 0},
101 [KP_DEVFS_RULESET] = {"devfs_ruleset", 0},
102 [KP_ENFORCE_STATFS] = {"enforce_statfs", 0},
103 [KP_HOST_HOSTNAME] = {"host.hostname", 0},
104#ifdef INET
105 [KP_IP4_ADDR] = {"ip4.addr", 0},
106#endif
107#ifdef INET6
108 [KP_IP6_ADDR] = {"ip6.addr", 0},
109#endif

--- 722 unchanged lines hidden ---
102 [KP_ENFORCE_STATFS] = {"enforce_statfs", 0},
103 [KP_HOST_HOSTNAME] = {"host.hostname", 0},
104#ifdef INET
105 [KP_IP4_ADDR] = {"ip4.addr", 0},
106#endif
107#ifdef INET6
108 [KP_IP6_ADDR] = {"ip6.addr", 0},
109#endif

--- 722 unchanged lines hidden ---