0
|
1 |
/*
|
|
2 |
* CDDL HEADER START
|
|
3 |
*
|
|
4 |
* The contents of this file are subject to the terms of the
|
2830
|
5 |
* Common Development and Distribution License (the "License").
|
|
6 |
* You may not use this file except in compliance with the License.
|
0
|
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 |
/*
|
2830
|
22 |
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
0
|
23 |
* Use is subject to license terms.
|
|
24 |
*/
|
|
25 |
|
|
26 |
#ifndef _GETXBY_DOOR_H
|
|
27 |
#define _GETXBY_DOOR_H
|
|
28 |
|
|
29 |
#pragma ident "%Z%%M% %I% %E% SMI"
|
|
30 |
|
|
31 |
/*
|
|
32 |
* Definitions for client side of doors-based name service caching
|
|
33 |
*/
|
|
34 |
|
|
35 |
#ifdef __cplusplus
|
|
36 |
extern "C" {
|
|
37 |
#endif
|
|
38 |
|
|
39 |
#include <netdb.h>
|
|
40 |
#include <netinet/in.h>
|
|
41 |
#include <arpa/inet.h>
|
|
42 |
#include <sys/socket.h>
|
|
43 |
#include <grp.h>
|
|
44 |
#include <pwd.h>
|
|
45 |
#include <exec_attr.h>
|
|
46 |
#include <prof_attr.h>
|
|
47 |
#include <user_attr.h>
|
2830
|
48 |
#include <nss_dbdefs.h>
|
0
|
49 |
|
|
50 |
/*
|
2830
|
51 |
* nscd version 2 doors interfaces
|
|
52 |
* The known, but private NAME_SERVICE_DOOR, filesystem name remains
|
|
53 |
* the same, even though the transfer contents is significantly different.
|
0
|
54 |
*/
|
|
55 |
|
2830
|
56 |
#define NAME_SERVICE_DOOR_V2 2
|
|
57 |
#define NAME_SERVICE_DOOR_VERSION 2
|
|
58 |
#ifndef NAME_SERVICE_DOOR
|
|
59 |
#define NAME_SERVICE_DOOR "/var/run/name_service_door"
|
|
60 |
#endif
|
|
61 |
#define NAME_SERVICE_DOOR_COOKIE ((void*)(0xdeadbeef^NAME_SERVICE_DOOR_VERSION))
|
0
|
62 |
|
|
63 |
/*
|
2830
|
64 |
* internal APIs
|
0
|
65 |
*/
|
|
66 |
|
2830
|
67 |
nss_status_t _nsc_trydoorcall(void **dptr, size_t *bsize, size_t *dsize);
|
|
68 |
nss_status_t _nsc_trydoorcall_ext(void **dptr, size_t *bsize, size_t *dsize);
|
|
69 |
int _nsc_getdoorbuf(void **dptr, size_t *bsize);
|
|
70 |
void _nsc_resizedoorbuf(size_t bsize);
|
|
71 |
int _nsc_proc_is_cache();
|
0
|
72 |
|
|
73 |
|
|
74 |
struct passwd *
|
|
75 |
_uncached_getpwuid_r(uid_t uid, struct passwd *result, char *buffer,
|
|
76 |
int buflen);
|
|
77 |
|
|
78 |
struct passwd *
|
|
79 |
_uncached_getpwnam_r(const char *name, struct passwd *result, char *buffer,
|
|
80 |
int buflen);
|
|
81 |
|
|
82 |
struct group *
|
|
83 |
_uncached_getgrnam_r(const char *name, struct group *result, char *buffer,
|
|
84 |
int buflen);
|
|
85 |
|
|
86 |
struct group *
|
|
87 |
_uncached_getgrgid_r(gid_t gid, struct group *result, char *buffer, int buflen);
|
|
88 |
|
|
89 |
|
|
90 |
#ifdef __cplusplus
|
|
91 |
}
|
|
92 |
#endif
|
|
93 |
|
|
94 |
|
|
95 |
#endif /* _GETXBY_DOOR_H */
|