1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +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:
Andreas Schneider 2023-02-27 10:01:16 +01:00 committed by Günther Deschner
parent bf9130d375
commit a273ed89db

View File

@ -192,6 +192,17 @@ static bool do_idmap_check(void)
uint32_t maxranges =
(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) {
fprintf(stderr,
"ERROR: The idmap autorid range "