dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / lib / libidmap / common / idmap_cache.h
blob5619761eb7f8183c6908f90dfb8cd3295d4323a0
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
23 * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
28 * Windows to Solaris Identity Mapping
29 * This header file contains cache definitions.
32 #ifndef _IDMAP_CACHE_H
33 #define _IDMAP_CACHE_H
36 #include <sys/avl.h>
37 #include "idmap.h"
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
43 void
44 idmap_cache_create();
46 void
47 idmap_cache_purge();
50 idmap_stat
51 idmap_cache_lookup_uidbysid(const char *sid_prefix, idmap_rid_t rid,
52 uid_t *uid);
54 idmap_stat
55 idmap_cache_lookup_gidbysid(const char *sid_prefix, idmap_rid_t rid,
56 gid_t *gid);
58 idmap_stat
59 idmap_cache_lookup_pidbysid(const char *sid_prefix, idmap_rid_t rid,
60 uid_t *pid, int *is_user);
62 idmap_stat
63 idmap_cache_lookup_sidbyuid(char **sid_prefix, idmap_rid_t *rid,
64 uid_t uid);
66 idmap_stat
67 idmap_cache_lookup_sidbygid(char **sid_prefix, idmap_rid_t *rid,
68 gid_t gid);
70 idmap_stat
71 idmap_cache_lookup_winnamebyuid(char **winname, char **windomain, uid_t uid);
73 idmap_stat
74 idmap_cache_lookup_winnamebygid(char **winname, char **windomain, gid_t gid);
76 idmap_stat
77 idmap_cache_lookup_uidbywinname(const char *winname, const char *windomain,
78 uid_t *uid);
80 idmap_stat
81 idmap_cache_lookup_gidbywinname(const char *winname, const char *windomain,
82 gid_t *gid);
84 void
85 idmap_cache_add_sid2uid(const char *sid_prefix, idmap_rid_t rid, uid_t uid,
86 int direction);
88 void
89 idmap_cache_add_sid2gid(const char *sid_prefix, idmap_rid_t rid, gid_t gid,
90 int direction);
92 void
93 idmap_cache_add_sid2pid(const char *sid_prefix, idmap_rid_t rid, uid_t pid,
94 int is_user, int direction);
96 void
97 idmap_cache_add_winname2uid(const char *winname, const char *windomain,
98 uid_t uid, int direction);
100 void
101 idmap_cache_add_winname2gid(const char *winname, const char *windomain,
102 gid_t gid, int direction);
104 void
105 idmap_cache_get_data(size_t *uidbysid, size_t *gidbysid, size_t *pidbysid,
106 size_t *sidbyuid, size_t *sidbygid,
107 size_t *winnamebyuid, size_t *winnamebygid,
108 size_t *uidbywinname, size_t *gidbywinname);
111 #ifdef __cplusplus
113 #endif
115 #endif /* _IDMAP_CACHE_H */