idmap problem

simo idra at
Wed Feb 21 18:53:24 GMT 2007

On Wed, 2007-02-21 at 09:45 -0800, Herb Lewis wrote:
> There is a problem if you specify idmap domains = DOMA, DOMB
> but do not have a idmap config DOMx: default = yes
> in idmap.c we try to sort the idmap_domains array so the
> default domain is last. If no default was specified then
> def_dom_num is set to -1 and we swap memory from outside
> the array with the assignment (actually just pointers but
> you get the drift):
> temp = idmap_domains[def_dom_num]
> Should we change the initial
> static int def_dom_num = -1;
> to initialize to 0 or should we indicate a misconfiguration
> in this case?

Good question.
To make it easy for user we may just assume that if no domain is
explicitly marked as default, then the first in the list is the default
one, or we may check which domain we are joined to and mark that ss the

Jerry, what do you think?


Simo Sorce
Samba Team GPL Compliance Officer
email: idra at

More information about the samba-technical mailing list