r12064: pass back the socket level error correctly (so we get
authorAndrew Tridgell <tridge@samba.org>
Mon, 5 Dec 2005 06:05:02 +0000 (06:05 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:47:03 +0000 (13:47 -0500)
NT_STATUS_CONNECTION_REFUSED when a KDC is not listening)
(This used to be commit 0f85fc204c6018f8403c2e8f75f683aed38ba83b)

source4/auth/kerberos/krb5_init_context.c

index 40b27a6aeb65033518129d9254c780222bba3158..77f16b35cf6a14791fc051470841879a94362f98 100644 (file)
@@ -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;