summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorelad <elad@NetBSD.org>2006-05-14 21:42:26 +0000
committerelad <elad@NetBSD.org>2006-05-14 21:42:26 +0000
commit2867b68bc3d7cdb1bb7b9f8367e4aa0b2fa765f4 (patch)
treea0add7b65b60ddf03960733156c82bfb90bc978d /sys/dev/raidframe
parentfc9422c9d9d5eec5abd0d58ae5fa47aedf2198e3 (diff)
integrate kauth.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_copyback.c8
-rw-r--r--sys/dev/raidframe/rf_dagdegwr.h2
-rw-r--r--sys/dev/raidframe/rf_disks.c9
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c15
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c8
5 files changed, 22 insertions, 20 deletions
diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c
index cd0180ee907..018c423c771 100644
--- a/sys/dev/raidframe/rf_copyback.c
+++ b/sys/dev/raidframe/rf_copyback.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_copyback.c,v 1.32 2005/12/11 12:23:37 christos Exp $ */
+/* $NetBSD: rf_copyback.c,v 1.33 2006/05/14 21:45:00 elad Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -38,7 +38,7 @@
****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.32 2005/12/11 12:23:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_copyback.c,v 1.33 2006/05/14 21:45:00 elad Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -155,11 +155,11 @@ rf_CopybackReconstructedData(RF_Raid_t *raidPtr)
* getting a vp for it? */
if ((retcode = VOP_GETATTR(vp, &va,
- l->l_proc->p_ucred, l)) != 0) {
+ l->l_proc->p_cred, l)) != 0) {
return;
}
retcode = VOP_IOCTL(vp, DIOCGPART, &dpart,
- FREAD, l->l_proc->p_ucred, l);
+ FREAD, l->l_proc->p_cred, l);
if (retcode) {
return;
}
diff --git a/sys/dev/raidframe/rf_dagdegwr.h b/sys/dev/raidframe/rf_dagdegwr.h
index 6dc432ab597..5df19e4ab5b 100644
--- a/sys/dev/raidframe/rf_dagdegwr.h
+++ b/sys/dev/raidframe/rf_dagdegwr.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_dagdegwr.h,v 1.5 2006/04/26 17:08:48 oster Exp $ */
+/* $NetBSD: rf_dagdegwr.h,v 1.6 2006/05/14 21:45:00 elad Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c
index 0332a98301f..876bcd14830 100644
--- a/sys/dev/raidframe/rf_disks.c
+++ b/sys/dev/raidframe/rf_disks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_disks.c,v 1.59 2005/12/11 12:23:37 christos Exp $ */
+/* $NetBSD: rf_disks.c,v 1.60 2006/05/14 21:45:00 elad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -67,7 +67,7 @@
***************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.59 2005/12/11 12:23:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.60 2006/05/14 21:45:00 elad Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -85,6 +85,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.59 2005/12/11 12:23:37 christos Exp $
#include <sys/ioctl.h>
#include <sys/fcntl.h>
#include <sys/vnode.h>
+#include <sys/kauth.h>
static int rf_AllocDiskStructures(RF_Raid_t *, RF_Config_t *);
static void rf_print_label_status( RF_Raid_t *, int, char *,
@@ -615,11 +616,11 @@ rf_ConfigureDisk(RF_Raid_t *raidPtr, char *bf, RF_RaidDisk_t *diskPtr,
if (diskPtr->status == rf_ds_optimal) {
if ((error = VOP_GETATTR(vp, &va,
- l->l_proc->p_ucred, l)) != 0) {
+ l->l_proc->p_cred, l)) != 0) {
return (error);
}
error = VOP_IOCTL(vp, DIOCGPART, &dpart,
- FREAD, l->l_proc->p_ucred, l);
+ FREAD, l->l_proc->p_cred, l);
if (error) {
return (error);
}
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 154616dd2f9..1d621440c5f 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.207 2006/04/12 23:33:39 simonb Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.208 2006/05/14 21:45:00 elad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -146,7 +146,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.207 2006/04/12 23:33:39 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.208 2006/05/14 21:45:00 elad Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -168,6 +168,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.207 2006/04/12 23:33:39 simonb
#include <sys/bufq.h>
#include <sys/user.h>
#include <sys/reboot.h>
+#include <sys/kauth.h>
#include <dev/raidframe/raidframevar.h>
#include <dev/raidframe/raidframeio.h>
@@ -2114,18 +2115,18 @@ raidlookup(char *path, struct lwp *l, struct vnode **vpp)
vp = nd.ni_vp;
if (vp->v_usecount > 1) {
VOP_UNLOCK(vp, 0);
- (void) vn_close(vp, FREAD | FWRITE, p->p_ucred, l);
+ (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l);
return (EBUSY);
}
- if ((error = VOP_GETATTR(vp, &va, p->p_ucred, l)) != 0) {
+ if ((error = VOP_GETATTR(vp, &va, p->p_cred, l)) != 0) {
VOP_UNLOCK(vp, 0);
- (void) vn_close(vp, FREAD | FWRITE, p->p_ucred, l);
+ (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l);
return (error);
}
/* XXX: eventually we should handle VREG, too. */
if (va.va_type != VBLK) {
VOP_UNLOCK(vp, 0);
- (void) vn_close(vp, FREAD | FWRITE, p->p_ucred, l);
+ (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l);
return (ENOTBLK);
}
VOP_UNLOCK(vp, 0);
@@ -2455,7 +2456,7 @@ rf_close_component(RF_Raid_t *raidPtr, struct vnode *vp, int auto_configured)
vput(vp);
} else {
- (void) vn_close(vp, FREAD | FWRITE, p->p_ucred, l);
+ (void) vn_close(vp, FREAD | FWRITE, p->p_cred, l);
}
}
}
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index bf47a1c9d49..0d935dc7da9 100644
--- a/sys/dev/raidframe/rf_reconstruct.c
+++ b/sys/dev/raidframe/rf_reconstruct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.90 2005/12/11 12:23:37 christos Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.91 2006/05/14 21:45:00 elad Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -33,7 +33,7 @@
************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.90 2005/12/11 12:23:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_reconstruct.c,v 1.91 2006/05/14 21:45:00 elad Exp $");
#include <sys/time.h>
#include <sys/buf.h>
@@ -456,7 +456,7 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col)
/* Ok, so we can at least do a lookup...
How about actually getting a vp for it? */
- if ((retcode = VOP_GETATTR(vp, &va, lwp->l_proc->p_ucred, lwp)) != 0) {
+ if ((retcode = VOP_GETATTR(vp, &va, lwp->l_proc->p_cred, lwp)) != 0) {
RF_LOCK_MUTEX(raidPtr->mutex);
raidPtr->reconInProgress--;
RF_UNLOCK_MUTEX(raidPtr->mutex);
@@ -464,7 +464,7 @@ rf_ReconstructInPlace(RF_Raid_t *raidPtr, RF_RowCol_t col)
return(retcode);
}
- retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, lwp->l_proc->p_ucred, lwp);
+ retcode = VOP_IOCTL(vp, DIOCGPART, &dpart, FREAD, lwp->l_proc->p_cred, lwp);
if (retcode) {
RF_LOCK_MUTEX(raidPtr->mutex);
raidPtr->reconInProgress--;