summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-12-05 06:05:02 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:03 -0500
commit16c7e92cd2476d77069964e64d98d2034b88ea7e (patch)
treee9766514ba42914c0a5f97b4952ce7a3c44e1449 /source4
parent469aad2c48fe5af7c51f6e5c8e4284fcb601519a (diff)
downloadsamba-16c7e92cd2476d77069964e64d98d2034b88ea7e.tar.gz
samba-16c7e92cd2476d77069964e64d98d2034b88ea7e.tar.bz2
samba-16c7e92cd2476d77069964e64d98d2034b88ea7e.zip
r12064: pass back the socket level error correctly (so we get
NT_STATUS_CONNECTION_REFUSED when a KDC is not listening) (This used to be commit 0f85fc204c6018f8403c2e8f75f683aed38ba83b)
Diffstat (limited to 'source4')
-rw-r--r--source4/auth/kerberos/krb5_init_context.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c
index 40b27a6aeb..77f16b35cf 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -94,14 +94,9 @@ static void smb_krb5_socket_recv(struct smb_krb5_socket *smb_krb5)
talloc_free(tmp_ctx);
return;
}
- if (dsize == 0) {
- smb_krb5->status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
- talloc_free(tmp_ctx);
- return;
- }
-
+
blob = data_blob_talloc(tmp_ctx, NULL, dsize);
- if (blob.data == NULL) {
+ if (blob.data == NULL && dsize != 0) {
smb_krb5->status = NT_STATUS_NO_MEMORY;
talloc_free(tmp_ctx);
return;