Print this page
OS-1566 filesystem limits for ZFS datasets

*** 475,485 **** error = zfs_dozonecheck_ds(name, ds, cr); if (error == 0) { error = secpolicy_zfs(cr); if (error) ! error = dsl_deleg_access_impl(ds, perm, cr); } dsl_dataset_rele(ds, FTAG); return (error); } --- 475,485 ---- error = zfs_dozonecheck_ds(name, ds, cr); if (error == 0) { error = secpolicy_zfs(cr); if (error) ! error = dsl_deleg_access_impl(ds, perm, cr, B_TRUE); } dsl_dataset_rele(ds, FTAG); return (error); }
*** 492,502 **** error = zfs_dozonecheck_ds(name, ds, cr); if (error == 0) { error = secpolicy_zfs(cr); if (error) ! error = dsl_deleg_access_impl(ds, perm, cr); } return (error); } /* --- 492,502 ---- error = zfs_dozonecheck_ds(name, ds, cr); if (error == 0) { error = secpolicy_zfs(cr); if (error) ! error = dsl_deleg_access_impl(ds, perm, cr, B_TRUE); } return (error); } /*
*** 614,629 **** if (!INGLOBALZONE(curproc)) return (EPERM); break; case ZFS_PROP_QUOTA: if (!INGLOBALZONE(curproc)) { uint64_t zoned; char setpoint[MAXNAMELEN]; /* * Unprivileged users are allowed to modify the ! * quota on things *under* (ie. contained by) * the thing they own. */ if (dsl_prop_get_integer(dsname, "zoned", &zoned, setpoint)) return (EPERM); --- 614,631 ---- if (!INGLOBALZONE(curproc)) return (EPERM); break; case ZFS_PROP_QUOTA: + case ZFS_PROP_FILESYSTEM_LIMIT: + case ZFS_PROP_SNAPSHOT_LIMIT: if (!INGLOBALZONE(curproc)) { uint64_t zoned; char setpoint[MAXNAMELEN]; /* * Unprivileged users are allowed to modify the ! * limit on things *under* (ie. contained by) * the thing they own. */ if (dsl_prop_get_integer(dsname, "zoned", &zoned, setpoint)) return (EPERM);
*** 2381,2390 **** --- 2383,2400 ---- err = dsl_dir_set_quota(dsname, source, intval); break; case ZFS_PROP_REFQUOTA: err = dsl_dataset_set_quota(dsname, source, intval); break; + case ZFS_PROP_FILESYSTEM_LIMIT: + err = dsl_dir_validate_fs_ss_limit(dsname, intval, + ZFS_PROP_FILESYSTEM_LIMIT); + break; + case ZFS_PROP_SNAPSHOT_LIMIT: + err = dsl_dir_validate_fs_ss_limit(dsname, intval, + ZFS_PROP_SNAPSHOT_LIMIT); + break; case ZFS_PROP_RESERVATION: err = dsl_dir_set_reservation(dsname, source, intval); break; case ZFS_PROP_REFRESERVATION: err = dsl_dataset_set_reservation(dsname, source, intval);