TALLOC_CTX *ctx,
ADS_STRUCT *ads, LDAPMessage *msg,
char **homedir, char **shell, char **gecos, gid_t *p_gid);
- NTSTATUS (*map_to_alias)( TALLOC_CTX *mem_ctx, const char *domain,
- const char *name, char **alias );
- NTSTATUS (*map_from_alias)( TALLOC_CTX *mem_ctx, const char *domain,
- const char *alias, char **name );
+ NTSTATUS (*map_to_alias)(TALLOC_CTX *mem_ctx,
+ struct nss_domain_entry *e,
+ const char *name, char **alias);
+ NTSTATUS (*map_from_alias)(TALLOC_CTX *mem_ctx,
+ struct nss_domain_entry *e,
+ const char *alias, char **name);
NTSTATUS (*close_fn)( void );
};
*********************************************************************/
static NTSTATUS nss_ad_map_to_alias(TALLOC_CTX *mem_ctx,
- const char *domain,
+ struct nss_domain_entry *e,
const char *name,
char **alias)
{
/* Check incoming parameters */
- if ( !domain || !name || !*alias) {
+ if ( !e || !e->domain || !name || !*alias) {
nt_status = NT_STATUS_INVALID_PARAMETER;
goto done;
}
*********************************************************************/
static NTSTATUS nss_ad_map_from_alias( TALLOC_CTX *mem_ctx,
- const char *domain,
+ struct nss_domain_entry *e,
const char *alias,
char **name )
{
/**********************************************************************
*********************************************************************/
-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
*********************************************************************/
static NTSTATUS nss_hash_map_to_alias(TALLOC_CTX *mem_ctx,
- const char *domain,
+ struct nss_domain_entry *e,
const char *name,
char **alias)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
const char *value;
- value = talloc_asprintf(mem_ctx, "%s\\%s", domain, name);
+ value = talloc_asprintf(mem_ctx, "%s\\%s", e->domain, name);
BAIL_ON_PTR_NT_ERROR(value, nt_status);
nt_status = mapfile_lookup_key(mem_ctx, value, alias);
*********************************************************************/
static NTSTATUS nss_hash_map_from_alias(TALLOC_CTX *mem_ctx,
- const char *domain,
+ struct nss_domain_entry *e,
const char *alias,
char **name)
{
m = p->backend->methods;
- return m->map_to_alias( mem_ctx, domain, name, alias );
+ return m->map_to_alias(mem_ctx, p, name, alias);
}
m = p->backend->methods;
- return m->map_from_alias( mem_ctx, domain, alias, name );
+ return m->map_from_alias( mem_ctx, p, alias, name );
}
/********************************************************************
*********************************************************************/
static NTSTATUS nss_template_map_to_alias( TALLOC_CTX *mem_ctx,
- const char *domain,
+ struct nss_domain_entry *e,
const char *name,
char **alias )
{
*********************************************************************/
static NTSTATUS nss_template_map_from_alias( TALLOC_CTX *mem_ctx,
- const char *domain,
+ struct nss_domain_entry *e,
const char *alias,
char **name )
{