xref: /titanic_51/usr/src/uts/common/sys/idmap.h (revision 48258c6b4e17f36ab09fba0bd6307d1fec9dcbce)
1c5c4113dSnw141292 /*
2c5c4113dSnw141292  * CDDL HEADER START
3c5c4113dSnw141292  *
4c5c4113dSnw141292  * The contents of this file are subject to the terms of the
5c5c4113dSnw141292  * Common Development and Distribution License (the "License").
6c5c4113dSnw141292  * You may not use this file except in compliance with the License.
7c5c4113dSnw141292  *
8c5c4113dSnw141292  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9c5c4113dSnw141292  * or http://www.opensolaris.org/os/licensing.
10c5c4113dSnw141292  * See the License for the specific language governing permissions
11c5c4113dSnw141292  * and limitations under the License.
12c5c4113dSnw141292  *
13c5c4113dSnw141292  * When distributing Covered Code, include this CDDL HEADER in each
14c5c4113dSnw141292  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15c5c4113dSnw141292  * If applicable, add the following below this CDDL HEADER, with the
16c5c4113dSnw141292  * fields enclosed by brackets "[]" replaced with your own identifying
17c5c4113dSnw141292  * information: Portions Copyright [yyyy] [name of copyright owner]
18c5c4113dSnw141292  *
19c5c4113dSnw141292  * CDDL HEADER END
20c5c4113dSnw141292  */
21c5c4113dSnw141292 /*
220dcc7149Snw141292  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23c5c4113dSnw141292  * Use is subject to license terms.
24c5c4113dSnw141292  */
25c5c4113dSnw141292 
26c5c4113dSnw141292 #ifndef _SYS_IDMAP_H
27c5c4113dSnw141292 #define	_SYS_IDMAP_H
28c5c4113dSnw141292 
29c5c4113dSnw141292 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30c5c4113dSnw141292 
31c5c4113dSnw141292 /* Idmap status codes */
32c5c4113dSnw141292 #define	IDMAP_SUCCESS			0
33c5c4113dSnw141292 #define	IDMAP_NEXT			1
34c5c4113dSnw141292 #define	IDMAP_ERR_OTHER			-10000
35c5c4113dSnw141292 #define	IDMAP_ERR_INTERNAL		-9999
36c5c4113dSnw141292 #define	IDMAP_ERR_MEMORY		-9998
37c5c4113dSnw141292 #define	IDMAP_ERR_NORESULT		-9997
38c5c4113dSnw141292 #define	IDMAP_ERR_NOTUSER		-9996
39c5c4113dSnw141292 #define	IDMAP_ERR_NOTGROUP		-9995
40c5c4113dSnw141292 #define	IDMAP_ERR_NOTSUPPORTED		-9994
41c5c4113dSnw141292 #define	IDMAP_ERR_W2U_NAMERULE		-9993
42c5c4113dSnw141292 #define	IDMAP_ERR_U2W_NAMERULE		-9992
43c5c4113dSnw141292 #define	IDMAP_ERR_CACHE			-9991
44c5c4113dSnw141292 #define	IDMAP_ERR_DB			-9990
45c5c4113dSnw141292 #define	IDMAP_ERR_ARG			-9989
46c5c4113dSnw141292 #define	IDMAP_ERR_SID			-9988
47c5c4113dSnw141292 #define	IDMAP_ERR_IDTYPE		-9987
48c5c4113dSnw141292 #define	IDMAP_ERR_RPC_HANDLE		-9986
49c5c4113dSnw141292 #define	IDMAP_ERR_RPC			-9985
50c5c4113dSnw141292 #define	IDMAP_ERR_CLIENT_HANDLE		-9984
51c5c4113dSnw141292 #define	IDMAP_ERR_BUSY			-9983
52c5c4113dSnw141292 #define	IDMAP_ERR_PERMISSION_DENIED	-9982
53c5c4113dSnw141292 #define	IDMAP_ERR_NOMAPPING		-9981
54c5c4113dSnw141292 #define	IDMAP_ERR_NEW_ID_ALLOC_REQD	-9980
55c5c4113dSnw141292 #define	IDMAP_ERR_DOMAIN		-9979
56c5c4113dSnw141292 #define	IDMAP_ERR_SECURITY		-9978
57c5c4113dSnw141292 #define	IDMAP_ERR_NOTFOUND		-9977
58c5c4113dSnw141292 #define	IDMAP_ERR_DOMAIN_NOTFOUND	-9976
59c5c4113dSnw141292 #define	IDMAP_ERR_UPDATE_NOTALLOWED	-9975
60c5c4113dSnw141292 #define	IDMAP_ERR_CFG			-9974
61c5c4113dSnw141292 #define	IDMAP_ERR_CFG_CHANGE		-9973
62c5c4113dSnw141292 #define	IDMAP_ERR_NOTMAPPED_WELLKNOWN	-9972
63c5c4113dSnw141292 #define	IDMAP_ERR_RETRIABLE_NET_ERR	-9971
6462c60062Sbaban #define	IDMAP_ERR_W2U_NAMERULE_CONFLICT	-9970
6562c60062Sbaban #define	IDMAP_ERR_U2W_NAMERULE_CONFLICT	-9969
660dcc7149Snw141292 #define	IDMAP_ERR_BAD_UTF8		-9968
67*48258c6bSjp151216 #define	IDMAP_ERR_NONEGENERATED		-9967
68c5c4113dSnw141292 
69c5c4113dSnw141292 /* Reserved GIDs for some well-known SIDs */
70*48258c6bSjp151216 #define	IDMAP_WK_LOCAL_SYSTEM_GID	2147483648U /* 0x80000000 */
71c5c4113dSnw141292 #define	IDMAP_WK_CREATOR_GROUP_GID	2147483649U
72c5c4113dSnw141292 #define	IDMAP_WK__MAX_GID		2147483649U
73c5c4113dSnw141292 
74c5c4113dSnw141292 /* Reserved UIDs for some well-known SIDs */
75c5c4113dSnw141292 #define	IDMAP_WK_CREATOR_OWNER_UID	2147483648U
76c5c4113dSnw141292 #define	IDMAP_WK__MAX_UID		2147483648U
77c5c4113dSnw141292 
788edda628Sbaban /* Reserved SIDs */
798edda628Sbaban #define	IDMAP_WK_CREATOR_SID_AUTHORITY	"S-1-3"
808edda628Sbaban 
81d3a612caSnw141292 /*
82d3a612caSnw141292  * Max door RPC size for ID mapping (can't be too large relative to the
83d3a612caSnw141292  * default user-land thread stack size, since clnt_door_call()
84d3a612caSnw141292  * alloca()s).  See libidmap:idmap_init().
85d3a612caSnw141292  */
86d3a612caSnw141292 #define	IDMAP_MAX_DOOR_RPC		(256 * 1024)
87d3a612caSnw141292 
88c5c4113dSnw141292 #endif /* _SYS_IDMAP_H */
89