summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-08-28 13:53:22 +0200
committerVolker Lendecke <vl@samba.org>2013-10-01 11:20:54 +0000
commitfdf8d93ac51d57a91fe51de9bfddf363e1cfab81 (patch)
treecd35f8b7ba033e9798545c22b14f38c2c5b9830a /source3/winbindd
parent6bf9a774718917c3429fa1492f5b0268ae5e01c3 (diff)
downloadsamba-fdf8d93ac51d57a91fe51de9bfddf363e1cfab81.tar.gz
samba-fdf8d93ac51d57a91fe51de9bfddf363e1cfab81.tar.bz2
samba-fdf8d93ac51d57a91fe51de9bfddf363e1cfab81.zip
idmap_autorid: add a db_context argument to idmap_autorid_get_domainrange()
Pair-Programmed-with: Atul Kulkarni <atul.kulkarni@in.ibm.com> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Atul Kulkarni <atul.kulkarni@in.ibm.com> Reviewed-by: Volker Lendecke <vl@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_autorid.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c
index 16f609d685..2b81202767 100644
--- a/source3/winbindd/idmap_autorid.c
+++ b/source3/winbindd/idmap_autorid.c
@@ -194,7 +194,8 @@ error:
}
-static NTSTATUS idmap_autorid_get_domainrange(struct autorid_range_config *range,
+static NTSTATUS idmap_autorid_get_domainrange(struct db_context *db,
+ struct autorid_range_config *range,
bool read_only)
{
NTSTATUS ret;
@@ -211,14 +212,14 @@ static NTSTATUS idmap_autorid_get_domainrange(struct autorid_range_config *range
fstrcpy(range->keystr, range->domsid);
}
- ret = dbwrap_fetch_uint32_bystring(autorid_db, range->keystr,
+ ret = dbwrap_fetch_uint32_bystring(db, range->keystr,
&(range->rangenum));
if (!NT_STATUS_IS_OK(ret)) {
if (read_only) {
return NT_STATUS_NOT_FOUND;
}
- ret = dbwrap_trans_do(autorid_db,
+ ret = dbwrap_trans_do(db,
idmap_autorid_get_domainrange_action, range);
}
@@ -261,7 +262,7 @@ static NTSTATUS idmap_autorid_allocate_id(struct idmap_domain *dom,
range.globalcfg = globalcfg;
fstrcpy(range.domsid, ALLOC_RANGE);
- ret = idmap_autorid_get_domainrange(&range, dom->read_only);
+ ret = idmap_autorid_get_domainrange(autorid_db, &range, dom->read_only);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(3, ("Could not determine range for allocation pool, "
@@ -644,7 +645,8 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom,
/* Calculate domain_range_index for multi-range support */
range.domain_range_index = rid / (global->rangesize);
- ret = idmap_autorid_get_domainrange(&range, dom->read_only);
+ ret = idmap_autorid_get_domainrange(autorid_db, &range,
+ dom->read_only);
/* read-only mode and a new domain range would be required? */
if (NT_STATUS_EQUAL(ret, NT_STATUS_NOT_FOUND) &&