summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-03-25 11:30:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:59:12 -0500
commit26137648ab133c6f6ead953aac33e0e3908dabf4 (patch)
tree56f4e2d1e872301d3e7d334319619727e9bad9e2
parent4958e97c767f62d8b1f41b7c33f78a00be78d849 (diff)
downloadsamba-26137648ab133c6f6ead953aac33e0e3908dabf4.tar.gz
samba-26137648ab133c6f6ead953aac33e0e3908dabf4.tar.bz2
samba-26137648ab133c6f6ead953aac33e0e3908dabf4.zip
r14713: For testing, it is sometimes useful to specify a hostname for kerberos
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)
-rw-r--r--source4/auth/gensec/gensec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/auth/gensec/gensec.c b/source4/auth/gensec/gensec.c
index 8dbf9fe2db..c334e54473 100644
--- a/source4/auth/gensec/gensec.c
+++ b/source4/auth/gensec/gensec.c
@@ -978,6 +978,12 @@ _PUBLIC_ NTSTATUS gensec_set_target_hostname(struct gensec_security *gensec_secu
_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;
}