diff options
author | Michael Adam <obnox@samba.org> | 2013-08-30 13:20:15 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2013-10-01 11:23:14 +0000 |
commit | 105475c77e8a721476010a1cf9be8998cebd48bb (patch) | |
tree | 3eb32e5dc818e06af0e12c6611f087ea409a0697 /source3 | |
parent | a54e21bdc3624ab85bbe2a2112598c05feb2d56f (diff) | |
download | samba-105475c77e8a721476010a1cf9be8998cebd48bb.tar.gz samba-105475c77e8a721476010a1cf9be8998cebd48bb.tar.bz2 samba-105475c77e8a721476010a1cf9be8998cebd48bb.zip |
idmap_autorid: add a db_context argument to idmap_autorid_init_hwm()
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')
-rw-r--r-- | source3/winbindd/idmap_autorid.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source3/winbindd/idmap_autorid.c b/source3/winbindd/idmap_autorid.c index df2cba191f..62beb1d669 100644 --- a/source3/winbindd/idmap_autorid.c +++ b/source3/winbindd/idmap_autorid.c @@ -692,14 +692,14 @@ static NTSTATUS idmap_autorid_sids_to_unixids(struct idmap_domain *dom, } /* initialize the given HWM to 0 if it does not exist yet */ -static NTSTATUS idmap_autorid_init_hwm(const char *hwm) { - +static NTSTATUS idmap_autorid_init_hwm(struct db_context *db, const char *hwm) +{ NTSTATUS status; uint32_t hwmval; - status = dbwrap_fetch_uint32_bystring(autorid_db, hwm, &hwmval); + status = dbwrap_fetch_uint32_bystring(db, hwm, &hwmval); if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { - status = dbwrap_trans_store_int32_bystring(autorid_db, hwm, 0); + status = dbwrap_trans_store_int32_bystring(db, hwm, 0); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Unable to initialise HWM (%s) in autorid " @@ -740,13 +740,13 @@ static NTSTATUS idmap_autorid_db_init(void) /* Initialize high water mark for the currently used range to 0 */ - status = idmap_autorid_init_hwm(HWM); + status = idmap_autorid_init_hwm(autorid_db, HWM); NT_STATUS_NOT_OK_RETURN(status); - status = idmap_autorid_init_hwm(ALLOC_HWM_UID); + status = idmap_autorid_init_hwm(autorid_db, ALLOC_HWM_UID); NT_STATUS_NOT_OK_RETURN(status); - status = idmap_autorid_init_hwm(ALLOC_HWM_GID); + status = idmap_autorid_init_hwm(autorid_db, ALLOC_HWM_GID); return status; } |