diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-04-16 13:37:39 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-18 12:04:59 +1000 |
commit | 338e5a1d35574dbd96bbbcf2a74fe33adc95cb8c (patch) | |
tree | 4206afcc1354276ab3d99fce23754430a3b0264d /source3/smbd | |
parent | 235016bcf9c332f88d3aae68d0726d8bb2a64246 (diff) | |
download | samba-338e5a1d35574dbd96bbbcf2a74fe33adc95cb8c.tar.gz samba-338e5a1d35574dbd96bbbcf2a74fe33adc95cb8c.tar.bz2 samba-338e5a1d35574dbd96bbbcf2a74fe33adc95cb8c.zip |
s3-dbwrap: push lp_ctx up another layer in the stack
This will allow db_open_tdb() to be called from common code, which may
already have a loadparm context loaded.
It also slowly moves the lp_ctx up the stack, as required to remove
the library loop between smbconf and the registry.
Andrew Bartlett
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/notify_internal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c index 6e6bdf7b03..4d78743687 100644 --- a/source3/smbd/notify_internal.c +++ b/source3/smbd/notify_internal.c @@ -123,6 +123,7 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, struct messaging_context *msg, struct event_context *ev) { + struct loadparm_context *lp_ctx; struct notify_context *notify; notify = talloc(mem_ctx, struct notify_context); @@ -132,10 +133,12 @@ struct notify_context *notify_init(TALLOC_CTX *mem_ctx, notify->msg = msg; notify->list = NULL; + lp_ctx = loadparm_init_s3(notify, loadparm_s3_context()); notify->db_notify = db_open_tdb( - notify, lock_path("notify.tdb"), + notify, lp_ctx, lock_path("notify.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH, O_RDWR|O_CREAT, 0644, DBWRAP_LOCK_ORDER_2); + talloc_unlink(notify, lp_ctx); if (notify->db_notify == NULL) { goto fail; } |