2 Unix SMB/CIFS implementation.
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 Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 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 Library General Public
18 License along with this library; if not, write to the
19 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
28 # define LDAPMessage void
32 /* The interface version specifier */
34 #define SMB_NSS_INFO_INTERFACE_VERSION 1
36 /* List of available backends. All backends must
37 register themselves */
39 struct nss_function_entry
{
40 struct nss_function_entry
*prev
, *next
;
43 struct nss_info_methods
*methods
;
46 /* List of configured domains. Each domain points
47 back to its configured backend. */
49 struct nss_domain_entry
{
50 struct nss_domain_entry
*prev
, *next
;
55 struct nss_function_entry
*backend
;
57 /* hold state on a per domain basis */
64 struct nss_info_methods
{
65 NTSTATUS (*init
)( struct nss_domain_entry
*e
);
66 NTSTATUS (*get_nss_info
)( struct nss_domain_entry
*e
,
69 ADS_STRUCT
*ads
, LDAPMessage
*msg
,
70 char **homedir
, char **shell
, char **gecos
, gid_t
*p_gid
);
71 NTSTATUS (*close_fn
)( void );
75 /* The following definitions come from nsswitch/nss_info.c */
77 NTSTATUS
smb_register_idmap_nss(int version
,
79 struct nss_info_methods
*methods
);
81 NTSTATUS
nss_init( const char **nss_list
);
83 NTSTATUS
nss_get_info( const char *domain
, const DOM_SID
*user_sid
,
85 ADS_STRUCT
*ads
, LDAPMessage
*msg
,
86 char **homedir
, char **shell
, char **gecos
,
89 NTSTATUS
nss_close( const char *parameters
);
91 #endif /* _IDMAP_NSS_H_ */