*/
#include "includes.h"
+#include "ads.h"
#include "idmap_adex.h"
+#include "nss_info.h"
+#include "secrets.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_IDMAP
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
static NTSTATUS init_status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
- DOM_SID domain_sid;
+ struct dom_sid domain_sid;
fstring dcname;
struct sockaddr_storage ip;
struct likewise_cell *lwcell;
NTSTATUS nt_status;
struct likewise_cell *cell;
+ /* initialize the status to avoid suprise */
+ for (i = 0; ids[i]; i++) {
+ ids[i]->status = ID_UNKNOWN;
+ }
+
nt_status = _idmap_adex_init(dom, NULL);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
NTSTATUS nt_status;
struct likewise_cell *cell;
+ /* initialize the status to avoid suprise */
+ for (i = 0; ids[i]; i++) {
+ ids[i]->status = ID_UNKNOWN;
+ }
+
nt_status = _idmap_adex_init(dom, NULL);
if (!NT_STATUS_IS_OK(nt_status))
return nt_status;
return NT_STATUS_OK;
}
-/**********************************************************************
- *********************************************************************/
-
-static NTSTATUS _idmap_adex_set_mapping(struct
- idmap_domain
- *dom, const struct
- id_map *map)
-{
- DEBUG(0, ("_idmap_adex_set_mapping: not implemented\n"));
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-/**********************************************************************
- *********************************************************************/
-
-static NTSTATUS _idmap_adex_remove_mapping(struct
- idmap_domain
- *dom, const
- struct
- id_map
- *map)
-{
- DEBUG(0, ("_idmap_adex_remove_mapping: not implemented\n"));
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
-/**********************************************************************
- *********************************************************************/
-
-static NTSTATUS _idmap_adex_dump(struct idmap_domain
- *dom, struct id_map **maps, int *num_map)
-{
- return NT_STATUS_NOT_IMPLEMENTED;
-}
-
/**********************************************************************
*********************************************************************/
static NTSTATUS _nss_adex_get_info(struct
nss_domain_entry *e,
- const DOM_SID * sid,
+ const struct dom_sid * sid,
TALLOC_CTX * ctx,
ADS_STRUCT * ads,
LDAPMessage * msg,
- char **homedir,
- char **shell, char **gecos, gid_t * p_gid)
+ const char **homedir,
+ const char **shell,
+ const char **gecos, gid_t * p_gid)
{
NTSTATUS nt_status;
struct likewise_cell *cell;
/**********************************************************************
*********************************************************************/
-static NTSTATUS _nss_adex_map_to_alias(TALLOC_CTX * mem_ctx, const char
- *domain, const char
- *name, char **alias)
+static NTSTATUS _nss_adex_map_to_alias(TALLOC_CTX * mem_ctx,
+ struct nss_domain_entry *e,
+ const char *name, char **alias)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct likewise_cell *cell = NULL;
BAIL_ON_NTSTATUS_ERROR(nt_status);
}
- nt_status = cell->provider->map_to_alias(mem_ctx, domain,
+ nt_status = cell->provider->map_to_alias(mem_ctx, e->domain,
name, alias);
/* go ahead and allow the cache mgr to mark this in
/**********************************************************************
*********************************************************************/
-static NTSTATUS _nss_adex_map_from_alias(TALLOC_CTX * mem_ctx, const char
- *domain, const char
- *alias, char **name)
+static NTSTATUS _nss_adex_map_from_alias(TALLOC_CTX * mem_ctx,
+ struct nss_domain_entry *e,
+ const char *alias, char **name)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct likewise_cell *cell = NULL;
}
- nt_status = cell->provider->map_from_alias(mem_ctx, domain,
+ nt_status = cell->provider->map_from_alias(mem_ctx, e->domain,
alias, name);
/* go ahead and allow the cache mgr to mark this in
.init = _idmap_adex_init,
.unixids_to_sids = _idmap_adex_get_sid_from_id,
.sids_to_unixids = _idmap_adex_get_id_from_sid,
- .set_mapping = _idmap_adex_set_mapping,
- .remove_mapping = _idmap_adex_remove_mapping,
- .dump_data = _idmap_adex_dump,
.close_fn = _idmap_adex_close
};
static struct nss_info_methods adex_nss_methods = {
return NT_STATUS_OK;
}
-NTSTATUS nss_info_adex_init(void)
+static NTSTATUS nss_info_adex_init(void)
{
return idmap_adex_init();
}