use NFS_MAXNAMLEN for all names.
This commit is contained in:
parent
0d448f6c48
commit
ba2fe8705f
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_bio.c,v 1.187 2011/06/19 02:42:53 rmind Exp $ */
|
||||
/* $NetBSD: nfs_bio.c,v 1.188 2011/09/27 01:07:38 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_bio.c,v 1.187 2011/06/19 02:42:53 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_bio.c,v 1.188 2011/09/27 01:07:38 christos Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_nfs.h"
|
||||
@ -177,7 +177,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag,
|
||||
|
||||
case VLNK:
|
||||
nfsstats.biocache_readlinks++;
|
||||
bp = nfs_getcacheblk(vp, (daddr_t)0, NFS_MAXPATHLEN, l);
|
||||
bp = nfs_getcacheblk(vp, (daddr_t)0, MAXPATHLEN, l);
|
||||
if (!bp)
|
||||
return (EINTR);
|
||||
if ((bp->b_oflags & BO_DONE) == 0) {
|
||||
@ -188,7 +188,7 @@ nfs_bioread(struct vnode *vp, struct uio *uio, int ioflag,
|
||||
return (error);
|
||||
}
|
||||
}
|
||||
n = MIN(uio->uio_resid, NFS_MAXPATHLEN - bp->b_resid);
|
||||
n = MIN(uio->uio_resid, MAXPATHLEN - bp->b_resid);
|
||||
got_buf = 1;
|
||||
on = 0;
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_export.c,v 1.50 2011/03/31 19:40:53 dyoung Exp $ */
|
||||
/* $NetBSD: nfs_export.c,v 1.51 2011/09/27 01:07:38 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998, 2004, 2005, 2008 The NetBSD Foundation, Inc.
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.50 2011/03/31 19:40:53 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_export.c,v 1.51 2011/09/27 01:07:38 christos Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -783,9 +783,9 @@ setpublicfs(struct mount *mp, struct netexport *nep,
|
||||
* If an indexfile was specified, pull it in.
|
||||
*/
|
||||
if (argp->ex_indexfile != NULL) {
|
||||
nfs_pub.np_index = malloc(MAXNAMLEN + 1, M_TEMP, M_WAITOK);
|
||||
nfs_pub.np_index = malloc(NFS_MAXNAMLEN + 1, M_TEMP, M_WAITOK);
|
||||
error = copyinstr(argp->ex_indexfile, nfs_pub.np_index,
|
||||
MAXNAMLEN, (size_t *)0);
|
||||
NFS_MAXNAMLEN, (size_t *)0);
|
||||
if (!error) {
|
||||
/*
|
||||
* Check for illegal filenames.
|
||||
|
Loading…
Reference in New Issue
Block a user