diff options
author | mm <mm@FreeBSD.org> | 2011-11-28 21:40:00 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-11-28 21:40:00 +0000 |
commit | 73cab7197174153a718dedc97ff344341bcf6098 (patch) | |
tree | 77fe89756134ff0449a9b13c294d9097b13f8db5 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c | |
parent | 72bf877ee7fec77d840c6cdf8e327dfcbe244e6e (diff) | |
download | FreeBSD-src-73cab7197174153a718dedc97ff344341bcf6098.zip FreeBSD-src-73cab7197174153a718dedc97ff344341bcf6098.tar.gz |
Merge new ZFS features from illumos:
1644 add ZFS "clones" property
https://www.illumos.org/issues/1644
1645 add ZFS "written" and "written@..." properties
https://www.illumos.org/issues/1645
1646 "zfs send" should estimate size of stream
https://www.illumos.org/issues/1646
1647 "zfs destroy" should determine space reclaimed by destroying multiple
snapshots
https://www.illumos.org/issues/1647
1693 persistent 'comment' field for a zpool
https://www.illumos.org/issues/1693
1708 adjust size of zpool history data
https://www.illumos.org/issues/1708
1748 desire support for reguid in zfs
https://www.illumos.org/issues/1748
Obtained from: illumos (changesets 13514, 13524, 13525)
MFC after: 1 month
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c index b85c373..0b5fa0b 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* @@ -525,10 +526,12 @@ dsl_load_user_sets(objset_t *mos, uint64_t zapobj, avl_tree_t *avl, } /* - * Check if user has requested permission. + * Check if user has requested permission. If descendent is set, must have + * descendent perms. */ int -dsl_deleg_access_impl(dsl_dataset_t *ds, const char *perm, cred_t *cr) +dsl_deleg_access_impl(dsl_dataset_t *ds, boolean_t descendent, const char *perm, + cred_t *cr) { dsl_dir_t *dd; dsl_pool_t *dp; @@ -549,7 +552,7 @@ dsl_deleg_access_impl(dsl_dataset_t *ds, const char *perm, cred_t *cr) SPA_VERSION_DELEGATED_PERMS) return (EPERM); - if (dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds) || descendent) { /* * Snapshots are treated as descendents only, * local permissions do not apply. @@ -642,7 +645,7 @@ dsl_deleg_access(const char *dsname, const char *perm, cred_t *cr) if (error) return (error); - error = dsl_deleg_access_impl(ds, perm, cr); + error = dsl_deleg_access_impl(ds, B_FALSE, perm, cr); dsl_dataset_rele(ds, FTAG); return (error); |