autorid: reserve 500 IDs at the top of the ALLOC range.
authorMichael Adam <obnox@samba.org>
Mon, 7 Apr 2014 15:24:31 +0000 (17:24 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 25 Apr 2014 13:35:09 +0000 (15:35 +0200)
The wellknowns are now allocated into this sub-range.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/winbindd/idmap_autorid.c

index 869131f9362bf2a1f2854f45d289c7e2fd7a22de..6a8865690c2ec77400c99676b2366a421f5a9f4f 100644 (file)
@@ -82,6 +82,8 @@
 #undef DBGC_CLASS
 #define DBGC_CLASS DBGC_IDMAP
 
+#define IDMAP_AUTORID_ALLOC_RESERVED 500
+
 /* handle to the tdb storing domain <-> range assignments */
 static struct db_context *autorid_db;
 
@@ -680,7 +682,8 @@ static NTSTATUS idmap_autorid_initialize(struct idmap_domain *dom)
 
        /* fill the TDB common configuration */
 
-       commonconfig->max_id = config->rangesize -1;
+       commonconfig->max_id = config->rangesize - 1
+                            - IDMAP_AUTORID_ALLOC_RESERVED;
        commonconfig->hwmkey_uid = ALLOC_HWM_UID;
        commonconfig->hwmkey_gid = ALLOC_HWM_GID;
        commonconfig->rw_ops->get_new_id = idmap_autorid_allocate_id;