Our AD setup includes multiple sites. When Hudson retrieves the SRV record for
the entire domain, 5 domain controllers get returned, but only 3 of those (the
ones local to this site) are actually accessible. If Hudson ends up trying to
authenticate against one of the other two, the request will time out and
This can be fixed allowing a site name to be configured and changing the SRV
query to _ldap._tcp.<site>._sites.<domain> if a site name is specified.
The attached patch implements this for the Unix (LDAP) mode of the
active-directory plugin. The site can be configured by prefixing it to the
domain name(s), e.g. 'firstname.lastname@example.org' instead of 'mydomain.com'.