Sorry idra for messing around with your stuff, but this was obviously not
authorVolker Lendecke <vlendec@samba.org>
Wed, 11 Jun 2003 20:06:11 +0000 (20:06 +0000)
committerVolker Lendecke <vlendec@samba.org>
Wed, 11 Jun 2003 20:06:11 +0000 (20:06 +0000)
tested.

Incrementing HWW_USER while allocating a GROUPID looked somewhat wrong.

Volker
(This used to be commit d1eac2c75856f8f1dec8d429feb24a5f05fa6ca8)

source3/sam/idmap_tdb.c

index 209f9066e04563682b96951bee1f7b03f4fb3eb2..01d198e8d5267d7d4eda8c3a0ce165ae0e0f6bfb 100644 (file)
@@ -94,7 +94,7 @@ static NTSTATUS db_allocate_id(unid_t *id, int id_type)
                        }
 
                        /* fetch a new id and increment it */
-                       ret = tdb_change_uint32_atomic(idmap_tdb, HWM_USER, &hwm, 1);
+                       ret = tdb_change_uint32_atomic(idmap_tdb, HWM_GROUP, &hwm, 1);
 
                        if (!ret) {
                                DEBUG(0, ("idmap_tdb: Fatal error while fetching a new id\n!"));
@@ -102,8 +102,8 @@ static NTSTATUS db_allocate_id(unid_t *id, int id_type)
                        }
 
                        /* recheck it is in the range */
-                       if (hwm > idmap_state.uid_high) {
-                               DEBUG(0, ("idmap Fatal Error: UID range full!! (max: %u)\n", idmap_state.uid_high));
+                       if (hwm > idmap_state.gid_high) {
+                               DEBUG(0, ("idmap Fatal Error: GID range full!! (max: %u)\n", idmap_state.gid_high));
                                return NT_STATUS_UNSUCCESSFUL;
                        }