Releases, locking and ldb

Andrew Bartlett abartlet at samba.org
Mon Jun 26 23:10:39 UTC 2017


On Mon, 2017-06-26 at 18:11 +0200, Stefan Metzmacher via samba-
technical wrote:
> 
> Would sssd break with these changes?

In the interests of moving this along, I have checked some basic facts,
which I hope the sssd maintainers can confirm.

sssd never calls ldb_init() with an event context, except in
confdb_init() where it provides a private context that is not used
anywhere else.  

A parent request is always supplied in the memberof module, so the
event context chaining required by the private handle code should keep
working, if used against a tdb backend. 

ldb_request() is only called from syssdb_ops.c and sysdb_search.c and
in both cases the default callback is used.  Therefore no writes occur
during reads.  In both cases the request is destroyed with
talloc_free() before the end of the function, so locks can't still be
held on that request waiting for a ldb_request() that won't happen. 

I think that makes it pretty safe.

Thanks,

Andrew Bartlett

-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba







More information about the samba-technical mailing list