s4:lib/tls: add tstream_tls_params_client_lpcfg()
[samba.git] / source3 / include / nss_info.h
blob94df56ee7db0b85b8ec159e9b59ebdd15d5c01f6
1 /*
2 Unix SMB/CIFS implementation.
3 Idmap NSS headers
5 Copyright (C) Gerald Carter 2006
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 3 of the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU Lesser General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _IDMAP_NSS_H
22 #define _IDMAP_NSS_H
24 #ifndef HAVE_LDAP
25 # ifndef LDAPMessage
26 # define LDAPMessage void
27 # endif
28 #endif
30 /* The interface version specifier */
32 #define SMB_NSS_INFO_INTERFACE_VERSION 1
34 /* List of available backends. All backends must
35 register themselves */
37 struct nss_function_entry {
38 struct nss_function_entry *prev, *next;
40 const char *name;
41 const struct nss_info_methods *methods;
44 /* List of configured domains. Each domain points
45 back to its configured backend. */
47 struct nss_domain_entry {
48 struct nss_domain_entry *prev, *next;
50 const char *domain;
52 NTSTATUS init_status;
53 const struct nss_function_entry *backend;
55 /* hold state on a per domain basis */
57 void *state;
60 /* API */
62 struct nss_info_methods {
63 NTSTATUS (*init)( struct nss_domain_entry *e );
64 NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
65 struct nss_domain_entry *e,
66 const char *name, char **alias);
67 NTSTATUS (*map_from_alias)(TALLOC_CTX *mem_ctx,
68 struct nss_domain_entry *e,
69 const char *alias, char **name);
70 NTSTATUS (*close_fn)( void );
74 /* The following definitions come from nsswitch/nss_info.c */
76 NTSTATUS smb_register_idmap_nss(int version,
77 const char *name,
78 const struct nss_info_methods *methods);
80 NTSTATUS nss_map_to_alias( TALLOC_CTX *mem_ctx, const char *domain,
81 const char *name, char **alias );
83 NTSTATUS nss_map_from_alias( TALLOC_CTX *mem_ctx, const char *domain,
84 const char *alias, char **name );
86 NTSTATUS nss_close( const char *parameters );
88 /* The following definitions come from winbindd/nss_info.c */
91 /* The following definitions come from winbindd/nss_info_template.c */
93 NTSTATUS nss_info_template_init(TALLOC_CTX *mem_ctx);
95 #endif /* _IDMAP_NSS_H_ */