11b03c5bpjd#! /usr/bin/python2.6
2b2946e8mm#
3b2946e8mm# CDDL HEADER START
4b2946e8mm#
5b2946e8mm# The contents of this file are subject to the terms of the
6b2946e8mm# Common Development and Distribution License (the "License").
7b2946e8mm# You may not use this file except in compliance with the License.
8b2946e8mm#
9b2946e8mm# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10b2946e8mm# or http://www.opensolaris.org/os/licensing.
11b2946e8mm# See the License for the specific language governing permissions
12b2946e8mm# and limitations under the License.
13b2946e8mm#
14b2946e8mm# When distributing Covered Code, include this CDDL HEADER in each
15b2946e8mm# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16b2946e8mm# If applicable, add the following below this CDDL HEADER, with the
17b2946e8mm# fields enclosed by brackets "[]" replaced with your own identifying
18b2946e8mm# information: Portions Copyright [yyyy] [name of copyright owner]
19b2946e8mm#
20b2946e8mm# CDDL HEADER END
21b2946e8mm#
221b03c5bpjd# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
23b2946e8mm#
24b2946e8mm
25b2946e8mm"""This module implements the "zfs userspace" and "zfs groupspace" subcommands.
26b2946e8mmThe only public interface is the zfs.userspace.do_userspace() function."""
27b2946e8mm
28b2946e8mmimport optparse
29b2946e8mmimport sys
30b2946e8mmimport pwd
31b2946e8mmimport grp
32b2946e8mmimport errno
331b03c5bpjdimport solaris.misc
341b03c5bpjdimport zfs.util
351b03c5bpjdimport zfs.ioctl
361b03c5bpjdimport zfs.dataset
371b03c5bpjdimport zfs.table
38b2946e8mm
39b2946e8mm_ = zfs.util._
40b2946e8mm
41b2946e8mm# map from property name prefix -> (field name, isgroup)
42