Backoff the last patch. It was overly restrictive - we want to check

for write permission on target only when moving the target between two
directories.

Approved by:	rwatson (mentor)
This commit is contained in:
Edward Tomasz Napierala 2008-11-06 22:28:04 +00:00
parent a3ffa4e0ae
commit 36d227d9ed
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184740

View File

@ -1580,14 +1580,7 @@ zfs_zaccess_rename(znode_t *sdzp, znode_t *szp, znode_t *tdzp,
/*
* Rename permissions are combination of delete permission +
* add file/subdir permission.
*
* BSD operating systems also require write permission
* on the directory being moved.
*/
if (ZTOV(szp)->v_type == VDIR) {
if (error = zfs_zaccess(szp, ACE_WRITE_DATA, cr))
return (error);
}
/*
* first make sure we do the delete portion.