From d4410e6fde6517705870356a55e26e7252c5fb5d Mon Sep 17 00:00:00 2001 From: elad Date: Sun, 16 Jul 2006 20:21:42 +0000 Subject: [PATCH] CURTAIN() -> KAUTH_GENERIC_CANSEE. --- sys/kern/init_sysctl.c | 12 ++++++------ sys/kern/uipc_domain.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/kern/init_sysctl.c b/sys/kern/init_sysctl.c index 2339a13f1dde..879b7f935804 100644 --- a/sys/kern/init_sysctl.c +++ b/sys/kern/init_sysctl.c @@ -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 -__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); diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index 0ae2795158ce..13f67cd42f21 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -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 -__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 #include @@ -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;