cfjail
check_path(struct cfjail *j, const char *pname, const char *path, int isfile,
next_command(struct cfjail *j)
finish_command(struct cfjail *j)
struct cfjail *rj;
struct cfjail *
struct cfjail *j;
run_command(struct cfjail *j)
struct cfjail *j;
static int run_command(struct cfjail *j);
static int add_proc(struct cfjail *j, pid_t pid);
static void clear_procs(struct cfjail *j);
static struct cfjail *find_proc(pid_t pid);
static int term_procs(struct cfjail *j);
static int get_user_info(struct cfjail *j, const char *username,
static int check_path(struct cfjail *j, const char *pname, const char *path,
add_proc(struct cfjail *j, pid_t pid)
struct cfjail *tj;
clear_procs(struct cfjail *j)
static struct cfjail *
struct cfjail *j;
term_procs(struct cfjail *j)
get_user_info(struct cfjail *j, const char *username,
struct cfjail *j, *tj, *wj;
struct cfjail *
struct cfjail *j;
j = emalloc(sizeof(struct cfjail));
memset(j, 0, sizeof(struct cfjail));
add_param(struct cfjail *j, const struct cfparam *p, enum intparam ipnum,
check_intparams(struct cfjail *j)
import_params(struct cfjail *j)
struct cfjail *j;
struct cfjail *j;
failed(struct cfjail *j)
static void clear_persist(struct cfjail *j);
static int update_jail(struct cfjail *j);
jail_note(const struct cfjail *j, const char *fmt, ...)
static int rdtun_params(struct cfjail *j, int dofail);
static void running_jid(struct cfjail *j);
jail_warnx(const struct cfjail *j, const char *fmt, ...)
static void jail_quoted_warnx(const struct cfjail *j, const char *name_msg,
create_jail(struct cfjail *j)
static int jailparam_set_note(const struct cfjail *j, struct jailparam *jp,
static void print_jail(FILE *fp, struct cfjail *j, int oldcl, int running);
clear_persist(struct cfjail *j)
update_jail(struct cfjail *j)
rdtun_params(struct cfjail *j, int dofail)
running_jid(struct cfjail *j)
jail_quoted_warnx(const struct cfjail *j, const char *name_msg,
jailparam_set_note(const struct cfjail *j, struct jailparam *jp, unsigned njp,
print_jail(FILE *fp, struct cfjail *j, int oldcl, int running)
TAILQ_HEAD(cfjails, cfjail);
TAILQ_ENTRY(cfjail) tq;
struct cfjail *cfparent;
struct cfjail *j[2];
extern int create_jail(struct cfjail *j);
extern void failed(struct cfjail *j);
extern void jail_note(const struct cfjail *j, const char *fmt, ...);
extern void jail_warnx(const struct cfjail *j, const char *fmt, ...);
extern int next_command(struct cfjail *j);
extern int finish_command(struct cfjail *j);
extern struct cfjail *next_proc(int nonblock);
extern struct cfjail *add_jail(void);
extern void add_param(struct cfjail *j, const struct cfparam *p,
extern int check_intparams(struct cfjail *j);
extern int import_params(struct cfjail *j);
extern int dep_check(struct cfjail *j);
extern void dep_done(struct cfjail *j, unsigned flags);
extern void dep_reset(struct cfjail *j);
extern struct cfjail *next_jail(void);
extern void requeue(struct cfjail *j, struct cfjails *queue);
extern void requeue_head(struct cfjail *j, struct cfjails *queue);
static struct cfjail *current_jail;
static struct cfjail *global_jail;
struct cfjail *j = current_jail;
struct cfjail *j = add_jail();
dep_check(struct cfjail *j)
struct cfjail *dj;
dep_done(struct cfjail *j, unsigned flags)
struct cfjail *dj;
dep_reset(struct cfjail *j)
struct cfjail *
struct cfjail *j;
struct cfjail *j, *tj;
requeue(struct cfjail *j, struct cfjails *queue)
requeue_head(struct cfjail *j, struct cfjails *queue)
dep_add(struct cfjail *from, struct cfjail *to, unsigned flags)
static void dep_add(struct cfjail *from, struct cfjail *to, unsigned flags);
return strcmp((*((struct cfjail * const *)a))->name,
((*(struct cfjail * const *)b))->name);
return strcmp((const char *)a, ((*(struct cfjail * const *)b))->name);
static struct cfjail *
static struct cfjail *find_jail(const char *name);
struct cfjail **jp;
jp = bsearch(name, jails_byname, njails, sizeof(struct cfjail *),
static struct cfjail *running_jail(const char *name, int flags);
static struct cfjail *
struct cfjail *jail;
static struct cfjail **jails_byname;
struct cfjail *j, *dj;
jails_byname = emalloc(njails * sizeof(struct cfjail *));
qsort(jails_byname, njails, sizeof(struct cfjail *), cmp_jailptr);