diff options
author | Michael Adam <obnox@samba.org> | 2010-06-16 17:24:40 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2010-08-14 02:10:44 +0200 |
commit | fd81228ed8691e3c8fc61e0be6f516b219c0e39f (patch) | |
tree | ff21a42fb2f94c8507ba73f94340823ff7c19ef8 /source3 | |
parent | bd4cc44c7d99dd2aeabed73ef0659909b78c6830 (diff) | |
download | samba-fd81228ed8691e3c8fc61e0be6f516b219c0e39f.tar.gz samba-fd81228ed8691e3c8fc61e0be6f516b219c0e39f.tar.bz2 samba-fd81228ed8691e3c8fc61e0be6f516b219c0e39f.zip |
s3:idmap_tdb2: give idmap_tdb2_alloc_load() and idmap domain arguemnt
and use the ranges from the idmap domain for checking the HWM values
Diffstat (limited to 'source3')
-rw-r--r-- | source3/winbindd/idmap_tdb2.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c index 980992773c..dba5690bfb 100644 --- a/source3/winbindd/idmap_tdb2.c +++ b/source3/winbindd/idmap_tdb2.c @@ -57,7 +57,7 @@ static NTSTATUS idmap_tdb2_new_mapping(struct idmap_domain *dom, /* handle to the permanent tdb */ static struct db_context *idmap_tdb2; -static NTSTATUS idmap_tdb2_alloc_load(void); +static NTSTATUS idmap_tdb2_alloc_load(struct idmap_domain *dom); static NTSTATUS idmap_tdb2_load_ranges(void) { @@ -127,14 +127,14 @@ static NTSTATUS idmap_tdb2_open_db(struct idmap_domain *dom) } /* load the ranges and high/low water marks */ - return idmap_tdb2_alloc_load(); + return idmap_tdb2_alloc_load(dom); } /* load the idmap allocation ranges and high/low water marks */ -static NTSTATUS idmap_tdb2_alloc_load(void) +static NTSTATUS idmap_tdb2_alloc_load(struct idmap_domain *dom) { NTSTATUS status; uint32 low_id; @@ -149,10 +149,10 @@ static NTSTATUS idmap_tdb2_alloc_load(void) /* Create high water marks for group and user id */ low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_USER); - if ((low_id == -1) || (low_id < idmap_tdb2_state.low_uid)) { + if ((low_id == -1) || (low_id < dom->low_id)) { if (!NT_STATUS_IS_OK(dbwrap_trans_store_int32( idmap_tdb2, HWM_USER, - idmap_tdb2_state.low_uid))) { + dom->low_id))) { DEBUG(0, ("Unable to initialise user hwm in idmap " "database\n")); return NT_STATUS_INTERNAL_DB_ERROR; @@ -160,10 +160,10 @@ static NTSTATUS idmap_tdb2_alloc_load(void) } low_id = dbwrap_fetch_int32(idmap_tdb2, HWM_GROUP); - if ((low_id == -1) || (low_id < idmap_tdb2_state.low_gid)) { + if ((low_id == -1) || (low_id < dom->low_id)) { if (!NT_STATUS_IS_OK(dbwrap_trans_store_int32( idmap_tdb2, HWM_GROUP, - idmap_tdb2_state.low_gid))) { + dom->low_id))) { DEBUG(0, ("Unable to initialise group hwm in idmap " "database\n")); return NT_STATUS_INTERNAL_DB_ERROR; |