Return EPERM for an attempt to remove a directory with VOP_REMOVE, not EISDIR.
This commit is contained in:
parent
822371a987
commit
9b30a6a4e5
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: ufs_vnops.c,v 1.27 1997/06/26 22:23:17 christos Exp $ */
|
/* $NetBSD: ufs_vnops.c,v 1.28 1997/06/30 20:16:31 fvdl Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1982, 1986, 1989, 1993
|
* Copyright (c) 1982, 1986, 1989, 1993
|
||||||
@ -584,12 +584,8 @@ ufs_remove(v)
|
|||||||
register struct vnode *dvp = ap->a_dvp;
|
register struct vnode *dvp = ap->a_dvp;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
if (vp->v_type == VDIR) {
|
|
||||||
error = EISDIR;
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
ip = VTOI(vp);
|
ip = VTOI(vp);
|
||||||
if ((ip->i_ffs_flags & (IMMUTABLE | APPEND)) ||
|
if (vp->v_type == VDIR || (ip->i_ffs_flags & (IMMUTABLE | APPEND)) ||
|
||||||
(VTOI(dvp)->i_ffs_flags & APPEND)) {
|
(VTOI(dvp)->i_ffs_flags & APPEND)) {
|
||||||
error = EPERM;
|
error = EPERM;
|
||||||
goto out;
|
goto out;
|
||||||
|
Loading…
Reference in New Issue
Block a user