From 6d66018187624f4b0a0a21f34abb6e74053ce7d3 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Thu, 17 Jun 2010 07:42:00 +0200 Subject: s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context --- source3/winbindd/idmap_tdb.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source3') diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 7f36c636ab..5f769206f5 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -650,10 +650,9 @@ static NTSTATUS idmap_tdb_id_to_sid(struct idmap_domain *dom, struct id_map *map ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context); /* apply filters before checking */ - if ((ctx->filter_low_id && (map->xid.id < ctx->filter_low_id)) || - (ctx->filter_high_id && (map->xid.id > ctx->filter_high_id))) { + if (!idmap_unix_id_is_in_range(map->xid.id, dom)) { DEBUG(5, ("Requested id (%u) out of range (%u - %u). Filtered!\n", - map->xid.id, ctx->filter_low_id, ctx->filter_high_id)); + map->xid.id, dom->low_id, dom->high_id)); return NT_STATUS_NONE_MAPPED; } @@ -760,10 +759,9 @@ static NTSTATUS idmap_tdb_sid_to_id(struct idmap_domain *dom, struct id_map *map } /* apply filters before returning result */ - if ((ctx->filter_low_id && (map->xid.id < ctx->filter_low_id)) || - (ctx->filter_high_id && (map->xid.id > ctx->filter_high_id))) { + if (!idmap_unix_id_is_in_range(map->xid.id, dom)) { DEBUG(5, ("Requested id (%u) out of range (%u - %u). Filtered!\n", - map->xid.id, ctx->filter_low_id, ctx->filter_high_id)); + map->xid.id, dom->low_id, dom->high_id)); ret = NT_STATUS_NONE_MAPPED; } -- cgit