krb5_wrap: Remove unused handle_krberror_packet()
authorAndreas Schneider <asn@samba.org>
Mon, 29 Aug 2016 07:11:17 +0000 (09:11 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 31 Aug 2016 18:59:14 +0000 (20:59 +0200)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/krb5_wrap/krb5_samba.c
lib/krb5_wrap/krb5_samba.h

index 8e1c7d0..1aaf33a 100644 (file)
@@ -896,59 +896,6 @@ krb5_error_code smb_krb5_gen_netbios_krb5_address(smb_krb5_addresses **kerb_addr
        return ret;
 }
 
- krb5_error_code handle_krberror_packet(krb5_context context,
-                                       krb5_data *packet)
-{
-       krb5_error_code ret;
-       bool got_error_code = false;
-
-       DEBUG(10,("handle_krberror_packet: got error packet\n"));
-
-#ifdef HAVE_E_DATA_POINTER_IN_KRB5_ERROR /* Heimdal */
-       {
-               krb5_error krberror;
-
-               if ((ret = krb5_rd_error(context, packet, &krberror))) {
-                       DEBUG(10,("handle_krberror_packet: krb5_rd_error failed with: %s\n",
-                               error_message(ret)));
-                       return ret;
-               }
-
-               if (krberror.e_data == NULL || krberror.e_data->data == NULL) {
-                       ret = (krb5_error_code) krberror.error_code;
-                       got_error_code = true;
-               }
-
-               krb5_free_error(context, &krberror);
-       }
-#else /* MIT */
-       {
-               krb5_error *krberror;
-
-               if ((ret = krb5_rd_error(context, packet, &krberror))) {
-                       DEBUG(10,("handle_krberror_packet: krb5_rd_error failed with: %s\n",
-                               error_message(ret)));
-                       return ret;
-               }
-
-               if (krberror->e_data.data == NULL) {
-#if defined(ERROR_TABLE_BASE_krb5)
-                       ret = ERROR_TABLE_BASE_krb5 + (krb5_error_code) krberror->error;
-#else
-                       ret = (krb5_error_code)krberror->error;
-#endif
-                       got_error_code = true;
-               }
-               krb5_free_error(context, krberror);
-       }
-#endif
-       if (got_error_code) {
-               DEBUG(5,("handle_krberror_packet: got KERBERR from kpasswd: %s (%d)\n",
-                       error_message(ret), ret));
-       }
-       return ret;
-}
-
 krb5_error_code smb_krb5_get_init_creds_opt_alloc(krb5_context context,
                                            krb5_get_init_creds_opt **opt)
 {
index 687a9f1..68a3c1d 100644 (file)
@@ -197,9 +197,6 @@ krb5_error_code smb_krb5_free_addresses(krb5_context context, smb_krb5_addresses
 NTSTATUS krb5_to_nt_status(krb5_error_code kerberos_error);
 krb5_error_code nt_status_to_krb5(NTSTATUS nt_status);
 
-krb5_error_code handle_krberror_packet(krb5_context context,
-                                         krb5_data *packet);
-
 void smb_krb5_get_init_creds_opt_free(krb5_context context,
                                    krb5_get_init_creds_opt *opt);
 krb5_error_code smb_krb5_get_init_creds_opt_alloc(krb5_context context,