summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 07:42:00 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:47 +0200
commit6d66018187624f4b0a0a21f34abb6e74053ce7d3 (patch)
tree50674b75b97f0c5de30a5d0540f8fdca08d45fd9 /source3
parent053e4510cd4a674e3c9809b0829f32e1bca183ea (diff)
downloadsamba-6d66018187624f4b0a0a21f34abb6e74053ce7d3.tar.gz
samba-6d66018187624f4b0a0a21f34abb6e74053ce7d3.tar.bz2
samba-6d66018187624f4b0a0a21f34abb6e74053ce7d3.zip
s3:idmap_tdb: use filter from idmap_domain rather than from idmap_tdb_context
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_tdb.c10
1 files changed, 4 insertions, 6 deletions
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;
}