Deprecated but still supported "idmap backend" actually is
broken
Dmitry Butskoy
buc at odusz.so-cdu.ru
Mon Oct 15 15:50:42 GMT 2007
Simo Sorce wrote:
> >/ >> Maybe the change (from "default domain" to lp_workgroup()) should go to
> />/ >> the rid code? I.e. in "nsswitch/idmap_rid.c:idmap_rid_initialize()"
> />/ >> something like:
> />/ >>
> />/ >> if (strequal (dom->name, "default domain")) {
> />/ >> ctx->domain_name = talloc_strdup( ctx, lp_workgroup() );
> />/ >> } else {
> />/ >> ctx->domain_name = talloc_strdup( ctx, dom->name );
> />/ >> }
> />/ >>
> />/ >
> />/ > No I don't like this solution as it put too much knowledge in the
> />/ > modules.
> />/ >
> />/ >
> />/
> />/ I thought that it is actually required for rid backend only...
> /
> Actually it is, but this is a modular infrastructure, anyone can build
> their own module.
>
> I think the problem in this code is that we assume that dom_list[] can
> have special values, but that is not true anymore. The attached patch
> fixes this stuff by checking if in the list there is the special
> default_domain variable. If it is so it skips the comparison with
> lp_workgroup(), re-establishing the previous behavior.
> I have to say I don't like this too much, but it is a one liner and it
> is easier to make sure this emulates perfectly the previous behavior.
>
Well, it seems that now all works fine.
> IMO, it would be better to simply drop support for the previous syntax
> with this new major version, it would be justified given the version
> change and can greatly simplify the code, but I'll leave the decision to
> Jerry.
>
Please don't forget to add the proper solution for swat -- "idmap config
FOO" should be configurable under SWAT some way. IOW, drop the old
syntax just after the SWAT will support new syntax as well.
~buc
More information about the samba-technical
mailing list