s3:idmap_ad: use range from idmap_domain in idmap_ad_sids_to_unixids()
[metze/samba/wip.git] / source3 / winbindd / idmap_ad.c
index 6fdb051aee5004795544eb64cdc5135a5c7149f7..d9b394ddf57225c14f5b81818dea8c095bab337a 100644 (file)
@@ -649,11 +649,9 @@ again:
                        DEBUG(1, ("Could not get unix ID\n"));
                        continue;
                }
-               if ((id == 0) ||
-                   (ctx->filter_low_id && (id < ctx->filter_low_id)) ||
-                   (ctx->filter_high_id && (id > ctx->filter_high_id))) {
+               if (!idmap_unix_id_is_in_range(id, dom)) {
                        DEBUG(5, ("Requested id (%u) out of range (%u - %u). Filtered!\n",
-                               id, ctx->filter_low_id, ctx->filter_high_id));
+                               id, dom->low_id, dom->high_id));
                        continue;
                }