The branch, master has been updated
       via  2763cad dsdb-ridalloc: Fix RID pools - RID numbers increase too 
quickly
      from  2536ee8 Make the output of the crackname script more readable

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 2763cad409430c183f7f1f6f57bc6b38ae616ed9
Author: Andrew Bartlett <abart...@samba.org>
Date:   Sat Jun 22 19:30:50 2013 +1000

    dsdb-ridalloc: Fix RID pools - RID numbers increase too quickly
    
    A patch by Cove Schneider <cov...@yahoo.com> who reports:
    
    I noticed that the RID numbers seem to increase incrementally, then
    will suddenly jump by 124501. Unless I'm misunderstanding, shouldn't
    RID pool allocations just be 500 at a time?
    
    e.g.  Adding accounts one after another on a single test instance here's 
how they're incrementing (from 4.0.6):
    1596
    1597
    1598
    1599
    126100
    126101
    126102
    ...
    126599
    
    251100
    ...
    
    251599
    
    376100
    ...
    
    The problem is that this complicates using sssd's AD integration, as
    that it doesn't expect the RIDs to increase in a single domain so
    quickly.
    
    Signed-off-by: Andrew Bartlett <abart...@samba.org>
    Reviewed-by: Stefan Metzmacher <me...@samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <me...@samba.org>
    Autobuild-Date(master): Thu Jul  4 20:13:05 CEST 2013 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/ridalloc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/ridalloc.c 
b/source4/dsdb/samdb/ldb_modules/ridalloc.c
index 73ecb03..c0859d3 100644
--- a/source4/dsdb/samdb/ldb_modules/ridalloc.c
+++ b/source4/dsdb/samdb/ldb_modules/ridalloc.c
@@ -606,7 +606,8 @@ int ridalloc_allocate_rid(struct ldb_module *module, 
uint32_t *rid, struct ldb_r
        /*
         * if we are half-exhausted then try to get a new pool.
         */
-       if (nridset.next_rid > (prev_pool_hi + prev_pool_lo)/2) {
+       if (nridset.next_rid > (prev_pool_hi + prev_pool_lo)/2 &&
+           nridset.alloc_pool == nridset.prev_pool) {
                /*
                 * if we are the RID Manager,
                 * we can get a new pool localy.


-- 
Samba Shared Repository

Reply via email to