nfs_namei: return EACCES for empty filenames as rfc1813 says.
This commit is contained in:
parent
2520660990
commit
12ee5f9c3a
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_subs.c,v 1.146 2005/01/28 10:11:31 yamt Exp $ */
|
||||
/* $NetBSD: nfs_subs.c,v 1.147 2005/01/28 10:12:23 yamt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@ -70,7 +70,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.146 2005/01/28 10:11:31 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_subs.c,v 1.147 2005/01/28 10:12:23 yamt Exp $");
|
||||
|
||||
#include "fs_nfs.h"
|
||||
#include "opt_nfs.h"
|
||||
@ -2104,6 +2104,8 @@ nfs_namei(ndp, fhp, len, slp, nam, mdp, dposp, retdirp, p, kerbflag, pubflag)
|
||||
|
||||
if ((len + 1) > MAXPATHLEN)
|
||||
return (ENAMETOOLONG);
|
||||
if (len == 0)
|
||||
return (EACCES);
|
||||
cnp->cn_pnbuf = PNBUF_GET();
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user