Skip to content

Commit

Permalink
idmap: centrally check that unix IDs returned by the idmap backends a…
Browse files Browse the repository at this point in the history
…re in range

Note: in the long run, it might be good to move this kind of
exit check (before handing the result back to the client)
to the parent winbindd code.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12155

Signed-off-by: Michael Adam <[email protected]>
Reviewed-by: Volker Lendecke <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>

Autobuild-User(master): Michael Adam <[email protected]>
Autobuild-Date(master): Wed Aug 17 01:21:39 CEST 2016 on sn-devel-144
  • Loading branch information
obnoxxx committed Aug 16, 2016
1 parent c21976d commit b2bf613
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source3/winbindd/winbindd_dual_srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ NTSTATUS _wbint_Sids2UnixIDs(struct pipes_struct *p,
for (i=0; i<num_ids; i++) {
struct id_map *m = id_map_ptrs[i];

if (!idmap_unix_id_is_in_range(m->xid.id, dom)) {
m->status = ID_UNMAPPED;
}

if (m->status == ID_MAPPED) {
ids[i].xid = m->xid;
} else {
Expand Down

0 comments on commit b2bf613

Please sign in to comment.