summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-01-26 13:07:59 +0100
committerMichael Adam <obnox@samba.org>2009-02-06 10:20:08 +0100
commit2125777803cf4b9f259391e34847aafa4ce7668c (patch)
tree2e1c7d446f4a71a358a0e829ca8abe21afa54e8a /source3
parent30d08223e65d4b610dbfa59e2486a41c37b3b8b1 (diff)
downloadsamba-2125777803cf4b9f259391e34847aafa4ce7668c.tar.gz
samba-2125777803cf4b9f259391e34847aafa4ce7668c.tar.bz2
samba-2125777803cf4b9f259391e34847aafa4ce7668c.zip
s3:idmap_tdb2: move together code that belongs together in idmap_tdb2_alloc_load
Michael
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/idmap_tdb2.c15
1 files changed, 8 insertions, 7 deletions
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)) {