summaryrefslogtreecommitdiff
path: root/source3/winbindd/wb_sids2xids.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2012-11-18 13:51:13 +0100
committerStefan Metzmacher <metze@samba.org>2012-12-03 08:48:22 +0100
commit28e7d73bdcdf1a3d588e92eee982ff01db53d65d (patch)
tree2ed0ec82b779cedb857bbe276c46675e9944af28 /source3/winbindd/wb_sids2xids.c
parentda8d0263806260fdb4973f22fc874710bd490421 (diff)
downloadsamba-28e7d73bdcdf1a3d588e92eee982ff01db53d65d.tar.gz
samba-28e7d73bdcdf1a3d588e92eee982ff01db53d65d.tar.bz2
samba-28e7d73bdcdf1a3d588e92eee982ff01db53d65d.zip
s3:winbindd: use struct unixid instead of uint64 in Sids2Xids parent<->child
This implicitly also hands the type of the resulting unix-id that the idmap backend has created back to the caller. This is important for backends that would set a broader type than the requested one, e.g. rid backend returning BOTH instead of UID or GID. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/winbindd/wb_sids2xids.c')
-rw-r--r--source3/winbindd/wb_sids2xids.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/winbindd/wb_sids2xids.c b/source3/winbindd/wb_sids2xids.c
index 7a198c18ce..cbd4444566 100644
--- a/source3/winbindd/wb_sids2xids.c
+++ b/source3/winbindd/wb_sids2xids.c
@@ -169,7 +169,8 @@ static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq)
t->type = lsa_SidType_to_id_type(n->sid_type);
t->domain_index = n->sid_index;
sid_peek_rid(&state->non_cached[i], &t->rid);
- t->unix_id = (uint64_t)-1;
+ t->xid.id = UINT32_MAX;
+ t->xid.type = t->type;
}
child = idmap_child();
@@ -246,8 +247,7 @@ NTSTATUS wb_sids2xids_recv(struct tevent_req *req,
if (state->cached[i].sid != NULL) {
xid = state->cached[i].xid;
} else {
- xid.id = state->ids.ids[num_non_cached].unix_id;
- xid.type = state->ids.ids[num_non_cached].type;
+ xid = state->ids.ids[num_non_cached].xid;
idmap_cache_set_sid2unixid(
&state->non_cached[num_non_cached],