[PR PATCH] [Updated] Fix samba_dlz when named "reloads".
github at samba.org
github at samba.org
Fri Feb 2 10:39:02 UTC 2018
There is an updated pull request by kristjanvalur against v4-7-stable on the Samba Samba Github repository
https://github.com/kristjanvalur/samba samba_dlz
https://github.com/samba-team/samba/pull/124
Fix samba_dlz when named "reloads".
Please see https://bugzilla.samba.org/show_bug.cgi?id=13214
Using a singleton instance makes samba_dlz break when named does a "reload". Remove the singleton management and allow named to initialize a new samba_dlz_state, and destroy the old on reload.
bind does a "reload" of a dlz module by:
1. Creating a new dlz instance state via dlz_create()
2. Initializing it with dlz_configure()
3. Deleting the old instance state via dlz_destroy().
Using a singleton instance would cause samba_dlz to fail after a reload. I don't know the precise reason, here are two possibles:
- dlz_configure() on an already running instance would break it somehow.
- Returning the **same** pointer from dlz_create() as the one already running may confuse the internal bookkeeping in **bind**. Notice how a new instance is created _before_ the old is destroyed.
Note: This effectively undoes https://github.com/samba-team/samba/commit/34eab45cba6989b66d37c7eb74d97846014ec4eb
The issues with "state->samdb" went away with talloc 2.0. state->samdb is already a talloc_reference() from the old 'state', and a talloc_free(state) will decrement the refcount.
A patch file from https://github.com/samba-team/samba/pull/124.patch is attached
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: github-pr-samba_dlz-124.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20180202/4560a03f/github-pr-samba_dlz-124.patch>
More information about the samba-technical
mailing list