Consistent usage of KAUTH_GENERIC_ISSUSER.
This commit is contained in:
parent
d5ebb97b46
commit
b2eb9a5389
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: umap_vfsops.c,v 1.61 2006/11/16 01:33:40 christos Exp $ */
|
||||
/* $NetBSD: umap_vfsops.c,v 1.62 2007/01/04 19:07:04 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -41,7 +41,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.61 2006/11/16 01:33:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.62 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -92,7 +92,7 @@ umapfs_mount(mp, path, data, ndp, l)
|
||||
|
||||
/* only for root */
|
||||
if ((error = kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag)) != 0)
|
||||
NULL)) != 0)
|
||||
return error;
|
||||
|
||||
#ifdef UMAPFS_DIAGNOSTIC
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_bridge.c,v 1.46 2006/11/23 04:07:07 rpaulo Exp $ */
|
||||
/* $NetBSD: if_bridge.c,v 1.47 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001 Wasabi Systems, Inc.
|
||||
@ -80,7 +80,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.46 2006/11/23 04:07:07 rpaulo Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.47 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_bridge_ipf.h"
|
||||
#include "opt_inet.h"
|
||||
@ -486,7 +486,7 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
|
||||
if (bc->bc_flags & BC_F_SUSER) {
|
||||
error = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag);
|
||||
KAUTH_GENERIC_ISSUSER, NULL);
|
||||
if (error)
|
||||
break;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_sl.c,v 1.102 2006/11/16 01:33:40 christos Exp $ */
|
||||
/* $NetBSD: if_sl.c,v 1.103 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1989, 1992, 1993
|
||||
@ -60,7 +60,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.102 2006/11/16 01:33:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_sl.c,v 1.103 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "bpfilter.h"
|
||||
@ -309,7 +309,7 @@ slopen(dev_t dev, struct tty *tp)
|
||||
int s;
|
||||
|
||||
if ((error = kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag)) != 0)
|
||||
NULL)) != 0)
|
||||
return error;
|
||||
|
||||
if (tp->t_linesw == &slip_disc)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_strip.c,v 1.69 2006/11/16 01:33:40 christos Exp $ */
|
||||
/* $NetBSD: if_strip.c,v 1.70 2007/01/04 19:07:03 elad Exp $ */
|
||||
/* from: NetBSD: if_sl.c,v 1.38 1996/02/13 22:00:23 christos Exp $ */
|
||||
|
||||
/*
|
||||
@ -87,7 +87,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.69 2006/11/16 01:33:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_strip.c,v 1.70 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "bpfilter.h"
|
||||
@ -483,7 +483,7 @@ stripopen(dev_t dev, struct tty *tp)
|
||||
#endif
|
||||
|
||||
if ((error = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
|
||||
KAUTH_GENERIC_ISSUSER, NULL)) != 0)
|
||||
return (error);
|
||||
|
||||
if (tp->t_linesw == &strip_disc)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_tun.c,v 1.94 2006/11/16 01:33:40 christos Exp $ */
|
||||
/* $NetBSD: if_tun.c,v 1.95 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
|
||||
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.94 2006/11/16 01:33:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_tun.c,v 1.95 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -275,7 +275,7 @@ tunopen(dev_t dev, int flag, int mode, struct lwp *l)
|
||||
int s, error;
|
||||
|
||||
if ((error = kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag)) != 0)
|
||||
NULL)) != 0)
|
||||
return (error);
|
||||
|
||||
s = splnet();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: net_osdep.h,v 1.15 2006/09/23 15:17:58 elad Exp $ */
|
||||
/* $NetBSD: net_osdep.h,v 1.16 2007/01/04 19:07:03 elad Exp $ */
|
||||
/* $KAME: net_osdep.h,v 1.51 2001/07/06 06:21:43 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -82,7 +82,7 @@
|
||||
* NetBSD
|
||||
* struct lwp *l;
|
||||
* if (l != NULL && kauth_authorize_generic(l->l_cred,
|
||||
* KAUTH_GENERIC_ISSUSER, &l->l_acflag) == 0)
|
||||
* KAUTH_GENERIC_ISSUSER, NULL) == 0)
|
||||
* privileged;
|
||||
* FreeBSD 3
|
||||
* struct proc *p;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ppp_tty.c,v 1.45 2006/11/16 01:33:40 christos Exp $ */
|
||||
/* $NetBSD: ppp_tty.c,v 1.46 2007/01/04 19:07:03 elad Exp $ */
|
||||
/* Id: ppp_tty.c,v 1.3 1996/07/01 01:04:11 paulus Exp */
|
||||
|
||||
/*
|
||||
@ -93,7 +93,7 @@
|
||||
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ppp_tty.c,v 1.45 2006/11/16 01:33:40 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ppp_tty.c,v 1.46 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "ppp.h"
|
||||
|
||||
@ -209,7 +209,7 @@ pppopen(dev_t dev, struct tty *tp)
|
||||
int error, s;
|
||||
|
||||
if ((error = kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag)) != 0)
|
||||
NULL)) != 0)
|
||||
return (error);
|
||||
|
||||
s = spltty();
|
||||
@ -452,7 +452,7 @@ ppptioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
|
||||
case PPPIOCSASYNCMAP:
|
||||
if ((error = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
|
||||
KAUTH_GENERIC_ISSUSER, NULL)) != 0)
|
||||
break;
|
||||
sc->sc_asyncmap[0] = *(u_int *)data;
|
||||
break;
|
||||
@ -463,7 +463,7 @@ ppptioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
|
||||
case PPPIOCSRASYNCMAP:
|
||||
if ((error = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
|
||||
KAUTH_GENERIC_ISSUSER, NULL)) != 0)
|
||||
break;
|
||||
sc->sc_rasyncmap = *(u_int *)data;
|
||||
break;
|
||||
@ -474,7 +474,7 @@ ppptioctl(struct tty *tp, u_long cmd, caddr_t data, int flag, struct lwp *l)
|
||||
|
||||
case PPPIOCSXASYNCMAP:
|
||||
if ((error = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) != 0)
|
||||
KAUTH_GENERIC_ISSUSER, NULL)) != 0)
|
||||
break;
|
||||
s = spltty();
|
||||
bcopy(data, sc->sc_asyncmap, sizeof(sc->sc_asyncmap));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ddp_usrreq.c,v 1.21 2006/12/15 21:18:53 joerg Exp $ */
|
||||
/* $NetBSD: ddp_usrreq.c,v 1.22 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990,1991 Regents of The University of Michigan.
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.21 2006/12/15 21:18:53 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ddp_usrreq.c,v 1.22 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_mbuftrace.h"
|
||||
|
||||
@ -274,8 +274,7 @@ at_pcbsetaddr(ddp, addr, l)
|
||||
|
||||
if (sat->sat_port < ATPORT_RESERVED && l &&
|
||||
kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
return (EACCES);
|
||||
}
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hci_ioctl.c,v 1.4 2006/09/11 22:12:39 plunky Exp $ */
|
||||
/* $NetBSD: hci_ioctl.c,v 1.5 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 Iain Hibbert.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hci_ioctl.c,v 1.4 2006/09/11 22:12:39 plunky Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hci_ioctl.c,v 1.5 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/domain.h>
|
||||
@ -223,7 +223,7 @@ hci_ioctl(unsigned long cmd, void *data, struct lwp *l)
|
||||
|
||||
case SIOCSBTFLAGS: /* set unit flags (privileged) */
|
||||
err = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag);
|
||||
KAUTH_GENERIC_ISSUSER, NULL);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
@ -253,7 +253,7 @@ hci_ioctl(unsigned long cmd, void *data, struct lwp *l)
|
||||
|
||||
case SIOCSBTPOLICY: /* set unit link policy (privileged) */
|
||||
err = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag);
|
||||
KAUTH_GENERIC_ISSUSER, NULL);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
@ -264,7 +264,7 @@ hci_ioctl(unsigned long cmd, void *data, struct lwp *l)
|
||||
|
||||
case SIOCSBTPTYPE: /* set unit packet types (privileged) */
|
||||
err = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag);
|
||||
KAUTH_GENERIC_ISSUSER, NULL);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
@ -282,7 +282,7 @@ hci_ioctl(unsigned long cmd, void *data, struct lwp *l)
|
||||
|
||||
case SIOCZBTSTATS: /* get & reset unit statistics */
|
||||
err = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag);
|
||||
KAUTH_GENERIC_ISSUSER, NULL);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
@ -302,7 +302,7 @@ hci_ioctl(unsigned long cmd, void *data, struct lwp *l)
|
||||
* integer number of frame sizes, the USB bus locks up.
|
||||
*/
|
||||
err = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag);
|
||||
KAUTH_GENERIC_ISSUSER, NULL);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hci_socket.c,v 1.4 2006/10/01 10:13:54 plunky Exp $ */
|
||||
/* $NetBSD: hci_socket.c,v 1.5 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005 Iain Hibbert.
|
||||
@ -31,7 +31,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.4 2006/10/01 10:13:54 plunky Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hci_socket.c,v 1.5 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_bluetooth.h"
|
||||
#ifdef BLUETOOTH_DEBUG
|
||||
@ -333,10 +333,8 @@ hci_usrreq(struct socket *up, int req, struct mbuf *m,
|
||||
up->so_pcb = pcb;
|
||||
pcb->hp_socket = up;
|
||||
|
||||
if (l == NULL
|
||||
|| kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag) == 0)
|
||||
if (l == NULL || kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, NULL) == 0)
|
||||
pcb->hp_flags |= HCI_PRIVILEGED;
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip_output.c,v 1.171 2006/12/15 21:18:54 joerg Exp $ */
|
||||
/* $NetBSD: ip_output.c,v 1.172 2007/01/04 19:07:03 elad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -98,7 +98,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.171 2006/12/15 21:18:54 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.172 2007/01/04 19:07:03 elad Exp $");
|
||||
|
||||
#include "opt_pfil_hooks.h"
|
||||
#include "opt_inet.h"
|
||||
@ -1360,7 +1360,7 @@ ip_ctloutput(int op, struct socket *so, int level, int optname,
|
||||
|
||||
#ifdef __NetBSD__
|
||||
if (l == 0 || kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
priv = 0;
|
||||
else
|
||||
priv = 1;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: in6.c,v 1.121 2006/12/02 20:40:58 dyoung Exp $ */
|
||||
/* $NetBSD: in6.c,v 1.122 2007/01/04 19:07:04 elad Exp $ */
|
||||
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.121 2006/12/02 20:40:58 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.122 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_pfil_hooks.h"
|
||||
@ -795,7 +795,7 @@ in6_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
|
||||
|
||||
privileged = 0;
|
||||
if (l && !kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
privileged++;
|
||||
|
||||
s = splnet();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: in6_pcb.c,v 1.80 2006/12/15 21:18:55 joerg Exp $ */
|
||||
/* $NetBSD: in6_pcb.c,v 1.81 2007/01/04 19:07:04 elad Exp $ */
|
||||
/* $KAME: in6_pcb.c,v 1.84 2001/02/08 18:02:08 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.80 2006/12/15 21:18:55 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_pcb.c,v 1.81 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ipsec.h"
|
||||
@ -289,7 +289,7 @@ in6_pcbbind(v, nam, l)
|
||||
* privilege check! do not rewrite it into SS_PRIV.
|
||||
*/
|
||||
priv = (l && !kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) ? 1 : 0;
|
||||
KAUTH_GENERIC_ISSUSER, NULL)) ? 1 : 0;
|
||||
/* GROSS */
|
||||
if (ntohs(lport) < IPV6PORT_RESERVED && !priv)
|
||||
return (EACCES);
|
||||
|
@ -65,7 +65,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.33 2006/12/15 21:18:55 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_src.c,v 1.34 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -877,7 +877,7 @@ in6_pcbsetport(laddr, in6p, l)
|
||||
if (in6p->in6p_flags & IN6P_LOWPORT) {
|
||||
#ifndef IPNOPRIVPORTS
|
||||
if (l == 0 || (kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag) != 0))
|
||||
KAUTH_GENERIC_ISSUSER, NULL) != 0))
|
||||
return (EACCES);
|
||||
#endif
|
||||
minport = ip6_lowportmin;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ip6_output.c,v 1.110 2006/12/27 18:49:40 alc Exp $ */
|
||||
/* $NetBSD: ip6_output.c,v 1.111 2007/01/04 19:07:04 elad Exp $ */
|
||||
/* $KAME: ip6_output.c,v 1.172 2001/03/25 09:55:56 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.110 2006/12/27 18:49:40 alc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ip6_output.c,v 1.111 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_inet6.h"
|
||||
@ -1454,7 +1454,7 @@ ip6_ctloutput(op, so, level, optname, mp)
|
||||
optlen = m ? m->m_len : 0;
|
||||
error = optval = 0;
|
||||
privileged = (l == 0 || kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)) ? 0 : 1;
|
||||
KAUTH_GENERIC_ISSUSER, NULL)) ? 0 : 1;
|
||||
uproto = (int)so->so_proto->pr_protocol;
|
||||
|
||||
if (level == IPPROTO_IPV6) {
|
||||
@ -2175,7 +2175,7 @@ ip6_pcbopts(pktopt, m, so)
|
||||
|
||||
/* set options specified by user. */
|
||||
if (l && !kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag))
|
||||
NULL))
|
||||
priv = 1;
|
||||
if ((error = ip6_setpktopts(m, opt, NULL, priv,
|
||||
so->so_proto->pr_protocol)) != 0) {
|
||||
@ -2556,7 +2556,7 @@ ip6_setmoptions(optname, im6op, m)
|
||||
* to do this.
|
||||
*/
|
||||
if (kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
{
|
||||
error = EACCES;
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: raw_ip6.c,v 1.79 2006/12/02 18:59:17 dyoung Exp $ */
|
||||
/* $NetBSD: raw_ip6.c,v 1.80 2007/01/04 19:07:04 elad Exp $ */
|
||||
/* $KAME: raw_ip6.c,v 1.82 2001/07/23 18:57:56 jinmei Exp $ */
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.79 2006/12/02 18:59:17 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: raw_ip6.c,v 1.80 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_ipsec.h"
|
||||
|
||||
@ -401,7 +401,7 @@ rip6_output(m, va_alist)
|
||||
|
||||
priv = 0;
|
||||
if (curlwp && !kauth_authorize_generic(curlwp->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &curlwp->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
priv = 1;
|
||||
|
||||
dst = &dstsock->sin6_addr;
|
||||
@ -614,7 +614,7 @@ rip6_usrreq(so, req, m, nam, control, l)
|
||||
|
||||
priv = 0;
|
||||
if (l && !kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
priv++;
|
||||
|
||||
if (req == PRU_CONTROL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: udp6_output.c,v 1.26 2006/07/23 22:06:13 ad Exp $ */
|
||||
/* $NetBSD: udp6_output.c,v 1.27 2007/01/04 19:07:04 elad Exp $ */
|
||||
/* $KAME: udp6_output.c,v 1.43 2001/10/15 09:19:52 itojun Exp $ */
|
||||
|
||||
/*
|
||||
@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.26 2006/07/23 22:06:13 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: udp6_output.c,v 1.27 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
|
||||
@ -138,7 +138,7 @@ udp6_output(in6p, m, addr6, control, l)
|
||||
|
||||
priv = 0;
|
||||
if (l && !kauth_authorize_generic(l->l_cred, KAUTH_GENERIC_ISSUSER,
|
||||
&l->l_acflag))
|
||||
NULL))
|
||||
priv = 1;
|
||||
|
||||
if (addr6) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iso_pcb.c,v 1.35 2006/12/15 21:18:57 joerg Exp $ */
|
||||
/* $NetBSD: iso_pcb.c,v 1.36 2007/01/04 19:07:04 elad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -62,7 +62,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iso_pcb.c,v 1.35 2006/12/15 21:18:57 joerg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iso_pcb.c,v 1.36 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_iso.h"
|
||||
|
||||
@ -224,7 +224,7 @@ iso_pcbbind(void *v, struct mbuf *nam, struct lwp *l)
|
||||
suf.s = ntohs(suf.s);
|
||||
if (suf.s < ISO_PORT_RESERVED &&
|
||||
(l == NULL || kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag)))
|
||||
KAUTH_GENERIC_ISSUSER, NULL)))
|
||||
return EACCES;
|
||||
} else {
|
||||
char *cp;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iso_snpac.c,v 1.40 2006/11/16 01:33:51 christos Exp $ */
|
||||
/* $NetBSD: iso_snpac.c,v 1.41 2007/01/04 19:07:04 elad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -59,7 +59,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iso_snpac.c,v 1.40 2006/11/16 01:33:51 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iso_snpac.c,v 1.41 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_iso.h"
|
||||
#ifdef ISO
|
||||
@ -549,7 +549,7 @@ snpac_ioctl(
|
||||
|
||||
if (cmd == SIOCSSTYPE) {
|
||||
if (l == NULL || kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag))
|
||||
KAUTH_GENERIC_ISSUSER, NULL))
|
||||
return (EPERM);
|
||||
if ((rq->sr_type & (SNPA_ES | SNPA_IS)) == (SNPA_ES | SNPA_IS))
|
||||
return (EINVAL);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tp_output.c,v 1.30 2006/07/23 22:06:14 ad Exp $ */
|
||||
/* $NetBSD: tp_output.c,v 1.31 2007/01/04 19:07:04 elad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -62,7 +62,7 @@ SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tp_output.c,v 1.30 2006/07/23 22:06:14 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tp_output.c,v 1.31 2007/01/04 19:07:04 elad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_iso.h"
|
||||
@ -502,7 +502,7 @@ tp_ctloutput(int cmd, struct socket *so, int level, int optname,
|
||||
#define ISOA(t) (((struct isopcb *)(t->tp_npcb))->isop_laddr->siso_addr)
|
||||
|
||||
if (l == 0 || (error = kauth_authorize_generic(l->l_cred,
|
||||
KAUTH_GENERIC_ISSUSER, &l->l_acflag))) {
|
||||
KAUTH_GENERIC_ISSUSER, NULL))) {
|
||||
error = EPERM;
|
||||
} else if (cmd != PRCO_SETOPT || tpcb->tp_state != TP_CLOSED ||
|
||||
(tpcb->tp_flags & TPF_GENERAL_ADDR) ||
|
||||
|
Loading…
Reference in New Issue
Block a user