Date: Sun, 17 Aug 2008 10:34:13 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 147636 for review Message-ID: <200808171034.m7HAYD9x093109@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=147636 Change 147636 by trasz@trasz_traszkan on 2008/08/17 10:33:56 Make UFS behave the same as ZFS (and UFS in SunOS) does when moving a subdirectory between two directories. Without this change, moving a/x/ to b/ requires write permission on a/, b/, _and_ a/x/. After this change, it requires only write permissions on a/ and b/. I guess this may be a little controversial. ;-) Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#15 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_vnops.c#15 (text+ko) ==== @@ -1164,19 +1164,14 @@ * If ".." must be changed (ie the directory gets a new * parent) then the source directory must not be in the * directory hierarchy above the target, as this would - * orphan everything below the source directory. Also - * the user must have write permission in the source so - * as to be able to change "..". We must repeat the call - * to namei, as the parent directory is unlocked by the - * call to checkpath(). + * orphan everything below the source directory. We must + * repeat the call to namei, as the parent directory + * is unlocked by the call to checkpath(). */ - error = VOP_ACCESS(fvp, VWRITE, tcnp->cn_cred, tcnp->cn_thread); VOP_UNLOCK(fvp, 0); if (oldparent != dp->i_number) newparent = dp->i_number; if (doingdirectory && newparent) { - if (error) /* write access check above */ - goto bad; if (xp != NULL) vput(tvp); error = ufs_checkpath(ip, dp, tcnp->cn_cred);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808171034.m7HAYD9x093109>