Lines Matching defs:jid

547 	int fi, jid, jsys, len, level;
595 error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
597 jid = 0;
994 if (cuflags == JAIL_CREATE && jid == 0 && name != NULL) {
996 jid = strtoul(namelc != NULL ? namelc + 1 : name, &p, 10);
998 jid = 0;
1000 if (jid != 0) {
1002 * See if a requested jid already exists. There is an
1003 * information leak here if the jid exists but is not within
1008 if (jid < 0) {
1010 vfs_opterror(opts, "negative jid");
1013 pr = prison_find(jid);
1016 /* Create: jid must not exist. */
1021 jid);
1032 jid);
1050 /* Update: jid must exist. */
1053 vfs_opterror(opts, "jail %d not found", jid);
1060 * This has different semantics for creates and updates keyed by jid
1122 * Create, or update(jid):
1152 /* Update: name must exist if no jid. */
1161 /* Update: must provide a jid or name. */
1188 if (jid == 0) {
1189 /* Find the next free jid. */
1190 jid = lastprid + 1;
1192 if (jid == JAIL_MAX)
1193 jid = 1;
1195 if (tpr->pr_id < jid)
1197 if (tpr->pr_id > jid || tpr->pr_ref == 0) {
1201 if (jid == lastprid) {
1210 jid++;
1213 lastprid = jid;
1216 * The jail already has a jid (that did not yet exist),
1220 if (tpr->pr_id >= jid) {
1232 pr->pr_id = jid;
1527 /* Give a default name of the jid. */
1529 snprintf(name = numbuf, sizeof(numbuf), "%d", jid);
1530 else if (*namelc == '0' || (strtoul(namelc, &p, 10) != jid &&
1534 "name cannot be numeric (unless it is the jid)");
1923 int error, errmsg_len, errmsg_pos, fi, i, jid, len, locked, pos;
1936 * Find the prison specified by one of: lastjid, jid, name.
1939 error = vfs_copyopt(opts, "lastjid", &jid, sizeof(jid));
1942 if (pr->pr_id > jid && prison_ischild(mypr, pr)) {
1953 vfs_opterror(opts, "no jail after %d", jid);
1958 error = vfs_copyopt(opts, "jid", &jid, sizeof(jid));
1960 if (jid != 0) {
1961 pr = prison_find_child(mypr, jid);
1967 jid);
1973 vfs_opterror(opts, "jail %d not found", jid);
2011 error = vfs_setopt(opts, "jid", &pr->pr_id, sizeof(pr->pr_id));
2196 * int jid;
2210 pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
2270 ("prison_remove_one removing a dead prison (jid=%d)", pr->pr_id));
2298 * int jid;
2312 pr = prison_find_child(td->td_ucred->cr_prison, uap->jid);
2613 ("Trying to hold dead prison (jid=%d).", pr->pr_id));
2632 ("Cannot add a process to a non-alive prison (jid=%d)", pr->pr_id));
2643 ("Trying to kill a process in a dead prison (jid=%d)", pr->pr_id));
4318 SYSCTL_JAIL_PARAM(, jid, CTLTYPE_INT | CTLFLAG_RDTUN, "I", "Jail ID");
4580 db_printf(" jid = %d\n", pr->pr_id);