Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/ccd.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/ccd.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.134.4.1 retrieving revision 1.134.4.2 diff -u -p -r1.134.4.1 -r1.134.4.2 --- src/sys/dev/ccd.c 2010/03/16 15:38:05 1.134.4.1 +++ src/sys/dev/ccd.c 2011/03/05 20:52:59 1.134.4.2 @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.134.4.1 2010/03/16 15:38:05 rmind Exp $ */ +/* $NetBSD: ccd.c,v 1.134.4.2 2011/03/05 20:52:59 rmind Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -30,6 +30,7 @@ */ /* + * Copyright (c) 1988 University of Utah. * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * @@ -67,46 +68,6 @@ */ /* - * Copyright (c) 1988 University of Utah. - * - * This code is derived from software contributed to Berkeley by - * the Systems Programming Group of the University of Utah Computer - * Science Department. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * from: Utah $Hdr: cd.c 1.6 90/11/28$ - * - * @(#)cd.c 8.2 (Berkeley) 11/16/93 - */ - -/* * "Concatenated" disk driver. * * Notes on concurrency: @@ -127,7 +88,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.134.4.1 2010/03/16 15:38:05 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.134.4.2 2011/03/05 20:52:59 rmind Exp $"); #include #include @@ -153,6 +114,8 @@ __KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.13 #include #include +#include + #include #include @@ -1068,6 +1031,7 @@ ccdioctl(dev_t dev, u_long cmd, void *da struct ccd_ioctl *ccio = (struct ccd_ioctl *)data; kauth_cred_t uc; char **cpp; + struct pathbuf *pb; struct vnode **vpp; #ifdef __HAVE_OLD_DISKLABEL struct disklabel newlabel; @@ -1169,8 +1133,12 @@ ccdioctl(dev_t dev, u_long cmd, void *da if (ccddebug & CCDB_INIT) printf("ccdioctl: lookedup = %d\n", lookedup); #endif - if ((error = dk_lookup(cpp[i], l, &vpp[i], - UIO_USERSPACE)) != 0) { + error = pathbuf_copyin(cpp[i], &pb); + if (error == 0) { + error = dk_lookup(pb, l, &vpp[i]); + } + pathbuf_destroy(pb); + if (error != 0) { for (j = 0; j < lookedup; ++j) (void)vn_close(vpp[j], FREAD|FWRITE, uc);