Deleted Added
full compact
zfs_deleg.c (185029) zfs_deleg.c (209962)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 5 unchanged lines hidden (view full) ---

14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
23 * Use is subject to license terms.
24 */
25
26
27#pragma ident "%Z%%M% %I% %E% SMI"
28
29#if defined(_KERNEL)
30#include <sys/systm.h>
31#include <sys/sunddi.h>
32#include <sys/ctype.h>
33#else
34#include <stdio.h>
35#include <unistd.h>
36#include <strings.h>

--- 24 unchanged lines hidden (view full) ---

61 {ZFS_DELEG_PERM_PROMOTE, ZFS_DELEG_NOTE_PROMOTE },
62 {ZFS_DELEG_PERM_RECEIVE, ZFS_DELEG_NOTE_RECEIVE },
63 {ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
64 {ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
65 {ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
66 {ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
67 {ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_NONE },
68 {ZFS_DELEG_PERM_USERPROP, ZFS_DELEG_NOTE_USERPROP },
26#if defined(_KERNEL)
27#include <sys/systm.h>
28#include <sys/sunddi.h>
29#include <sys/ctype.h>
30#else
31#include <stdio.h>
32#include <unistd.h>
33#include <strings.h>

--- 24 unchanged lines hidden (view full) ---

58 {ZFS_DELEG_PERM_PROMOTE, ZFS_DELEG_NOTE_PROMOTE },
59 {ZFS_DELEG_PERM_RECEIVE, ZFS_DELEG_NOTE_RECEIVE },
60 {ZFS_DELEG_PERM_RENAME, ZFS_DELEG_NOTE_RENAME },
61 {ZFS_DELEG_PERM_ROLLBACK, ZFS_DELEG_NOTE_ROLLBACK },
62 {ZFS_DELEG_PERM_SNAPSHOT, ZFS_DELEG_NOTE_SNAPSHOT },
63 {ZFS_DELEG_PERM_SHARE, ZFS_DELEG_NOTE_SHARE },
64 {ZFS_DELEG_PERM_SEND, ZFS_DELEG_NOTE_NONE },
65 {ZFS_DELEG_PERM_USERPROP, ZFS_DELEG_NOTE_USERPROP },
66 {ZFS_DELEG_PERM_USERQUOTA, ZFS_DELEG_NOTE_USERQUOTA },
67 {ZFS_DELEG_PERM_GROUPQUOTA, ZFS_DELEG_NOTE_GROUPQUOTA },
68 {ZFS_DELEG_PERM_USERUSED, ZFS_DELEG_NOTE_USERUSED },
69 {ZFS_DELEG_PERM_GROUPUSED, ZFS_DELEG_NOTE_GROUPUSED },
69 {NULL, ZFS_DELEG_NOTE_NONE }
70};
71
72static int
73zfs_valid_permission_name(const char *perm)
74{
75 if (zfs_deleg_canonicalize_perm(perm))
76 return (0);

--- 158 unchanged lines hidden ---
70 {NULL, ZFS_DELEG_NOTE_NONE }
71};
72
73static int
74zfs_valid_permission_name(const char *perm)
75{
76 if (zfs_deleg_canonicalize_perm(perm))
77 return (0);

--- 158 unchanged lines hidden ---