diff options
Diffstat (limited to 'source3/include/nss_info.h')
-rw-r--r-- | source3/include/nss_info.h | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h new file mode 100644 index 0000000000..f442bf0db5 --- /dev/null +++ b/source3/include/nss_info.h @@ -0,0 +1,68 @@ +/* + Unix SMB/CIFS implementation. + Idmap NSS headers + + Copyright (C) Gerald Carter 2006 + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef _IDMAP_NSS_H +#define _IDMAP_NSS_H + +/* The interface version specifier */ + +#define SMB_NSS_INFO_INTERFACE_VERSION 1 + +/* List of available backends. All backends must + register themselves */ + +struct nss_function_entry { + struct nss_function_entry *prev, *next; + + const char *name; + struct nss_info_methods *methods; +}; + +/* List of configured domains. Each domain points + back to its configured backend. */ + +struct nss_domain_entry { + struct nss_domain_entry *prev, *next; + + const char *domain; + + NTSTATUS init_status; + struct nss_function_entry *backend; + + /* hold state on a per domain basis */ + + void *state; +}; + +/* API */ + +struct nss_info_methods { + NTSTATUS (*init)( struct nss_domain_entry *e ); + NTSTATUS (*get_nss_info)( struct nss_domain_entry *e, + const DOM_SID *sid, + TALLOC_CTX *ctx, + ADS_STRUCT *ads, LDAPMessage *msg, + char **homedir, char **shell, char **gecos, gid_t *p_gid); + NTSTATUS (*close_fn)( void ); +}; + +#endif /* _IDMAP_NSS_H_ */ |