summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-02-27 10:01:16 +0100
committerGünther Deschner <gd@samba.org>2023-02-28 13:24:33 +0000
commita273ed89dbb42081925f95b6d5490018c7cad110 (patch)
tree5fadd0652de5da8d6dc72b0d02f99b7e23502a1c
parentbf9130d375b6c401bb79fc1a0911975814759e3b (diff)
downloadsamba-a273ed89dbb42081925f95b6d5490018c7cad110.tar.gz
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>
-rw-r--r--source3/utils/testparm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index b975188094c..ce624c9d0cd 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -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 "