From 2125777803cf4b9f259391e34847aafa4ce7668c Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Mon, 26 Jan 2009 13:07:59 +0100 Subject: s3:idmap_tdb2: move together code that belongs together in idmap_tdb2_alloc_load Michael --- source3/winbindd/idmap_tdb2.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'source3/winbindd/idmap_tdb2.c') diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c index 60b92c77ad..5d9171e14a 100644 --- a/source3/winbindd/idmap_tdb2.c +++ b/source3/winbindd/idmap_tdb2.c @@ -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)) { -- cgit