mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
autorid: add high_id to range config and fill it where we also fill range->low_id.
This corresponds to low_id for convenience and allows for computations without going back to the global config. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
a1adc881cf
commit
0df8988c08
@ -49,6 +49,7 @@ struct autorid_range_config {
|
||||
uint32_t rangenum;
|
||||
uint32_t domain_range_index;
|
||||
uint32_t low_id;
|
||||
uint32_t high_id;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -258,6 +258,7 @@ static NTSTATUS idmap_autorid_addrange_action(struct db_context *db,
|
||||
|
||||
range->low_id = globalcfg->minvalue
|
||||
+ range->rangenum * globalcfg->rangesize;
|
||||
range->high_id = range->low_id + globalcfg->rangesize - 1;
|
||||
|
||||
ret = NT_STATUS_OK;
|
||||
|
||||
@ -339,6 +340,7 @@ static NTSTATUS idmap_autorid_getrange_int(struct db_context *db,
|
||||
}
|
||||
range->low_id = globalcfg->minvalue
|
||||
+ range->rangenum * globalcfg->rangesize;
|
||||
range->high_id = range->low_id + globalcfg->rangesize - 1;
|
||||
|
||||
TALLOC_FREE(globalcfg);
|
||||
done:
|
||||
|
Loading…
Reference in New Issue
Block a user