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 216367 2010-12-10 23:57:55Z 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 --- 23 unchanged lines hidden (view full) --- 58#define JF_WILD 0x0010 /* Not specified on the command line */ 59#define JF_FAILED 0x0020 /* Operation failed */ 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_SLEEPQ 0x2000 /* Waiting on a command and/or timeout */ |
67 68#define JF_OP_MASK (JF_START | JF_SET | JF_STOP) 69#define JF_RESTART (JF_START | JF_STOP) 70#define JF_START_SET (JF_START | JF_SET) 71#define JF_SET_RESTART (JF_SET | JF_STOP) 72#define JF_START_SET_RESTART (JF_START | JF_SET | JF_STOP) 73#define JF_DO_STOP(js) (((js) & (JF_SET | JF_STOP)) == JF_STOP) 74 --- 107 unchanged lines hidden (view full) --- 182 183extern void *emalloc(size_t); 184extern void *erealloc(void *, size_t); 185extern char *estrdup(const char *); 186extern void failed(struct cfjail *j); 187extern void jail_note(const struct cfjail *j, const char *fmt, ...); 188extern void jail_warnx(const struct cfjail *j, const char *fmt, ...); 189 |
190extern int run_command(struct cfjail *j, enum intparam comparam); 191extern int finish_command(struct cfjail *j); |
192extern struct cfjail *next_proc(int nonblock); |
193 194extern void load_config(void); 195extern struct cfjail *add_jail(void); 196extern void add_param(struct cfjail *j, const struct cfparam *p, 197 enum intparam ipnum, const char *value); 198extern int bool_param(const struct cfparam *p); 199extern int int_param(const struct cfparam *p, int *ip); 200extern const char *string_param(const struct cfparam *p); --- 12 unchanged lines hidden (view full) --- 213extern void requeue(struct cfjail *j, struct cfjails *queue); 214 215extern void yyerror(const char *); 216extern int yylex(void); 217extern int yyparse(void); 218 219extern struct cfjails cfjails; 220extern struct cfjails ready; |
221extern struct cfjails depend; |
222extern const char *cfname; |
223extern int paralimit; |
224extern int verbose; |