Module Name:    src
Committed By:   christos
Date:           Tue Sep 21 14:42:01 UTC 2021

Modified Files:
        src/sys/dev/ic: atw.c

Log Message:
don't opencode kauth_cred_get()


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/sys/dev/ic/atw.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/atw.c
diff -u src/sys/dev/ic/atw.c:1.171 src/sys/dev/ic/atw.c:1.172
--- src/sys/dev/ic/atw.c:1.171	Tue Jun 15 20:21:18 2021
+++ src/sys/dev/ic/atw.c	Tue Sep 21 10:42:01 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: atw.c,v 1.171 2021/06/16 00:21:18 riastradh Exp $  */
+/*	$NetBSD: atw.c,v 1.172 2021/09/21 14:42:01 christos Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999, 2000, 2002, 2003, 2004 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.171 2021/06/16 00:21:18 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atw.c,v 1.172 2021/09/21 14:42:01 christos Exp $");
 
 
 #include <sys/param.h>
@@ -3946,8 +3946,8 @@ atw_ioctl(struct ifnet *ifp, u_long cmd,
 	case SIOCS80211:
 		ireq = data;
 		if (ireq->i_type == IEEE80211_IOC_FRAGTHRESHOLD) {
-			if ((error = kauth_authorize_network(curlwp->l_cred,
-			    KAUTH_NETWORK_INTERFACE,
+			if ((error = kauth_authorize_network(
+			    kauth_cred_get(), KAUTH_NETWORK_INTERFACE,
 			    KAUTH_REQ_NETWORK_INTERFACE_SETPRIV, ifp,
 			    (void *)cmd, NULL)) != 0)
 				break;

Reply via email to