Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_jail.c
Show First 20 Lines • Show All 2,883 Lines • ▼ Show 20 Lines | |||||
getcredhostid(struct ucred *cred, unsigned long *hostid) | getcredhostid(struct ucred *cred, unsigned long *hostid) | ||||
{ | { | ||||
mtx_lock(&cred->cr_prison->pr_mtx); | mtx_lock(&cred->cr_prison->pr_mtx); | ||||
*hostid = cred->cr_prison->pr_hostid; | *hostid = cred->cr_prison->pr_hostid; | ||||
mtx_unlock(&cred->cr_prison->pr_mtx); | mtx_unlock(&cred->cr_prison->pr_mtx); | ||||
} | } | ||||
void | |||||
getjailname(struct ucred *cred, char *name, size_t len) | |||||
{ | |||||
mtx_lock(&cred->cr_prison->pr_mtx); | |||||
strlcpy(name, cred->cr_prison->pr_name, len); | |||||
mtx_unlock(&cred->cr_prison->pr_mtx); | |||||
} | |||||
#ifdef VIMAGE | #ifdef VIMAGE | ||||
/* | /* | ||||
* Determine whether the prison represented by cred owns | * Determine whether the prison represented by cred owns | ||||
* its vnet rather than having it inherited. | * its vnet rather than having it inherited. | ||||
* | * | ||||
* Returns 1 in case the prison owns the vnet, 0 otherwise. | * Returns 1 in case the prison owns the vnet, 0 otherwise. | ||||
*/ | */ | ||||
int | int | ||||
▲ Show 20 Lines • Show All 1,315 Lines • Show Last 20 Lines |