1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _GETXBY_DOOR_H 27 #define _GETXBY_DOOR_H 28 29 /* 30 * Definitions for client side of doors-based name service caching 31 */ 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 #include <netdb.h> 38 #include <netinet/in.h> 39 #include <arpa/inet.h> 40 #include <sys/socket.h> 41 #include <grp.h> 42 #include <pwd.h> 43 #include <exec_attr.h> 44 #include <prof_attr.h> 45 #include <user_attr.h> 46 #include <nss_dbdefs.h> 47 48 /* 49 * nscd version 2 doors interfaces 50 * The known, but private NAME_SERVICE_DOOR, filesystem name remains 51 * the same, even though the transfer contents is significantly different. 52 */ 53 54 #define NAME_SERVICE_DOOR_V2 2 55 #define NAME_SERVICE_DOOR_VERSION 2 56 #ifndef NAME_SERVICE_DOOR 57 #define NAME_SERVICE_DOOR "/var/run/name_service_door" 58 #endif 59 #define NAME_SERVICE_DOOR_COOKIE ((void*)(0xdeadbeef^NAME_SERVICE_DOOR_VERSION)) 60 61 /* 62 * internal APIs 63 */ 64 65 nss_status_t _nsc_trydoorcall(void **dptr, size_t *bsize, size_t *dsize); 66 nss_status_t _nsc_trydoorcall_ext(void **dptr, size_t *bsize, size_t *dsize); 67 int _nsc_getdoorbuf(void **dptr, size_t *bsize); 68 void _nsc_resizedoorbuf(size_t bsize); 69 int _nsc_proc_is_cache(); 70 71 72 struct passwd * 73 _uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer, 74 int buflen); 75 76 struct passwd * 77 _uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer, 78 int buflen); 79 80 struct group * 81 _uncached_getgrnam_r(const char *name, struct group *result, char *buffer, 82 int buflen); 83 84 struct group * 85 _uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen); 86 87 88 #ifdef __cplusplus 89 } 90 #endif 91 92 93 #endif /* _GETXBY_DOOR_H */ 94