]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Improve warning message if we are out of autorid ranges
authorAndreas Schneider <asn@samba.org>
Mon, 27 Feb 2023 11:14:41 +0000 (12:14 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 28 Feb 2023 14:18:32 +0000 (14:18 +0000)
The message should help our users to understand what's the problem. The
message was rather cryptic before.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Feb 28 14:18:32 UTC 2023 on atb-devel-224

source3/winbindd/idmap_autorid_tdb.c

index 24cf380945d6db774815e3439122e99882ce6da2..fb195367da6bc2e06a6af54988c9cec2e23221a0 100644 (file)
@@ -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;
        }