diff options
| author | Matthew Ahrens <mahrens@delphix.com> | 2016-07-13 16:42:49 -0700 |
|---|---|---|
| committer | Matthew Ahrens <mahrens@delphix.com> | 2016-07-14 12:08:46 -0700 |
| commit | 25f7d993adbfb3452ac4625b3791670746d35ae3 (patch) | |
| tree | 27e305c42d5f18da085d13036ff0bcae4c098373 /usr/src | |
| parent | dcbf3bd6a1f1360fc1afcee9e22c6dcff7844bf2 (diff) | |
| download | illumos-joyent-25f7d993adbfb3452ac4625b3791670746d35ae3.tar.gz | |
7071 lzc_snapshot does not fill in errlist on ENOENT
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
| -rw-r--r-- | usr/src/uts/common/fs/zfs/zfs_ioctl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/zfs_ioctl.c b/usr/src/uts/common/fs/zfs/zfs_ioctl.c index f82104e8e4..e52b8f9b82 100644 --- a/usr/src/uts/common/fs/zfs/zfs_ioctl.c +++ b/usr/src/uts/common/fs/zfs/zfs_ioctl.c @@ -491,6 +491,14 @@ zfs_secpolicy_write_perms(const char *name, const char *perm, cred_t *cr) dsl_dataset_t *ds; dsl_pool_t *dp; + /* + * First do a quick check for root in the global zone, which + * is allowed to do all write_perms. This ensures that zfs_ioc_* + * will get to handle nonexistent datasets. + */ + if (INGLOBALZONE(curproc) && secpolicy_zfs(cr) == 0) + return (0); + error = dsl_pool_hold(name, FTAG, &dp); if (error != 0) return (error); |
