[IPA] SID allocation using DNA plugin
Endi Sukma Dewata
edewata at redhat.com
Fri Nov 6 12:27:07 MST 2009
Andrew,
----- "Andrew Bartlett" <abartlet at samba.org> wrote:
> > I think ideally this problem should be addressed using polymorphism
> > instead of function pointer. So we need to create 2 subclasses of
> > the ProvisionBackend called OpenLDAPBackend and FDSBackend. The
> > base class should include an empty post_setup() and this should be
> > overriden in the FDSBackend. In the main code the code should
> > instantiate the class as follows:
> >
> > if backend_type == "fedora-ds":
> > provision_backend = FDSBackend(...)
> >
> > if backend_type == "openldap":
> > provision_backend = OpenLDAPBackend(...)
> >
> > provision_backend.post_setup()
> >
> > We could also do this on other parts of the code to cleanly separate
> > FDS and OpenLDAP code. What do you think?
>
> Yes, this is the approach I was trying to head towards. Just make sure
> we don't run the LDB specific functions when we are trying to use
> OpenLDAP or Fedora DS.
Please take a look at the attached patches. These patches and the previous
patch about the relax control are available in this repository:
http://github.com/endisd/samba/commits/development/
The ProvisionBackend now has become a base class for LDBBackend,
ExistingBackend, FDSBackend, and OpenLDAPBackend. All backend-specific
attributes have been moved into the appropriate classes. Am I in the
right direction?
Thanks.
--
Endi S. Dewata
More information about the samba-technical
mailing list