summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/idmap.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/nsswitch/idmap.c b/source3/nsswitch/idmap.c
index dac1eb0521..885950830e 100644
--- a/source3/nsswitch/idmap.c
+++ b/source3/nsswitch/idmap.c
@@ -811,7 +811,7 @@ static NTSTATUS idmap_new_mapping(TALLOC_CTX *ctx, struct id_map *map)
{
NTSTATUS ret;
struct idmap_domain *dom;
- const char *domname, *name;
+ char *domname, *name;
enum lsa_SidType sid_type;
BOOL wbret;
@@ -825,14 +825,16 @@ static NTSTATUS idmap_new_mapping(TALLOC_CTX *ctx, struct id_map *map)
/* by default calls to winbindd are disabled
the following call will not recurse so this is safe */
winbind_on();
- wbret = winbind_lookup_sid(ctx, map->sid, &domname, &name, &sid_type);
+ wbret = winbind_lookup_sid(ctx, map->sid,
+ (const char **)&domname,
+ (const char **)&name,
+ &sid_type);
winbind_off();
} else {
- char *tmp_dom, *tmp_name;
- wbret = winbindd_lookup_name_by_sid(ctx, map->sid, &tmp_dom,
- &tmp_name, &sid_type);
- domname = tmp_dom;
- name = tmp_name;
+ wbret = winbindd_lookup_name_by_sid(ctx, map->sid,
+ &domname,
+ &name,
+ &sid_type);
}
/* check if this is a valid SID and then map it */