00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _IDMAP_NSS_H
00024 #define _IDMAP_NSS_H
00025
00026 #ifndef HAVE_LDAP
00027 # ifndef LDAPMessage
00028 # define LDAPMessage void
00029 # endif
00030 #endif
00031
00032
00033
00034 #define SMB_NSS_INFO_INTERFACE_VERSION 1
00035
00036
00037
00038
00039 struct nss_function_entry {
00040 struct nss_function_entry *prev, *next;
00041
00042 const char *name;
00043 struct nss_info_methods *methods;
00044 };
00045
00046
00047
00048
00049 struct nss_domain_entry {
00050 struct nss_domain_entry *prev, *next;
00051
00052 const char *domain;
00053
00054 NTSTATUS init_status;
00055 struct nss_function_entry *backend;
00056
00057
00058
00059 void *state;
00060 };
00061
00062
00063
00064 struct nss_info_methods {
00065 NTSTATUS (*init)( struct nss_domain_entry *e );
00066 NTSTATUS (*get_nss_info)( struct nss_domain_entry *e,
00067 const DOM_SID *sid,
00068 TALLOC_CTX *ctx,
00069 ADS_STRUCT *ads, LDAPMessage *msg,
00070 char **homedir, char **shell, char **gecos, gid_t *p_gid);
00071 NTSTATUS (*close_fn)( void );
00072 };
00073
00074
00075
00076
00077 NTSTATUS smb_register_idmap_nss(int version,
00078 const char *name,
00079 struct nss_info_methods *methods);
00080
00081 NTSTATUS nss_init( const char **nss_list );
00082
00083 NTSTATUS nss_get_info( const char *domain, const DOM_SID *user_sid,
00084 TALLOC_CTX *ctx,
00085 ADS_STRUCT *ads, LDAPMessage *msg,
00086 char **homedir, char **shell, char **gecos,
00087 gid_t *p_gid);
00088
00089 NTSTATUS nss_close( const char *parameters );
00090
00091 #endif
00092