Don't let the user try "rmdir ."
Obtained from: NetBSD
This commit is contained in:
parent
f82a64e18d
commit
fe92746897
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=36525
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.96 1998/05/31 18:27:07 peter Exp $
|
||||
* $Id: nfs_vnops.c,v 1.97 1998/05/31 18:28:45 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1900,6 +1900,8 @@ nfs_rmdir(ap)
|
||||
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
|
||||
int v3 = NFS_ISV3(dvp);
|
||||
|
||||
if (dvp == vp)
|
||||
return (EINVAL);
|
||||
nfsstats.rpccnt[NFSPROC_RMDIR]++;
|
||||
nfsm_reqhead(dvp, NFSPROC_RMDIR,
|
||||
NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen));
|
||||
|
@ -34,7 +34,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)nfs_vnops.c 8.16 (Berkeley) 5/27/95
|
||||
* $Id: nfs_vnops.c,v 1.96 1998/05/31 18:27:07 peter Exp $
|
||||
* $Id: nfs_vnops.c,v 1.97 1998/05/31 18:28:45 peter Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -1900,6 +1900,8 @@ nfs_rmdir(ap)
|
||||
struct mbuf *mreq, *mrep, *md, *mb, *mb2;
|
||||
int v3 = NFS_ISV3(dvp);
|
||||
|
||||
if (dvp == vp)
|
||||
return (EINVAL);
|
||||
nfsstats.rpccnt[NFSPROC_RMDIR]++;
|
||||
nfsm_reqhead(dvp, NFSPROC_RMDIR,
|
||||
NFSX_FH(v3) + NFSX_UNSIGNED + nfsm_rndup(cnp->cn_namelen));
|
||||
|
Loading…
Reference in New Issue
Block a user