Clean up some style(9) violations.
This commit is contained in:
parent
7f5b12538b
commit
44c16975a2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297976
@ -686,7 +686,8 @@ mqfs_init(struct vfsconf *vfc)
|
||||
EVENTHANDLER_PRI_ANY);
|
||||
mq_fdclose = mqueue_fdclose;
|
||||
p31b_setcfg(CTL_P1003_1B_MESSAGE_PASSING, _POSIX_MESSAGE_PASSING);
|
||||
/* Note current jails */
|
||||
|
||||
/* Note current jails. */
|
||||
mqfs_osd_jail_slot = osd_jail_register(mqfs_prison_destructor, methods);
|
||||
sx_slock(&allprison_lock);
|
||||
TAILQ_FOREACH(pr, &allprison, pr_list)
|
||||
@ -1423,6 +1424,7 @@ mqfs_readdir(struct vop_readdir_args *ap)
|
||||
|
||||
LIST_FOREACH(pn, &pd->mn_children, mn_sibling) {
|
||||
entry.d_reclen = sizeof(entry);
|
||||
|
||||
/*
|
||||
* Only show names within the same prison root directory
|
||||
* (or not associated with a prison, e.g. "." and "..").
|
||||
|
@ -271,13 +271,11 @@ ksem_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
|
||||
mtx_unlock(&sem_lock);
|
||||
if (ks->ks_path != NULL) {
|
||||
sx_slock(&ksem_dict_lock);
|
||||
if (ks->ks_path != NULL)
|
||||
{
|
||||
if (ks->ks_path != NULL) {
|
||||
path = ks->ks_path;
|
||||
pr_path = curthread->td_ucred->cr_prison->pr_path;
|
||||
if (strcmp(pr_path, "/") != 0)
|
||||
{
|
||||
/* Return the jail-rooted pathname */
|
||||
if (strcmp(pr_path, "/") != 0) {
|
||||
/* Return the jail-rooted pathname. */
|
||||
pr_pathlen = strlen(pr_path);
|
||||
if (strncmp(path, pr_path, pr_pathlen) == 0 &&
|
||||
path[pr_pathlen] == '/')
|
||||
@ -503,7 +501,8 @@ ksem_create(struct thread *td, const char *name, semid_t *semidp, mode_t mode,
|
||||
} else {
|
||||
path = malloc(MAXPATHLEN, M_KSEM, M_WAITOK);
|
||||
pr_path = td->td_ucred->cr_prison->pr_path;
|
||||
/* Construct a full pathname for jailed callers */
|
||||
|
||||
/* Construct a full pathname for jailed callers. */
|
||||
pr_pathlen = strcmp(pr_path, "/") == 0 ? 0
|
||||
: strlcpy(path, pr_path, MAXPATHLEN);
|
||||
error = copyinstr(name, path + pr_pathlen,
|
||||
|
@ -727,7 +727,8 @@ kern_shm_open(struct thread *td, const char *userpath, int flags, mode_t mode,
|
||||
} else {
|
||||
path = malloc(MAXPATHLEN, M_SHMFD, M_WAITOK);
|
||||
pr_path = td->td_ucred->cr_prison->pr_path;
|
||||
/* Construct a full pathname for jailed callers */
|
||||
|
||||
/* Construct a full pathname for jailed callers. */
|
||||
pr_pathlen = strcmp(pr_path, "/") == 0 ? 0
|
||||
: strlcpy(path, pr_path, MAXPATHLEN);
|
||||
error = copyinstr(userpath, path + pr_pathlen,
|
||||
@ -1087,13 +1088,11 @@ shm_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)
|
||||
kif->kf_un.kf_file.kf_file_size = shmfd->shm_size;
|
||||
if (shmfd->shm_path != NULL) {
|
||||
sx_slock(&shm_dict_lock);
|
||||
if (shmfd->shm_path != NULL)
|
||||
{
|
||||
if (shmfd->shm_path != NULL) {
|
||||
path = shmfd->shm_path;
|
||||
pr_path = curthread->td_ucred->cr_prison->pr_path;
|
||||
if (strcmp(pr_path, "/") != 0)
|
||||
{
|
||||
/* Return the jail-rooted pathname */
|
||||
if (strcmp(pr_path, "/") != 0) {
|
||||
/* Return the jail-rooted pathname. */
|
||||
pr_pathlen = strlen(pr_path);
|
||||
if (strncmp(path, pr_path, pr_pathlen) == 0 &&
|
||||
path[pr_pathlen] == '/')
|
||||
|
Loading…
Reference in New Issue
Block a user