jailp.h (214423) | jailp.h (214649) |
---|---|
1/*- 2 * Copyright (c) 2010 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * | 1/*- 2 * Copyright (c) 2010 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 --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 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 * $FreeBSD: projects/jailconf/usr.sbin/jail/jailp.h 214423 2010-10-27 16:22:54Z jamie $ | 26 * $FreeBSD: projects/jailconf/usr.sbin/jail/jailp.h 214649 2010-11-01 21:37:28Z jamie $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/types.h> 31#include <sys/jail.h> 32#include <sys/queue.h> 33#include <sys/time.h> 34 --- 17 unchanged lines hidden (view full) --- 52#define PF_CONV 0x40 /* Parameter duplicated in converted form */ 53 54#define JF_START 0x0001 /* -c */ 55#define JF_SET 0x0002 /* -m */ 56#define JF_STOP 0x0004 /* -r */ 57#define JF_DEPEND 0x0008 /* Operation required by dependency */ 58#define JF_WILD 0x0010 /* Not specified on the command line */ 59#define JF_FAILED 0x0020 /* Operation failed */ | 27 */ 28 29#include <sys/param.h> 30#include <sys/types.h> 31#include <sys/jail.h> 32#include <sys/queue.h> 33#include <sys/time.h> 34 --- 17 unchanged lines hidden (view full) --- 52#define PF_CONV 0x40 /* Parameter duplicated in converted form */ 53 54#define JF_START 0x0001 /* -c */ 55#define JF_SET 0x0002 /* -m */ 56#define JF_STOP 0x0004 /* -r */ 57#define JF_DEPEND 0x0008 /* Operation required by dependency */ 58#define JF_WILD 0x0010 /* Not specified on the command line */ 59#define JF_FAILED 0x0020 /* Operation failed */ |
60#define JF_CHECKINT 0x0040 /* Checked internal parameters */ 61#define JF_IPPARAMS 0x0080 /* Looked up jail hostname for IP_HOSTNAME */ 62#define JF_RDTUN 0x0100 /* Create-only parameter check has been done */ 63#define JF_IFUP 0x0200 /* IP addresses have been configured */ 64#define JF_MOUNTED 0x0400 /* Filesystems have been mounted */ 65#define JF_PERSIST 0x0800 /* Jail is temporarily persistent */ 66#define JF_TIMEOUT 0x1000 /* A command (or process kill) timed out */ 67#define JF_RUNQ 0x2000 /* Jail was in the run qeueue */ 68#define JF_BACKGROUND 0x4000 /* Command was run in the background */ | 60#define JF_PARAMS 0x0040 /* Parameters checked and imported */ 61#define JF_RDTUN 0x0080 /* Create-only parameter check has been done */ 62#define JF_IFUP 0x0100 /* IP addresses have been configured */ 63#define JF_MOUNTED 0x0200 /* Filesystems have been mounted */ 64#define JF_PERSIST 0x0400 /* Jail is temporarily persistent */ 65#define JF_TIMEOUT 0x0800 /* A command (or process kill) timed out */ 66#define JF_RUNQ 0x1000 /* Jail was in the run qeueue */ 67#define JF_BACKGROUND 0x2000 /* Command was run in the background */ |
69 70#define JF_OP_MASK (JF_START | JF_SET | JF_STOP) 71#define JF_RESTART (JF_START | JF_STOP) 72#define JF_START_SET (JF_START | JF_SET) 73#define JF_SET_RESTART (JF_SET | JF_STOP) 74#define JF_START_SET_RESTART (JF_START | JF_SET | JF_STOP) 75#define JF_DO_STOP(js) (((js) & (JF_SET | JF_STOP)) == JF_STOP) 76 --- 115 unchanged lines hidden (view full) --- 192extern int finish_command(struct cfjail *j, int *plimit); 193extern struct cfjail *next_proc(int nonblock); 194extern int term_procs(struct cfjail *j); 195 196extern void load_config(void); 197extern struct cfjail *add_jail(void); 198extern void add_param(struct cfjail *j, const struct cfparam *p, 199 enum intparam ipnum, const char *value); | 68 69#define JF_OP_MASK (JF_START | JF_SET | JF_STOP) 70#define JF_RESTART (JF_START | JF_STOP) 71#define JF_START_SET (JF_START | JF_SET) 72#define JF_SET_RESTART (JF_SET | JF_STOP) 73#define JF_START_SET_RESTART (JF_START | JF_SET | JF_STOP) 74#define JF_DO_STOP(js) (((js) & (JF_SET | JF_STOP)) == JF_STOP) 75 --- 115 unchanged lines hidden (view full) --- 191extern int finish_command(struct cfjail *j, int *plimit); 192extern struct cfjail *next_proc(int nonblock); 193extern int term_procs(struct cfjail *j); 194 195extern void load_config(void); 196extern struct cfjail *add_jail(void); 197extern void add_param(struct cfjail *j, const struct cfparam *p, 198 enum intparam ipnum, const char *value); |
200extern int check_intparams(struct cfjail *j); | |
201extern int bool_param(const struct cfparam *p); 202extern int int_param(const struct cfparam *p, int *ip); 203extern const char *string_param(const struct cfparam *p); | 199extern int bool_param(const struct cfparam *p); 200extern int int_param(const struct cfparam *p, int *ip); 201extern const char *string_param(const struct cfparam *p); |
204extern int ip_params(struct cfjail *j); | 202extern int check_intparams(struct cfjail *j); |
205extern int import_params(struct cfjail *j); 206extern int equalopts(const char *opt1, const char *opt2); 207extern int wild_jail_name(const char *wname); 208extern int wild_jail_match(const char *jname, const char *wname); 209 210extern void dep_setup(int docf); 211extern int dep_check(struct cfjail *j); 212extern void dep_done(struct cfjail *j, unsigned flags); --- 14 unchanged lines hidden --- | 203extern int import_params(struct cfjail *j); 204extern int equalopts(const char *opt1, const char *opt2); 205extern int wild_jail_name(const char *wname); 206extern int wild_jail_match(const char *jname, const char *wname); 207 208extern void dep_setup(int docf); 209extern int dep_check(struct cfjail *j); 210extern void dep_done(struct cfjail *j, unsigned flags); --- 14 unchanged lines hidden --- |