Module Name: src
Committed By: elad
Date: Sun Apr 26 07:53:43 UTC 2009
Modified Files:
src/sys/dev/bluetooth: bcsp.c btuart.c
Log Message:
Authorizing actions from the generic scope using a device scope wrapper
is a big no-no.
As painful as it is, use kauth_authorize_generic() for now.
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/dev/bluetooth/bcsp.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/bluetooth/btuart.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/bluetooth/bcsp.c
diff -u src/sys/dev/bluetooth/bcsp.c:1.15 src/sys/dev/bluetooth/bcsp.c:1.16
--- src/sys/dev/bluetooth/bcsp.c:1.15 Sun Mar 15 15:43:40 2009
+++ src/sys/dev/bluetooth/bcsp.c Sun Apr 26 07:53:43 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: bcsp.c,v 1.15 2009/03/15 15:43:40 cegger Exp $ */
+/* $NetBSD: bcsp.c,v 1.16 2009/04/26 07:53:43 elad Exp $ */
/*
* Copyright (c) 2007 KIYOHARA Takashi
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.15 2009/03/15 15:43:40 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.16 2009/04/26 07:53:43 elad Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -378,8 +378,8 @@
int error, unit, s;
static char name[] = "bcsp";
- if ((error = kauth_authorize_device_tty(l->l_cred,
- KAUTH_GENERIC_ISSUSER, tp)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, NULL)) != 0)
return error;
s = spltty();
Index: src/sys/dev/bluetooth/btuart.c
diff -u src/sys/dev/bluetooth/btuart.c:1.20 src/sys/dev/bluetooth/btuart.c:1.21
--- src/sys/dev/bluetooth/btuart.c:1.20 Sun Jan 11 02:45:51 2009
+++ src/sys/dev/bluetooth/btuart.c Sun Apr 26 07:53:43 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: btuart.c,v 1.20 2009/01/11 02:45:51 christos Exp $ */
+/* $NetBSD: btuart.c,v 1.21 2009/04/26 07:53:43 elad Exp $ */
/*-
* Copyright (c) 2006, 2007 KIYOHARA Takashi
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.20 2009/01/11 02:45:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btuart.c,v 1.21 2009/04/26 07:53:43 elad Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -226,8 +226,8 @@
struct lwp *l = curlwp; /* XXX */
int error, unit, s;
- if ((error = kauth_authorize_device_tty(l->l_cred,
- KAUTH_GENERIC_ISSUSER, tp)) != 0)
+ if ((error = kauth_authorize_generic(l->l_cred,
+ KAUTH_GENERIC_ISSUSER, NULL)) != 0)
return error;
s = spltty();