summaryrefslogtreecommitdiffstats
path: root/module/zcommon/zfs_deleg.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zcommon/zfs_deleg.c')
-rw-r--r--module/zcommon/zfs_deleg.c56
1 files changed, 25 insertions, 31 deletions
diff --git a/module/zcommon/zfs_deleg.c b/module/zcommon/zfs_deleg.c
index 9de61790c..a152b4e76 100644
--- a/module/zcommon/zfs_deleg.c
+++ b/module/zcommon/zfs_deleg.c
@@ -21,8 +21,11 @@
/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2010 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2013 by Delphix. All rights reserved.
*/
+#include <sys/zfs_context.h>
+
#if defined(_KERNEL)
#include <sys/systm.h>
#include <sys/sunddi.h>
@@ -34,43 +37,34 @@
#include <libnvpair.h>
#include <ctype.h>
#endif
-/* XXX includes zfs_context.h, so why bother with the above? */
#include <sys/dsl_deleg.h>
#include "zfs_prop.h"
#include "zfs_deleg.h"
#include "zfs_namecheck.h"
-/*
- * permission table
- *
- * Keep this table in sorted order
- *
- * This table is used for displaying all permissions for
- * zfs allow
- */
-
zfs_deleg_perm_tab_t zfs_deleg_perm_tab[] = {
- {ZFS_DELEG_PERM_ALLOW, ZFS_DELEG_NOTE_ALLOW},
- {ZFS_DELEG_PERM_CLONE, ZFS_DELEG_NOTE_CLONE },
- {ZFS_DELEG_PERM_CREATE, ZFS_DELEG_NOTE_CREATE },
- {ZFS_DELEG_PERM_DESTROY, ZFS_DELEG_NOTE_DESTROY },
- {ZFS_DELEG_PERM_MOUNT, ZFS_DELEG_NOTE_MOUNT },
- {ZFS_DELEG_PERM_PROMOTE, ZFS_DELEG_NOTE_PROMOTE },
- {ZFS_DELEG_PERM_RECEIVE, ZFS_DELEG_NOTE_RECEIVE },
- {ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
- {ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
- {ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
- {ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
- {ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_SEND },
- {ZFS_DELEG_PERM_USERPROP, ZFS_DELEG_NOTE_USERPROP },
- {ZFS_DELEG_PERM_USERQUOTA, ZFS_DELEG_NOTE_USERQUOTA },
- {ZFS_DELEG_PERM_GROUPQUOTA, ZFS_DELEG_NOTE_GROUPQUOTA },
- {ZFS_DELEG_PERM_USERUSED, ZFS_DELEG_NOTE_USERUSED },
- {ZFS_DELEG_PERM_GROUPUSED, ZFS_DELEG_NOTE_GROUPUSED },
- {ZFS_DELEG_PERM_HOLD, ZFS_DELEG_NOTE_HOLD },
- {ZFS_DELEG_PERM_RELEASE, ZFS_DELEG_NOTE_RELEASE },
- {ZFS_DELEG_PERM_DIFF, ZFS_DELEG_NOTE_DIFF},
- {NULL, ZFS_DELEG_NOTE_NONE }
+ {ZFS_DELEG_PERM_ALLOW},
+ {ZFS_DELEG_PERM_BOOKMARK},
+ {ZFS_DELEG_PERM_CLONE},
+ {ZFS_DELEG_PERM_CREATE},
+ {ZFS_DELEG_PERM_DESTROY},
+ {ZFS_DELEG_PERM_DIFF},
+ {ZFS_DELEG_PERM_MOUNT},
+ {ZFS_DELEG_PERM_PROMOTE},
+ {ZFS_DELEG_PERM_RECEIVE},
+ {ZFS_DELEG_PERM_RENAME},
+ {ZFS_DELEG_PERM_ROLLBACK},
+ {ZFS_DELEG_PERM_SNAPSHOT},
+ {ZFS_DELEG_PERM_SHARE},
+ {ZFS_DELEG_PERM_SEND},
+ {ZFS_DELEG_PERM_USERPROP},
+ {ZFS_DELEG_PERM_USERQUOTA},
+ {ZFS_DELEG_PERM_GROUPQUOTA},
+ {ZFS_DELEG_PERM_USERUSED},
+ {ZFS_DELEG_PERM_GROUPUSED},
+ {ZFS_DELEG_PERM_HOLD},
+ {ZFS_DELEG_PERM_RELEASE},
+ {NULL}
};
static int