CURTAIN() -> KAUTH_GENERIC_CANSEE.
This commit is contained in:
parent
d9a7152c3e
commit
d4410e6fde
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: init_sysctl.c,v 1.75 2006/07/14 21:55:19 elad Exp $ */
|
||||
/* $NetBSD: init_sysctl.c,v 1.76 2006/07/16 20:21:42 elad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.75 2006/07/14 21:55:19 elad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.76 2006/07/16 20:21:42 elad Exp $");
|
||||
|
||||
#include "opt_sysv.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
|
@ -1318,8 +1318,8 @@ sysctl_kern_file(SYSCTLFN_ARGS)
|
|||
* followed by an array of file structures
|
||||
*/
|
||||
LIST_FOREACH(fp, &filehead, f_list) {
|
||||
if (CURTAIN(kauth_cred_geteuid(l->l_proc->p_cred),
|
||||
kauth_cred_geteuid(fp->f_cred)))
|
||||
if (kauth_authorize_generic(l->l_proc->p_cred,
|
||||
KAUTH_GENERIC_CANSEE, fp->f_cred) != 0)
|
||||
continue;
|
||||
if (buflen < sizeof(struct file)) {
|
||||
*oldlenp = where - start;
|
||||
|
@ -2037,8 +2037,8 @@ sysctl_kern_file2(SYSCTLFN_ARGS)
|
|||
if (arg != 0)
|
||||
return (EINVAL);
|
||||
LIST_FOREACH(fp, &filehead, f_list) {
|
||||
if (CURTAIN(kauth_cred_geteuid(l->l_proc->p_cred),
|
||||
kauth_cred_geteuid(fp->f_cred)))
|
||||
if (kauth_authorize_generic(l->l_proc->p_cred,
|
||||
KAUTH_GENERIC_CANSEE, fp->f_cred) != 0)
|
||||
continue;
|
||||
if (len >= elem_size && elem_count > 0) {
|
||||
fill_file(&kf, fp, NULL, 0);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uipc_domain.c,v 1.58 2006/06/13 13:52:39 yamt Exp $ */
|
||||
/* $NetBSD: uipc_domain.c,v 1.59 2006/07/16 20:21:42 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.58 2006/06/13 13:52:39 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.59 2006/07/16 20:21:42 elad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/socket.h>
|
||||
|
@ -285,8 +285,8 @@ sysctl_unpcblist(SYSCTLFN_ARGS)
|
|||
* to walk the file list looking for them. :-/
|
||||
*/
|
||||
LIST_FOREACH(fp, &filehead, f_list) {
|
||||
if (CURTAIN(kauth_cred_geteuid(l->l_proc->p_cred),
|
||||
kauth_cred_geteuid(fp->f_cred)))
|
||||
if (kauth_authorize_generic(l->l_proc->p_cred,
|
||||
KAUTH_GENERIC_CANSEE, fp->f_cred) != 0)
|
||||
continue;
|
||||
if (fp->f_type != DTYPE_SOCKET)
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue