diff options
author | trasz <trasz@FreeBSD.org> | 2008-11-08 19:56:32 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2008-11-08 19:56:32 +0000 |
commit | 47921f147ee5c660bee487dbe0cd5154ad9030ed (patch) | |
tree | 3e779fb1390c5d47deef50cd931ccf41b50c79c8 /sys/cddl/contrib/opensolaris | |
parent | 968a3d70d87fa14202ab060089cc8995cd610691 (diff) | |
download | FreeBSD-src-47921f147ee5c660bee487dbe0cd5154ad9030ed.zip FreeBSD-src-47921f147ee5c660bee487dbe0cd5154ad9030ed.tar.gz |
Require write access on a directory being moved from one parent
directory to another in ZFS.
Approved by: rwatson (mentor), pjd
Diffstat (limited to 'sys/cddl/contrib/opensolaris')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c index dd94618..33c2909 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c @@ -1580,7 +1580,15 @@ 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 from one parent directory + * to another. */ + if (ZTOV(szp)->v_type == VDIR && ZTOV(sdzp) != ZTOV(tdzp)) { + if (error = zfs_zaccess(szp, ACE_WRITE_DATA, cr)) + return (error); + } /* * first make sure we do the delete portion. |