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

Modified Files:
        src/sys/dev/usb: if_umb.c

Log Message:
don't opencode kauth_cred_get()


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/usb/if_umb.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/usb/if_umb.c
diff -u src/sys/dev/usb/if_umb.c:1.20 src/sys/dev/usb/if_umb.c:1.21
--- src/sys/dev/usb/if_umb.c:1.20	Tue Jun 15 20:21:19 2021
+++ src/sys/dev/usb/if_umb.c	Tue Sep 21 10:49:01 2021
@@ -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,
 		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,
 		    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);

Reply via email to