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 /* 22*11963SAfshin.Ardakani@Sun.COM * Copyright 2010 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 304520Snw141292 /* Idmap status codes */ 314520Snw141292 #define IDMAP_SUCCESS 0 324520Snw141292 #define IDMAP_NEXT 1 334520Snw141292 #define IDMAP_ERR_OTHER -10000 344520Snw141292 #define IDMAP_ERR_INTERNAL -9999 354520Snw141292 #define IDMAP_ERR_MEMORY -9998 364520Snw141292 #define IDMAP_ERR_NORESULT -9997 374520Snw141292 #define IDMAP_ERR_NOTUSER -9996 384520Snw141292 #define IDMAP_ERR_NOTGROUP -9995 394520Snw141292 #define IDMAP_ERR_NOTSUPPORTED -9994 404520Snw141292 #define IDMAP_ERR_W2U_NAMERULE -9993 414520Snw141292 #define IDMAP_ERR_U2W_NAMERULE -9992 424520Snw141292 #define IDMAP_ERR_CACHE -9991 434520Snw141292 #define IDMAP_ERR_DB -9990 444520Snw141292 #define IDMAP_ERR_ARG -9989 454520Snw141292 #define IDMAP_ERR_SID -9988 464520Snw141292 #define IDMAP_ERR_IDTYPE -9987 474520Snw141292 #define IDMAP_ERR_RPC_HANDLE -9986 484520Snw141292 #define IDMAP_ERR_RPC -9985 494520Snw141292 #define IDMAP_ERR_CLIENT_HANDLE -9984 504520Snw141292 #define IDMAP_ERR_BUSY -9983 514520Snw141292 #define IDMAP_ERR_PERMISSION_DENIED -9982 524520Snw141292 #define IDMAP_ERR_NOMAPPING -9981 534520Snw141292 #define IDMAP_ERR_NEW_ID_ALLOC_REQD -9980 544520Snw141292 #define IDMAP_ERR_DOMAIN -9979 554520Snw141292 #define IDMAP_ERR_SECURITY -9978 564520Snw141292 #define IDMAP_ERR_NOTFOUND -9977 574520Snw141292 #define IDMAP_ERR_DOMAIN_NOTFOUND -9976 584520Snw141292 #define IDMAP_ERR_UPDATE_NOTALLOWED -9975 594520Snw141292 #define IDMAP_ERR_CFG -9974 604520Snw141292 #define IDMAP_ERR_CFG_CHANGE -9973 614520Snw141292 #define IDMAP_ERR_NOTMAPPED_WELLKNOWN -9972 624520Snw141292 #define IDMAP_ERR_RETRIABLE_NET_ERR -9971 634864Sbaban #define IDMAP_ERR_W2U_NAMERULE_CONFLICT -9970 644864Sbaban #define IDMAP_ERR_U2W_NAMERULE_CONFLICT -9969 655968Snw141292 #define IDMAP_ERR_BAD_UTF8 -9968 668361SJulian.Pullen@Sun.COM #define IDMAP_ERR_NONE_GENERATED -9967 676616Sdm199847 #define IDMAP_ERR_PROP_UNKNOWN -9966 686616Sdm199847 #define IDMAP_ERR_NS_LDAP_OP_FAILED -9965 696616Sdm199847 #define IDMAP_ERR_NS_LDAP_PARTIAL -9964 706616Sdm199847 #define IDMAP_ERR_NS_LDAP_CFG -9963 716616Sdm199847 #define IDMAP_ERR_NS_LDAP_BAD_WINNAME -9962 728361SJulian.Pullen@Sun.COM #define IDMAP_ERR_NO_ACTIVEDIRECTORY -9961 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 93*11963SAfshin.Ardakani@Sun.COM #define IDMAP_SENTINEL_PID UINT32_MAX 94*11963SAfshin.Ardakani@Sun.COM #define IDMAP_ID_IS_EPHEMERAL(pid) \ 95*11963SAfshin.Ardakani@Sun.COM (((pid) > INT32_MAX) && ((pid) != IDMAP_SENTINEL_PID)) 96*11963SAfshin.Ardakani@Sun.COM 974520Snw141292 #endif /* _SYS_IDMAP_H */ 98