summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2021-09-21 14:49:01 +0000
committerchristos <christos@NetBSD.org>2021-09-21 14:49:01 +0000
commitafe4b63deebbd88e3759442d88c692f2d98ffb37 (patch)
treeeb866df81ffc9b9da754252b5cce76bf7e123890 /sys/dev
parent9799e8172592b6a9975809e57ecf44e532a023cf (diff)
don't opencode kauth_cred_get()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/wi.c6
-rw-r--r--sys/dev/usb/if_umb.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/ic/wi.c b/sys/dev/ic/wi.c
index 602ce27ce55..4b91cbc61a6 100644
--- a/sys/dev/ic/wi.c
+++ b/sys/dev/ic/wi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.256 2021/06/16 00:21:18 riastradh Exp $ */
+/* $NetBSD: wi.c,v 1.257 2021/09/21 14:50:12 christos Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.256 2021/06/16 00:21:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.257 2021/09/21 14:50:12 christos Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -1459,7 +1459,7 @@ wi_ioctl(struct ifnet *ifp, u_long cmd, void *data)
error = wi_get_cfg(ifp, cmd, data);
break;
case SIOCSIFGENERIC:
- error = kauth_authorize_network(curlwp->l_cred,
+ error = kauth_authorize_network(kauth_cred_get(),
KAUTH_NETWORK_INTERFACE,
KAUTH_REQ_NETWORK_INTERFACE_SETPRIV, ifp, KAUTH_ARG(cmd),
NULL);
diff --git a/sys/dev/usb/if_umb.c b/sys/dev/usb/if_umb.c
index 1aead36ba7e..3c25df0d69f 100644
--- a/sys/dev/usb/if_umb.c
+++ b/sys/dev/usb/if_umb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_umb.c,v 1.20 2021/06/16 00:21:19 riastradh Exp $ */
+/* $NetBSD: if_umb.c,v 1.21 2021/09/21 14:49:01 christos Exp $ */
/* $OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
/*
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.20 2021/06/16 00:21:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.21 2021/09/21 14:49:01 christos Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -773,7 +773,7 @@ umb_ioctl(struct ifnet *ifp, u_long cmd, void *data)
usb_add_task(sc->sc_udev, &sc->sc_umb_task, USB_TASKQ_DRIVER);
break;
case SIOCGUMBINFO:
- error = kauth_authorize_network(curlwp->l_cred,
+ error = kauth_authorize_network(kauth_cred_get(),
KAUTH_NETWORK_INTERFACE,
KAUTH_REQ_NETWORK_INTERFACE_SETPRIV, ifp, KAUTH_ARG(cmd),
NULL);
@@ -783,7 +783,7 @@ umb_ioctl(struct ifnet *ifp, u_long cmd, void *data)
sizeof(sc->sc_info));
break;
case SIOCSUMBPARAM:
- error = kauth_authorize_network(curlwp->l_cred,
+ error = kauth_authorize_network(kauth_cred_get(),
KAUTH_NETWORK_INTERFACE,
KAUTH_REQ_NETWORK_INTERFACE_SETPRIV, ifp, KAUTH_ARG(cmd),
NULL);