[PATCH] some cleanups for smbldap.c
ab at samba.org
Wed Apr 19 14:54:09 UTC 2017
On ke, 19 huhti 2017, vl at samba.org wrote:
> On Wed, Apr 19, 2017 at 05:41:48PM +0300, Alexander Bokovoy wrote:
> > On ke, 19 huhti 2017, vl--- via samba-technical wrote:
> > > Hi!
> > >
> > > The main focus is to make "struct smbldap_state" private to smbldap.c
> > > for better encapsulation.
> > >
> > > Review appreciated!
> > Looks good to me. This will break ipasam in FreeIPA but I already
> > started moving it to own private struct as 'struct ldapsam_privates' is
> > not accessible anymore and I neeed anyway to implement some more of a
> > backend code that needs own proper private struct. Updating it to use
> > your wrappers is not a problem.
> Ok, thanks for the confirmation.
> > Please do not remove getter/setter for paged results, this is useful.
> I think this should be hidden behind an improved smbldap_search
> interface in the future.
Agreed. If we can move most of the code in
ldapsam_search_firstpage/nextpage/next_entry/end and ldap2displayentry
to a common utility in smbldap library, then pdb_ldap/ipasam will just
become users of that interface and would only need to pass an opaque
pointer to "struct smbldap_state".
That would effectively reduce a duplicated code.
/ Alexander Bokovoy
More information about the samba-technical