mirror of
https://github.com/samba-team/samba.git
synced 2025-11-11 00:23:51 +03:00
r16083: Make it possible to initialise a backend module, without it setting up
the whole ldb structure. Because the sequence number was a fn pointer on the main ldb context, turn it into a full request (currently sync). Andrew Bartlett
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
954785db03
commit
fbe7d0ca90
@@ -771,9 +771,10 @@ static int lldb_destructor(struct lldb_private *lldb)
|
||||
connect to the database
|
||||
*/
|
||||
static int lldb_connect(struct ldb_context *ldb,
|
||||
const char *url,
|
||||
unsigned int flags,
|
||||
const char *options[])
|
||||
const char *url,
|
||||
unsigned int flags,
|
||||
const char *options[],
|
||||
struct ldb_module **module)
|
||||
{
|
||||
struct lldb_private *lldb = NULL;
|
||||
int version = 3;
|
||||
@@ -803,15 +804,16 @@ static int lldb_connect(struct ldb_context *ldb,
|
||||
goto failed;
|
||||
}
|
||||
|
||||
ldb->modules = talloc(ldb, struct ldb_module);
|
||||
if (!ldb->modules) {
|
||||
*module = talloc(ldb, struct ldb_module);
|
||||
if (!module) {
|
||||
ldb_oom(ldb);
|
||||
goto failed;
|
||||
talloc_free(lldb);
|
||||
return -1;
|
||||
}
|
||||
ldb->modules->ldb = ldb;
|
||||
ldb->modules->prev = ldb->modules->next = NULL;
|
||||
ldb->modules->private_data = lldb;
|
||||
ldb->modules->ops = &lldb_ops;
|
||||
(*module)->ldb = ldb;
|
||||
(*module)->prev = ldb->modules->next = NULL;
|
||||
(*module)->private_data = lldb;
|
||||
(*module)->ops = &lldb_ops;
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user