mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
OpenZFS 7071 - lzc_snapshot does not fill in errlist on ENOENT
Authored by: Igor Kozhukhov ikozhukhov@gmail.com 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> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/7071 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/25f7d99 Closes #5597
This commit is contained in:
parent
cf7d1484bf
commit
e88551d52f
@ -467,6 +467,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);
|
||||
|
Loading…
Reference in New Issue
Block a user