Date: Sat, 8 Nov 2008 19:56:32 +0000 (UTC) From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184770 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <200811081956.mA8JuWdj020934@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: trasz Date: Sat Nov 8 19:56:32 2008 New Revision: 184770 URL: http://svn.freebsd.org/changeset/base/184770 Log: Require write access on a directory being moved from one parent directory to another in ZFS. Approved by: rwatson (mentor), pjd Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Sat Nov 8 17:45:47 2008 (r184769) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c Sat Nov 8 19:56:32 2008 (r184770) @@ -1580,7 +1580,15 @@ zfs_zaccess_rename(znode_t *sdzp, znode_ /* * 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811081956.mA8JuWdj020934>