mirror of
https://github.com/samba-team/samba.git
synced 2025-09-21 21:44:21 +03:00
s3:utils: Check if the autorid rangesize is a multiple of the range
We also have this in our documentation. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
committed by
Günther Deschner
parent
bf9130d375
commit
a273ed89db
@@ -192,6 +192,17 @@ static bool do_idmap_check(void)
|
|||||||
uint32_t maxranges =
|
uint32_t maxranges =
|
||||||
(c->high - c->low + 1) / rangesize;
|
(c->high - c->low + 1) / rangesize;
|
||||||
|
|
||||||
|
if (((c->high - c->low + 1) % rangesize) != 0) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"WARNING: The idmap autorid range "
|
||||||
|
"[%u-%u] SHOULD to be a multiple of "
|
||||||
|
"the rangesize [%u]!"
|
||||||
|
"\n\n",
|
||||||
|
c->low,
|
||||||
|
c->high,
|
||||||
|
rangesize);
|
||||||
|
}
|
||||||
|
|
||||||
if (maxranges < 2) {
|
if (maxranges < 2) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"ERROR: The idmap autorid range "
|
"ERROR: The idmap autorid range "
|
||||||
|
Reference in New Issue
Block a user