xref: /onnv-gate/usr/src/uts/common/sys/idmap.h (revision 6616:b32ce38b23ab)
14520Snw141292 /*
24520Snw141292  * CDDL HEADER START
34520Snw141292  *
44520Snw141292  * The contents of this file are subject to the terms of the
54520Snw141292  * Common Development and Distribution License (the "License").
64520Snw141292  * You may not use this file except in compliance with the License.
74520Snw141292  *
84520Snw141292  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
94520Snw141292  * or http://www.opensolaris.org/os/licensing.
104520Snw141292  * See the License for the specific language governing permissions
114520Snw141292  * and limitations under the License.
124520Snw141292  *
134520Snw141292  * When distributing Covered Code, include this CDDL HEADER in each
144520Snw141292  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
154520Snw141292  * If applicable, add the following below this CDDL HEADER, with the
164520Snw141292  * fields enclosed by brackets "[]" replaced with your own identifying
174520Snw141292  * information: Portions Copyright [yyyy] [name of copyright owner]
184520Snw141292  *
194520Snw141292  * CDDL HEADER END
204520Snw141292  */
214520Snw141292 /*
225968Snw141292  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
234520Snw141292  * Use is subject to license terms.
244520Snw141292  */
254520Snw141292 
264520Snw141292 #ifndef _SYS_IDMAP_H
274520Snw141292 #define	_SYS_IDMAP_H
284520Snw141292 
294520Snw141292 #pragma ident	"%Z%%M%	%I%	%E% SMI"
304520Snw141292 
314520Snw141292 /* Idmap status codes */
324520Snw141292 #define	IDMAP_SUCCESS			0
334520Snw141292 #define	IDMAP_NEXT			1
344520Snw141292 #define	IDMAP_ERR_OTHER			-10000
354520Snw141292 #define	IDMAP_ERR_INTERNAL		-9999
364520Snw141292 #define	IDMAP_ERR_MEMORY		-9998
374520Snw141292 #define	IDMAP_ERR_NORESULT		-9997
384520Snw141292 #define	IDMAP_ERR_NOTUSER		-9996
394520Snw141292 #define	IDMAP_ERR_NOTGROUP		-9995
404520Snw141292 #define	IDMAP_ERR_NOTSUPPORTED		-9994
414520Snw141292 #define	IDMAP_ERR_W2U_NAMERULE		-9993
424520Snw141292 #define	IDMAP_ERR_U2W_NAMERULE		-9992
434520Snw141292 #define	IDMAP_ERR_CACHE			-9991
444520Snw141292 #define	IDMAP_ERR_DB			-9990
454520Snw141292 #define	IDMAP_ERR_ARG			-9989
464520Snw141292 #define	IDMAP_ERR_SID			-9988
474520Snw141292 #define	IDMAP_ERR_IDTYPE		-9987
484520Snw141292 #define	IDMAP_ERR_RPC_HANDLE		-9986
494520Snw141292 #define	IDMAP_ERR_RPC			-9985
504520Snw141292 #define	IDMAP_ERR_CLIENT_HANDLE		-9984
514520Snw141292 #define	IDMAP_ERR_BUSY			-9983
524520Snw141292 #define	IDMAP_ERR_PERMISSION_DENIED	-9982
534520Snw141292 #define	IDMAP_ERR_NOMAPPING		-9981
544520Snw141292 #define	IDMAP_ERR_NEW_ID_ALLOC_REQD	-9980
554520Snw141292 #define	IDMAP_ERR_DOMAIN		-9979
564520Snw141292 #define	IDMAP_ERR_SECURITY		-9978
574520Snw141292 #define	IDMAP_ERR_NOTFOUND		-9977
584520Snw141292 #define	IDMAP_ERR_DOMAIN_NOTFOUND	-9976
594520Snw141292 #define	IDMAP_ERR_UPDATE_NOTALLOWED	-9975
604520Snw141292 #define	IDMAP_ERR_CFG			-9974
614520Snw141292 #define	IDMAP_ERR_CFG_CHANGE		-9973
624520Snw141292 #define	IDMAP_ERR_NOTMAPPED_WELLKNOWN	-9972
634520Snw141292 #define	IDMAP_ERR_RETRIABLE_NET_ERR	-9971
644864Sbaban #define	IDMAP_ERR_W2U_NAMERULE_CONFLICT	-9970
654864Sbaban #define	IDMAP_ERR_U2W_NAMERULE_CONFLICT	-9969
665968Snw141292 #define	IDMAP_ERR_BAD_UTF8		-9968
676386Sjp151216 #define	IDMAP_ERR_NONEGENERATED		-9967
68*6616Sdm199847 #define	IDMAP_ERR_PROP_UNKNOWN		-9966
69*6616Sdm199847 #define	IDMAP_ERR_NS_LDAP_OP_FAILED	-9965
70*6616Sdm199847 #define	IDMAP_ERR_NS_LDAP_PARTIAL	-9964
71*6616Sdm199847 #define	IDMAP_ERR_NS_LDAP_CFG		-9963
72*6616Sdm199847 #define	IDMAP_ERR_NS_LDAP_BAD_WINNAME	-9962
734520Snw141292 
744520Snw141292 /* Reserved GIDs for some well-known SIDs */
756386Sjp151216 #define	IDMAP_WK_LOCAL_SYSTEM_GID	2147483648U /* 0x80000000 */
764520Snw141292 #define	IDMAP_WK_CREATOR_GROUP_GID	2147483649U
774520Snw141292 #define	IDMAP_WK__MAX_GID		2147483649U
784520Snw141292 
794520Snw141292 /* Reserved UIDs for some well-known SIDs */
804520Snw141292 #define	IDMAP_WK_CREATOR_OWNER_UID	2147483648U
814520Snw141292 #define	IDMAP_WK__MAX_UID		2147483648U
824520Snw141292 
834695Sbaban /* Reserved SIDs */
844695Sbaban #define	IDMAP_WK_CREATOR_SID_AUTHORITY	"S-1-3"
854695Sbaban 
865232Snw141292 /*
875232Snw141292  * Max door RPC size for ID mapping (can't be too large relative to the
885232Snw141292  * default user-land thread stack size, since clnt_door_call()
895232Snw141292  * alloca()s).  See libidmap:idmap_init().
905232Snw141292  */
915232Snw141292 #define	IDMAP_MAX_DOOR_RPC		(256 * 1024)
925232Snw141292 
934520Snw141292 #endif /* _SYS_IDMAP_H */
94