that differs from the hostname the connect() uses.
In particular, this helps in running Kerberos tests in 'make test'.
Andrew Bartlett
(This used to be commit
78447333b0fc9450e18cd1d1c15df62acb5f0f36)
_PUBLIC_ const char *gensec_get_target_hostname(struct gensec_security *gensec_security)
{
+ /* We allow the target hostname to be overriden for testing purposes */
+ const char *target_hostname = lp_parm_string(-1, "gensec", "target_hostname");
+ if (target_hostname) {
+ return target_hostname;
+ }
+
if (gensec_security->target.hostname) {
return gensec_security->target.hostname;
}