From: Andreas Schneider Date: Mon, 27 Feb 2023 11:14:41 +0000 (+0100) Subject: s3:winbind: Improve warning message if we are out of autorid ranges X-Git-Tag: talloc-2.4.1~1568 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=460fd441d7f2ed5372038beec68c9bcd928a4f4c;p=thirdparty%2Fsamba.git s3:winbind: Improve warning message if we are out of autorid ranges The message should help our users to understand what's the problem. The message was rather cryptic before. Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner Autobuild-User(master): Günther Deschner Autobuild-Date(master): Tue Feb 28 14:18:32 UTC 2023 on atb-devel-224 --- diff --git a/source3/winbindd/idmap_autorid_tdb.c b/source3/winbindd/idmap_autorid_tdb.c index 24cf380945d..fb195367da6 100644 --- a/source3/winbindd/idmap_autorid_tdb.c +++ b/source3/winbindd/idmap_autorid_tdb.c @@ -183,10 +183,14 @@ static NTSTATUS idmap_autorid_addrange_action(struct db_context *db, } if (requested_rangenum >= globalcfg.maxranges) { - DEBUG(1, ("Not enough ranges available: New range %u must be " - "smaller than configured maximum number of ranges " - "(%u).\n", - requested_rangenum, globalcfg.maxranges)); + DBG_WARNING("Not enough ranges available: New range %u can't " + "be allocated. Consider increasing the range " + "[%u-%u] by %u.\n", + requested_rangenum, + globalcfg.minvalue, + globalcfg.minvalue + + (globalcfg.maxranges * globalcfg.rangesize), + globalcfg.rangesize); ret = NT_STATUS_NO_MEMORY; goto error; }