2 * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC.
3 * Copyright (C) 2007 The Regents of the University of California.
4 * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
5 * Written by Brian Behlendorf <behlendorf1@llnl.gov>.
8 * This file is part of the SPL, Solaris Porting Layer.
10 * The SPL is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
15 * The SPL is distributed in the hope that it will be useful, but WITHOUT
16 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
20 * You should have received a copy of the GNU General Public License along
21 * with the SPL. If not, see <http://www.gnu.org/licenses/>.
27 #include <sys/byteorder.h>
30 #include <linux/cred.h>
31 #include <linux/user_namespace.h>
34 * Attach the given dataset to the given user namespace.
36 extern int zone_dataset_attach(cred_t
*, const char *, int);
39 * Detach the given dataset from the given user namespace.
41 extern int zone_dataset_detach(cred_t
*, const char *, int);
44 * Returns true if the named pool/dataset is visible in the current zone.
46 extern int zone_dataset_visible(const char *dataset
, int *write
);
48 int spl_zone_init(void);
49 void spl_zone_fini(void);
51 extern unsigned int crgetzoneid(const cred_t
*);
52 extern unsigned int global_zoneid(void);
53 extern boolean_t
inglobalzone(proc_t
*);
55 #define INGLOBALZONE(x) inglobalzone(x)
56 #define GLOBAL_ZONEID global_zoneid()
58 #endif /* SPL_ZONE_H */