Lines Matching defs:jid

562 	int fi, jid, jsys, len, level;
617 error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
619 jid = 0;
1025 if (cuflags == JAIL_CREATE && jid == 0 && name != NULL) {
1027 jid = strtoul(namelc != NULL ? namelc + 1 : name, &p, 10);
1029 jid = 0;
1032 if (jid != 0) {
1034 * See if a requested jid already exists. There is an
1035 * information leak here if the jid exists but is not within
1040 if (jid < 0) {
1042 vfs_opterror(opts, "negative jid");
1045 pr = prison_find(jid);
1048 /* Create: jid must not exist. */
1053 jid);
1064 jid);
1082 /* Update: jid must exist. */
1085 vfs_opterror(opts, "jail %d not found", jid);
1092 * This has different semantics for creates and updates keyed by jid
1156 * Create, or update(jid):
1186 /* Update: name must exist if no jid. */
1195 /* Update: must provide a jid or name. */
1223 if (jid == 0) {
1224 /* Find the next free jid. */
1225 jid = lastprid + 1;
1227 if (jid == JAIL_MAX)
1228 jid = 1;
1230 if (tpr->pr_id < jid)
1232 if (tpr->pr_id > jid || tpr->pr_ref == 0) {
1236 if (jid == lastprid) {
1245 jid++;
1248 lastprid = jid;
1251 * The jail already has a jid (that did not yet exist),
1255 if (tpr->pr_id >= jid) {
1267 pr->pr_id = jid;
1567 /* Give a default name of the jid. Also allow the name to be
1568 * explicitly the jid - but not any other number, and only in
1572 snprintf(namelc = numbuf, sizeof(numbuf), "%d", jid);
1573 else if ((strtoul(namelc, &p, 10) != jid ||
1577 "name cannot be numeric (unless it is the jid)");
1995 int error, errmsg_len, errmsg_pos, fi, i, jid, len, locked, pos;
2008 * Find the prison specified by one of: lastjid, jid, name.
2011 error = vfs_copyopt(opts, "lastjid", &jid, sizeof(jid));
2014 if (pr->pr_id > jid && prison_ischild(mypr, pr)) {
2025 vfs_opterror(opts, "no jail after %d", jid);
2030 error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
2032 if (jid != 0) {
2033 pr = prison_find_child(mypr, jid);
2039 jid);
2045 vfs_opterror(opts, "jail %d not found", jid);
2083 error = vfs_setopt(opts, "jid", &pr->pr_id, sizeof(pr->pr_id));
2272 * int jid;
2286 pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
2344 ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id));
2372 * int jid;
2393 pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
2634 ("prison_deref PD_DEUREF on a dead prison (jid=%d)",
2645 ("prison_deref PD_DEREF on a dead prison (jid=%d)",
2726 ("Trying to hold dead prison (jid=%d).", pr->pr_id));
2745 ("Cannot add a process to a non-alive prison (jid=%d)", pr->pr_id));
2756 ("Trying to kill a process in a dead prison (jid=%d)", pr->pr_id));
4447 SYSCTL_JAIL_PARAM(, jid, CTLTYPE_INT | CTLFLAG_RDTUN, "I", "Jail ID");
4737 db_printf(" jid = %d\n", pr->pr_id);