s3:idmap_tdb2: move together code that belongs together in idmap_tdb2_alloc_load
authorMichael Adam <obnox@samba.org>
Mon, 26 Jan 2009 12:07:59 +0000 (13:07 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 6 Feb 2009 09:20:08 +0000 (10:20 +0100)
Michael

source3/winbindd/idmap_tdb2.c

index 60b92c77ad204f2d466eaad718d89badf16d98cd..5d9171e14af06e6fd75952ef104e940547877544 100644 (file)
@@ -111,7 +111,6 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
 
        /* load ranges */
 
-       /* Create high water marks for group and user id */
        if (!lp_idmap_uid(&low_uid, &high_uid)
            || !lp_idmap_gid(&low_gid, &high_gid)) {
                DEBUG(1, ("idmap uid or idmap gid missing\n"));
@@ -129,6 +128,14 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
                return NT_STATUS_UNSUCCESSFUL;
        }
 
+       if (idmap_tdb2_state.high_gid <= idmap_tdb2_state.low_gid) {
+               DEBUG(1, ("idmap gid range missing or invalid\n"));
+               DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
+               return NT_STATUS_UNSUCCESSFUL;
+       }
+
+       /* Create high water marks for group and user id */
+
        if (((low_id = dbwrap_fetch_int32(idmap_tdb2,
                                          HWM_USER)) == -1) ||
            (low_id < idmap_tdb2_state.low_uid)) {
@@ -141,12 +148,6 @@ static NTSTATUS idmap_tdb2_alloc_load(void)
                }
        }
 
-       if (idmap_tdb2_state.high_gid <= idmap_tdb2_state.low_gid) {
-               DEBUG(1, ("idmap gid range missing or invalid\n"));
-               DEBUGADD(1, ("idmap will be unable to map foreign SIDs\n"));
-               return NT_STATUS_UNSUCCESSFUL;
-       }
-
        if (((low_id = dbwrap_fetch_int32(idmap_tdb2,
                                          HWM_GROUP)) == -1) ||
            (low_id < idmap_tdb2_state.low_gid)) {