On Mon, 2012-01-16 at 16:52 +0100, Sumit Bose wrote:
Hi,
while working on sub-domains I started wondering why we do not keep the
sysdb handle in the sss_domain_info struct? This would make some thing
easier for sub-domains and would safe some cycles for standard domain,
because we do not need the string comparison in
sysdb_get_ctx_from_list().
I did some tests with the attached patch and didn't found any issues. If
you do not have any concerns and think this is a good idea I can provide
a more complete patch.
I am a bit concerned about setting it in sysdb_domain_init_initernal()
as that function is used also for temporary inits of sysdb contextx, so
you risk letting behind dangling pointers in the sss_domain_info struct.
If you do that I guess, you need at least a destructor on the sysdb
context to clean up sysdb->domain->sysdb
Simo.
--
Simo Sorce * Red Hat, Inc * New York