summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-10-14 06:06:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:50 -0500
commit8dfa59372ff8a9348d1ffc5a8a840f82f05a49d1 (patch)
tree1f539fdd47170831f1f1ec50c61725fef5fd4b3c /source4
parent2b14137167c44ee01158f124713ab369012900db (diff)
downloadsamba-8dfa59372ff8a9348d1ffc5a8a840f82f05a49d1.tar.gz
samba-8dfa59372ff8a9348d1ffc5a8a840f82f05a49d1.tar.bz2
samba-8dfa59372ff8a9348d1ffc5a8a840f82f05a49d1.zip
r10985: To aid in testing, this allows us to easily force kerberos to use UDP or TCP.
Andrew Bartlett (This used to be commit ae0b4028ff7033dab70687376c2090baa692cf58)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/kerberos/krb5_init_context.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index 673dbe62f7..c8c90869ef 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -187,7 +187,7 @@ static void smb_krb5_request_timeout(struct event_context *event_ctx,
void *private)
{
struct smb_krb5_socket *smb_krb5 = talloc_get_type(private, struct smb_krb5_socket);
- DEBUG(2,("Timed out smb_krb5 packet\n"));
+ DEBUG(5,("Timed out smb_krb5 packet\n"));
smb_krb5->timeout = True;
}
@@ -273,11 +273,15 @@ static krb5_error_code smb_krb5_send_and_recv_func(krb5_context context,
status = NT_STATUS_INVALID_PARAMETER;
switch (hi->proto) {
case KRB5_KRBHST_UDP:
- status = socket_create(name, SOCKET_TYPE_DGRAM, &smb_krb5->sock, 0);
- break;
+ if (lp_parm_bool(-1, "krb5", "udp", True)) {
+ status = socket_create(name, SOCKET_TYPE_DGRAM, &smb_krb5->sock, 0);
+ break;
+ }
case KRB5_KRBHST_TCP:
- status = socket_create(name, SOCKET_TYPE_STREAM, &smb_krb5->sock, 0);
- break;
+ if (lp_parm_bool(-1, "krb5", "tcp", True)) {
+ status = socket_create(name, SOCKET_TYPE_STREAM, &smb_krb5->sock, 0);
+ break;
+ }
case KRB5_KRBHST_HTTP:
talloc_free(smb_krb5);
return EINVAL;