zfs_vnops.c (243524) | zfs_vnops.c (243560) |
---|---|
1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 3243 unchanged lines hidden (view full) --- 3252 } 3253 tx = dmu_tx_create(zfsvfs->z_os); 3254 3255 if (mask & AT_MODE) { 3256 uint64_t pmode = zp->z_mode; 3257 uint64_t acl_obj; 3258 new_mode = (pmode & S_IFMT) | (vap->va_mode & ~S_IFMT); 3259 | 1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 3243 unchanged lines hidden (view full) --- 3252 } 3253 tx = dmu_tx_create(zfsvfs->z_os); 3254 3255 if (mask & AT_MODE) { 3256 uint64_t pmode = zp->z_mode; 3257 uint64_t acl_obj; 3258 new_mode = (pmode & S_IFMT) | (vap->va_mode & ~S_IFMT); 3259 |
3260 if (zp->z_zfsvfs->z_acl_mode == ZFS_ACL_RESTRICTED && 3261 !(zp->z_pflags & ZFS_ACL_TRIVIAL)) { 3262 err = EPERM; 3263 goto out; 3264 } 3265 |
|
3260 if (err = zfs_acl_chmod_setattr(zp, &aclp, new_mode)) 3261 goto out; 3262 3263 mutex_enter(&zp->z_lock); 3264 if (!zp->z_is_sa && ((acl_obj = zfs_external_acl(zp)) != 0)) { 3265 /* 3266 * Are we upgrading ACL from old V0 format 3267 * to V1 format? --- 3567 unchanged lines hidden --- | 3266 if (err = zfs_acl_chmod_setattr(zp, &aclp, new_mode)) 3267 goto out; 3268 3269 mutex_enter(&zp->z_lock); 3270 if (!zp->z_is_sa && ((acl_obj = zfs_external_acl(zp)) != 0)) { 3271 /* 3272 * Are we upgrading ACL from old V0 format 3273 * to V1 format? --- 3567 unchanged lines hidden --- |