Lines Matching refs:jid

567 	int fi, jid, jsys, len, level;
622 error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
624 jid = 0;
1037 if (cuflags == JAIL_CREATE && jid == 0 && name != NULL) {
1039 jid = strtoul(namelc != NULL ? namelc + 1 : name, &p, 10);
1041 jid = 0;
1044 if (jid != 0) {
1046 * See if a requested jid already exists. There is an
1047 * information leak here if the jid exists but is not within
1052 if (jid < 0) {
1054 vfs_opterror(opts, "negative jid");
1057 pr = prison_find(jid);
1060 /* Create: jid must not exist. */
1065 jid);
1076 jid);
1094 /* Update: jid must exist. */
1097 vfs_opterror(opts, "jail %d not found", jid);
1104 * This has different semantics for creates and updates keyed by jid
1168 * Create, or update(jid):
1198 /* Update: name must exist if no jid. */
1207 /* Update: must provide a jid or name. */
1235 if (jid == 0) {
1236 /* Find the next free jid. */
1237 jid = lastprid + 1;
1239 if (jid == JAIL_MAX)
1240 jid = 1;
1242 if (tpr->pr_id < jid)
1244 if (tpr->pr_id > jid || tpr->pr_ref == 0) {
1248 if (jid == lastprid) {
1257 jid++;
1260 lastprid = jid;
1263 * The jail already has a jid (that did not yet exist),
1267 if (tpr->pr_id >= jid) {
1279 pr->pr_id = jid;
1583 /* Give a default name of the jid. Also allow the name to be
1584 * explicitly the jid - but not any other number, and only in
1588 snprintf(namelc = numbuf, sizeof(numbuf), "%d", jid);
1589 else if ((strtoul(namelc, &p, 10) != jid ||
1593 "name cannot be numeric (unless it is the jid)");
2011 int error, errmsg_len, errmsg_pos, fi, i, jid, len, locked, pos;
2024 * Find the prison specified by one of: lastjid, jid, name.
2027 error = vfs_copyopt(opts, "lastjid", &jid, sizeof(jid));
2030 if (pr->pr_id > jid && prison_ischild(mypr, pr)) {
2041 vfs_opterror(opts, "no jail after %d", jid);
2046 error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
2048 if (jid != 0) {
2049 pr = prison_find_child(mypr, jid);
2055 jid);
2061 vfs_opterror(opts, "jail %d not found", jid);
2099 error = vfs_setopt(opts, "jid", &pr->pr_id, sizeof(pr->pr_id));
2291 * int jid;
2305 pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
2363 ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id));
2391 * int jid;
2412 pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
2653 ("prison_deref PD_DEUREF on a dead prison (jid=%d)",
2664 ("prison_deref PD_DEREF on a dead prison (jid=%d)",
2745 ("Trying to hold dead prison (jid=%d).", pr->pr_id));
2764 ("Cannot add a process to a non-alive prison (jid=%d)", pr->pr_id));
2775 ("Trying to kill a process in a dead prison (jid=%d)", pr->pr_id));
4479 SYSCTL_JAIL_PARAM(, jid, CTLTYPE_INT | CTLFLAG_RDTUN, "I", "Jail ID");
4764 db_printf(" jid = %d\n", pr->pr_id);