A few more ioctl vs. copyin changes, spotted by Bill Studenmund.
This commit is contained in:
parent
22cea37a8e
commit
8afe56f1c5
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fil.c,v 1.61 2004/03/28 09:01:26 martti Exp $ */
|
||||
/* $NetBSD: fil.c,v 1.62 2004/04/01 21:54:41 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1993-2003 by Darren Reed.
|
||||
|
@ -135,7 +135,7 @@ struct file;
|
|||
#if !defined(lint)
|
||||
#if defined(__NetBSD__)
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.61 2004/03/28 09:01:26 martti Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: fil.c,v 1.62 2004/04/01 21:54:41 martin Exp $");
|
||||
#else
|
||||
static const char sccsid[] = "@(#)fil.c 1.36 6/5/96 (C) 1993-2000 Darren Reed";
|
||||
static const char rcsid[] = "@(#)Id: fil.c,v 2.243.2.7 2004/03/23 12:06:56 darrenr Exp";
|
||||
|
@ -4360,8 +4360,7 @@ void *data;
|
|||
{
|
||||
ipfunc_resolve_t res, *ft;
|
||||
|
||||
if (COPYIN(data, &res, sizeof(res)) != 0)
|
||||
return EFAULT;
|
||||
BCOPYIN(data, &res, sizeof(res));
|
||||
|
||||
if (res.ipfu_addr == NULL && res.ipfu_name[0] != '\0') {
|
||||
for (ft = fr_availfuncs; ft->ipfu_addr != NULL; ft++)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ip_lookup.c,v 1.1.1.1 2004/03/28 08:56:44 martti Exp $ */
|
||||
/* $NetBSD: ip_lookup.c,v 1.2 2004/04/01 21:54:41 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002-2003 by Darren Reed.
|
||||
|
@ -214,9 +214,8 @@ caddr_t data;
|
|||
ip_pool_t *p;
|
||||
int err;
|
||||
|
||||
err = COPYIN(data, &op, sizeof(op));
|
||||
if (err != 0)
|
||||
return EFAULT;
|
||||
BCOPYIN(data, &op, sizeof(op));
|
||||
err = 0;
|
||||
op.iplo_name[sizeof(op.iplo_name) - 1] = '\0';
|
||||
|
||||
switch (op.iplo_type)
|
||||
|
@ -285,9 +284,8 @@ caddr_t data;
|
|||
ip_pool_t *p;
|
||||
int err;
|
||||
|
||||
err = COPYIN(data, &op, sizeof(op));
|
||||
if (err != 0)
|
||||
return EFAULT;
|
||||
err = 0;
|
||||
BCOPYIN(data, &op, sizeof(op));
|
||||
op.iplo_name[sizeof(op.iplo_name) - 1] = '\0';
|
||||
|
||||
switch (op.iplo_type)
|
||||
|
@ -346,9 +344,8 @@ caddr_t data;
|
|||
iplookupop_t op;
|
||||
int err;
|
||||
|
||||
err = COPYIN(data, &op, sizeof(op));
|
||||
if (err != 0)
|
||||
return EFAULT;
|
||||
err = 0;
|
||||
BCOPYIN(data, &op, sizeof(op));
|
||||
op.iplo_name[sizeof(op.iplo_name) - 1] = '\0';
|
||||
|
||||
switch (op.iplo_type)
|
||||
|
@ -389,9 +386,8 @@ caddr_t data;
|
|||
iplookupop_t op;
|
||||
int err;
|
||||
|
||||
err = COPYIN(data, &op, sizeof(op));
|
||||
if (err != 0)
|
||||
return EFAULT;
|
||||
err = 0;
|
||||
BCOPYIN(data, &op, sizeof(op));
|
||||
op.iplo_name[sizeof(op.iplo_name) - 1] = '\0';
|
||||
|
||||
if (op.iplo_arg & IPLT_ANON)
|
||||
|
@ -432,9 +428,8 @@ caddr_t data;
|
|||
iplookupop_t op;
|
||||
int err;
|
||||
|
||||
err = COPYIN(data, &op, sizeof(op));
|
||||
if (err != 0)
|
||||
return EFAULT;
|
||||
err = 0;
|
||||
BCOPYIN(data, &op, sizeof(op));
|
||||
|
||||
switch (op.iplo_type)
|
||||
{
|
||||
|
@ -468,9 +463,8 @@ caddr_t data;
|
|||
int err, unit, num, type;
|
||||
iplookupflush_t flush;
|
||||
|
||||
err = COPYIN(data, &flush, sizeof(flush));
|
||||
if (err != 0)
|
||||
return EFAULT;
|
||||
err = 0;
|
||||
BCOPYIN(data, &flush, sizeof(flush));
|
||||
|
||||
flush.iplf_name[sizeof(flush.iplf_name) - 1] = '\0';
|
||||
|
||||
|
|
Loading…
Reference in New Issue