Module Name: src Committed By: christos Date: Tue Sep 21 14:50:12 UTC 2021
Modified Files: src/sys/dev/ic: wi.c Log Message: don't opencode kauth_cred_get() To generate a diff of this commit: cvs rdiff -u -r1.256 -r1.257 src/sys/dev/ic/wi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/wi.c diff -u src/sys/dev/ic/wi.c:1.256 src/sys/dev/ic/wi.c:1.257 --- src/sys/dev/ic/wi.c:1.256 Tue Jun 15 20:21:18 2021 +++ src/sys/dev/ic/wi.c Tue Sep 21 10:50:12 2021 @@ -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, 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);