summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/krb5/keytab/file/ktf_add.c1
-rw-r--r--src/lib/krb5/keytab/file/ktf_close.c4
-rw-r--r--src/lib/krb5/keytab/file/ktf_get_en.c1
-rw-r--r--src/lib/krb5/keytab/file/ktf_next.c1
-rw-r--r--src/lib/krb5/keytab/file/ktf_remove.c2
-rw-r--r--src/lib/krb5/keytab/file/ktf_resolv.c1
-rw-r--r--src/lib/krb5/keytab/file/ktf_ssget.c1
-rw-r--r--src/lib/krb5/keytab/file/ktf_util.c3
-rw-r--r--src/lib/krb5/keytab/file/ktf_wreslv.c1
-rw-r--r--src/lib/krb5/keytab/ktadd.c1
-rw-r--r--src/lib/krb5/keytab/ktdefault.c1
-rw-r--r--src/lib/krb5/keytab/ktremove.c1
-rw-r--r--src/lib/krb5/keytab/read_servi.c6
-rw-r--r--src/lib/krb5/krb/copy_addrs.c1
-rw-r--r--src/lib/krb5/krb/copy_auth.c1
-rw-r--r--src/lib/krb5/krb/copy_creds.c4
-rw-r--r--src/lib/krb5/krb/copy_data.c1
-rw-r--r--src/lib/krb5/krb/copy_key.c2
-rw-r--r--src/lib/krb5/krb/copy_princ.c1
-rw-r--r--src/lib/krb5/krb/copy_tick.c1
-rw-r--r--src/lib/krb5/krb/decode_kdc.c4
-rw-r--r--src/lib/krb5/krb/decrypt_tk.c3
-rw-r--r--src/lib/krb5/krb/encode_kdc.c3
-rw-r--r--src/lib/krb5/krb/encrypt_tk.c3
-rw-r--r--src/lib/krb5/krb/gc_frm_kdc.c3
-rw-r--r--src/lib/krb5/krb/gc_via_tgt.c2
-rw-r--r--src/lib/krb5/krb/get_creds.c1
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c4
-rw-r--r--src/lib/krb5/krb/in_tkt_pwd.c3
-rw-r--r--src/lib/krb5/krb/in_tkt_sky.c2
-rw-r--r--src/lib/krb5/krb/kdc_rep_dc.c2
-rw-r--r--src/lib/krb5/krb/mk_priv.c5
-rw-r--r--src/lib/krb5/krb/mk_req_ext.c3
-rw-r--r--src/lib/krb5/krb/mk_safe.c3
-rw-r--r--src/lib/krb5/krb/parse.c3
-rw-r--r--src/lib/krb5/krb/rd_error.c1
-rw-r--r--src/lib/krb5/krb/rd_priv.c4
-rw-r--r--src/lib/krb5/krb/rd_req.c2
-rw-r--r--src/lib/krb5/krb/rd_req_dec.c4
-rw-r--r--src/lib/krb5/krb/rd_req_sim.c4
-rw-r--r--src/lib/krb5/krb/rd_safe.c4
-rw-r--r--src/lib/krb5/krb/send_tgs.c3
-rw-r--r--src/lib/krb5/krb/tgtname.c1
-rw-r--r--src/lib/krb5/krb/unparse.c3
-rw-r--r--src/lib/krb5/krb/walk_rtree.c2
45 files changed, 3 insertions, 104 deletions
diff --git a/src/lib/krb5/keytab/file/ktf_add.c b/src/lib/krb5/keytab/file/ktf_add.c
index 45651b9f6..942bce200 100644
--- a/src/lib/krb5/keytab/file/ktf_add.c
+++ b/src/lib/krb5/keytab/file/ktf_add.c
@@ -17,7 +17,6 @@ static char rcsid_ktf_add_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_close.c b/src/lib/krb5/keytab/file/ktf_close.c
index abcf8493f..1642a3c86 100644
--- a/src/lib/krb5/keytab/file/ktf_close.c
+++ b/src/lib/krb5/keytab/file/ktf_close.c
@@ -18,9 +18,7 @@ static char rcsid_krb5_ktfile_close_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-
-#include <stdio.h>
-#include <stdlib.h>
+#include <krb5/ext-proto.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_get_en.c b/src/lib/krb5/keytab/file/ktf_get_en.c
index dad940c30..280700824 100644
--- a/src/lib/krb5/keytab/file/ktf_get_en.c
+++ b/src/lib/krb5/keytab/file/ktf_get_en.c
@@ -19,7 +19,6 @@ static char rcsid_krb5_ktfile_get_entry_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_next.c b/src/lib/krb5/keytab/file/ktf_next.c
index 71f30e08d..9ec84876a 100644
--- a/src/lib/krb5/keytab/file/ktf_next.c
+++ b/src/lib/krb5/keytab/file/ktf_next.c
@@ -17,7 +17,6 @@ static char rcsid_ktf_next_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_remove.c b/src/lib/krb5/keytab/file/ktf_remove.c
index 7fb85ab5b..7134842a2 100644
--- a/src/lib/krb5/keytab/file/ktf_remove.c
+++ b/src/lib/krb5/keytab/file/ktf_remove.c
@@ -17,9 +17,7 @@ static char rcsid_ktf_add_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_resolv.c b/src/lib/krb5/keytab/file/ktf_resolv.c
index 8d9b44bee..5bff2c9a8 100644
--- a/src/lib/krb5/keytab/file/ktf_resolv.c
+++ b/src/lib/krb5/keytab/file/ktf_resolv.c
@@ -19,7 +19,6 @@ static char krb5_ktfile_resolve_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_ssget.c b/src/lib/krb5/keytab/file/ktf_ssget.c
index ae05c8f11..b45a46f0a 100644
--- a/src/lib/krb5/keytab/file/ktf_ssget.c
+++ b/src/lib/krb5/keytab/file/ktf_ssget.c
@@ -18,7 +18,6 @@ static char rcsid_ktf_ssget_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_util.c b/src/lib/krb5/keytab/file/ktf_util.c
index fec787b96..92a3add1a 100644
--- a/src/lib/krb5/keytab/file/ktf_util.c
+++ b/src/lib/krb5/keytab/file/ktf_util.c
@@ -45,12 +45,9 @@ static char rcsid_ktf_util_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
#include <krb5/libos.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
-#include <errno.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/file/ktf_wreslv.c b/src/lib/krb5/keytab/file/ktf_wreslv.c
index ed9b0bc50..b8de5cf4b 100644
--- a/src/lib/krb5/keytab/file/ktf_wreslv.c
+++ b/src/lib/krb5/keytab/file/ktf_wreslv.c
@@ -19,7 +19,6 @@ static char krb5_ktfile_wresolve_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
#include "ktfile.h"
diff --git a/src/lib/krb5/keytab/ktadd.c b/src/lib/krb5/keytab/ktadd.c
index 89e9ce682..ed128c222 100644
--- a/src/lib/krb5/keytab/ktadd.c
+++ b/src/lib/krb5/keytab/ktadd.c
@@ -17,7 +17,6 @@ static char rcsid_ktadd_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
krb5_error_code
krb5_kt_add_entry (id, entry)
diff --git a/src/lib/krb5/keytab/ktdefault.c b/src/lib/krb5/keytab/ktdefault.c
index 0cdc9c342..f322b8f96 100644
--- a/src/lib/krb5/keytab/ktdefault.c
+++ b/src/lib/krb5/keytab/ktdefault.c
@@ -17,7 +17,6 @@ static char rcsid_ktdefault_c [] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <errno.h>
#include <stdio.h>
krb5_error_code krb5_kt_default(id)
diff --git a/src/lib/krb5/keytab/ktremove.c b/src/lib/krb5/keytab/ktremove.c
index b8c0fd5c6..b0c49af95 100644
--- a/src/lib/krb5/keytab/ktremove.c
+++ b/src/lib/krb5/keytab/ktremove.c
@@ -17,7 +17,6 @@ static char rcsid_ktremove_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
krb5_error_code
krb5_kt_remove_entry (id, entry)
diff --git a/src/lib/krb5/keytab/read_servi.c b/src/lib/krb5/keytab/read_servi.c
index a7ccfb7ff..0286da01b 100644
--- a/src/lib/krb5/keytab/read_servi.c
+++ b/src/lib/krb5/keytab/read_servi.c
@@ -22,8 +22,6 @@ static char rcsid_krb5_kt_read_service_key_c[] =
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
-#include <stdio.h>
/* XXX Things that I need and don't know where to get yet */
#define KSUCCESS 0
@@ -57,7 +55,7 @@ OLDDECLARG(krb5_keyblock **, key)
/*
* Get the name of the file that we should use.
*/
- if (keyprocarg == NULL) {
+ if (!keyprocarg) {
if ((kerror = krb5_kt_default_name((char *)keytabname,
sizeof(keytabname) - 1))!= KSUCCESS)
return (kerror);
@@ -82,7 +80,7 @@ OLDDECLARG(krb5_keyblock **, key)
* XXX
*/
- if ((*key = (krb5_keyblock *)malloc(sizeof(krb5_keyblock))) == NULL)
+ if (!(*key = (krb5_keyblock *)malloc(sizeof(krb5_keyblock))))
return (ENOMEM); /* XXX */
krb5_copy_keyblock(&entry.key, *key);
diff --git a/src/lib/krb5/krb/copy_addrs.c b/src/lib/krb5/krb/copy_addrs.c
index 04042f68a..c8cabf6b0 100644
--- a/src/lib/krb5/krb/copy_addrs.c
+++ b/src/lib/krb5/krb/copy_addrs.c
@@ -17,7 +17,6 @@ static char rcsid_copy_addrs_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/copy_auth.c b/src/lib/krb5/krb/copy_auth.c
index 5086146b2..b5a2d9167 100644
--- a/src/lib/krb5/krb/copy_auth.c
+++ b/src/lib/krb5/krb/copy_auth.c
@@ -17,7 +17,6 @@ static char rcsid_copy_auth_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/copy_creds.c b/src/lib/krb5/krb/copy_creds.c
index 6519221f3..16ab0e106 100644
--- a/src/lib/krb5/krb/copy_creds.c
+++ b/src/lib/krb5/krb/copy_creds.c
@@ -16,13 +16,9 @@ static char rcsid_copy_creds_c [] =
#endif /* !lint & !SABER */
#include <krb5/copyright.h>
-
#include <krb5/krb5.h>
-
#include <krb5/ext-proto.h>
-#include <errno.h>
-
/*
* Copy credentials, allocating fresh storage where needed.
diff --git a/src/lib/krb5/krb/copy_data.c b/src/lib/krb5/krb/copy_data.c
index 9eaf87d4d..1b1c08350 100644
--- a/src/lib/krb5/krb/copy_data.c
+++ b/src/lib/krb5/krb/copy_data.c
@@ -17,7 +17,6 @@ static char rcsid_copy_data_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
/*
diff --git a/src/lib/krb5/krb/copy_key.c b/src/lib/krb5/krb/copy_key.c
index 570b97a23..4b86ffb90 100644
--- a/src/lib/krb5/krb/copy_key.c
+++ b/src/lib/krb5/krb/copy_key.c
@@ -19,8 +19,6 @@ static char rcsid_copy_key_c[] =
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
-
/*
* Copy a keyblock, including alloc'ed storage.
*/
diff --git a/src/lib/krb5/krb/copy_princ.c b/src/lib/krb5/krb/copy_princ.c
index 050479fe1..b8a766156 100644
--- a/src/lib/krb5/krb/copy_princ.c
+++ b/src/lib/krb5/krb/copy_princ.c
@@ -17,7 +17,6 @@ static char rcsid_copy_princ_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/copy_tick.c b/src/lib/krb5/krb/copy_tick.c
index 5078a3c89..af2c130d4 100644
--- a/src/lib/krb5/krb/copy_tick.c
+++ b/src/lib/krb5/krb/copy_tick.c
@@ -17,7 +17,6 @@ static char rcsid_copy_tick_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/decode_kdc.c b/src/lib/krb5/krb/decode_kdc.c
index 863225293..90ec2101f 100644
--- a/src/lib/krb5/krb/decode_kdc.c
+++ b/src/lib/krb5/krb/decode_kdc.c
@@ -18,12 +18,8 @@ static char rcsid_decode_kdc_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <krb5/isode_err.h>
#include <krb5/asn1.h>
-#include <errno.h>
-
#include <krb5/ext-proto.h>
/*
diff --git a/src/lib/krb5/krb/decrypt_tk.c b/src/lib/krb5/krb/decrypt_tk.c
index 451a7598c..7affe0ec6 100644
--- a/src/lib/krb5/krb/decrypt_tk.c
+++ b/src/lib/krb5/krb/decrypt_tk.c
@@ -19,9 +19,6 @@ static char rcsid_decrypt_tk_c[] =
#include <krb5/krb5.h>
#include <krb5/asn1.h>
-#include <krb5/krb5_err.h>
-
-#include <errno.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/encode_kdc.c b/src/lib/krb5/krb/encode_kdc.c
index 3d4df5403..637d5aa5b 100644
--- a/src/lib/krb5/krb/encode_kdc.c
+++ b/src/lib/krb5/krb/encode_kdc.c
@@ -17,11 +17,8 @@ static char rcsid_encode_kdc_c [] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/asn1.h>
-#include <errno.h>
-
#include <krb5/ext-proto.h>
/*
diff --git a/src/lib/krb5/krb/encrypt_tk.c b/src/lib/krb5/krb/encrypt_tk.c
index f1aafbcde..2705a5867 100644
--- a/src/lib/krb5/krb/encrypt_tk.c
+++ b/src/lib/krb5/krb/encrypt_tk.c
@@ -19,9 +19,6 @@ static char rcsid_encrypt_tk_c[] =
#include <krb5/krb5.h>
#include <krb5/asn1.h>
-#include <krb5/krb5_err.h>
-
-#include <errno.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/gc_frm_kdc.c b/src/lib/krb5/krb/gc_frm_kdc.c
index 070c2e14a..7390261b2 100644
--- a/src/lib/krb5/krb/gc_frm_kdc.c
+++ b/src/lib/krb5/krb/gc_frm_kdc.c
@@ -19,9 +19,6 @@ static char rcsid_gcfkdc_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <errno.h>
-
#include <krb5/ext-proto.h>
#include "int-proto.h"
diff --git a/src/lib/krb5/krb/gc_via_tgt.c b/src/lib/krb5/krb/gc_via_tgt.c
index f686794f0..bf41c2491 100644
--- a/src/lib/krb5/krb/gc_via_tgt.c
+++ b/src/lib/krb5/krb/gc_via_tgt.c
@@ -17,11 +17,9 @@ static char rcsid_gcvtgt_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/asn1.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
#include "int-proto.h"
diff --git a/src/lib/krb5/krb/get_creds.c b/src/lib/krb5/krb/get_creds.c
index f57f6230d..51ebc62d2 100644
--- a/src/lib/krb5/krb/get_creds.c
+++ b/src/lib/krb5/krb/get_creds.c
@@ -32,7 +32,6 @@ static char rcsid_get_creds_c[] =
*/
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
krb5_error_code
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index c6bd18425..0cf94bc68 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -17,12 +17,8 @@ static char rcsid_get_in_tkt_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/asn1.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
-
-#include <errno.h>
#include <krb5/ext-proto.h>
/*
diff --git a/src/lib/krb5/krb/in_tkt_pwd.c b/src/lib/krb5/krb/in_tkt_pwd.c
index b0c79f27c..6354ce389 100644
--- a/src/lib/krb5/krb/in_tkt_pwd.c
+++ b/src/lib/krb5/krb/in_tkt_pwd.c
@@ -17,10 +17,7 @@ static char rcsid_in_tkt_pwd_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
struct pwd_keyproc_arg {
diff --git a/src/lib/krb5/krb/in_tkt_sky.c b/src/lib/krb5/krb/in_tkt_sky.c
index b7ef26d78..1237af0ea 100644
--- a/src/lib/krb5/krb/in_tkt_sky.c
+++ b/src/lib/krb5/krb/in_tkt_sky.c
@@ -18,9 +18,7 @@ static char rcsid_in_tkt_skey_c [] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <errno.h>
#include <krb5/ext-proto.h>
#include <krb5/asn1.h> /* XXX for krb5_free_keyblock! */
diff --git a/src/lib/krb5/krb/kdc_rep_dc.c b/src/lib/krb5/krb/kdc_rep_dc.c
index a235fb383..304d38a5b 100644
--- a/src/lib/krb5/krb/kdc_rep_dc.c
+++ b/src/lib/krb5/krb/kdc_rep_dc.c
@@ -18,9 +18,7 @@ static char rcsid_kdc_rep_dc_c [] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/asn1.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
/*
* Decrypt the encrypted portion of the KDC_REP message, using the key
diff --git a/src/lib/krb5/krb/mk_priv.c b/src/lib/krb5/krb/mk_priv.c
index c46648b77..796ce4e6f 100644
--- a/src/lib/krb5/krb/mk_priv.c
+++ b/src/lib/krb5/krb/mk_priv.c
@@ -17,12 +17,7 @@ static char rcsid_mk_priv_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-
-#include <errno.h>
-
#include <krb5/asn1.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/mk_req_ext.c b/src/lib/krb5/krb/mk_req_ext.c
index f0a124af6..c5c0b62c8 100644
--- a/src/lib/krb5/krb/mk_req_ext.c
+++ b/src/lib/krb5/krb/mk_req_ext.c
@@ -17,15 +17,12 @@ static char rcsid_mk_req_ext_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/asn1.h>
#include <krb5/libos.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
/*
Formats a KRB_AP_REQ message into outbuf, with more complete options than
diff --git a/src/lib/krb5/krb/mk_safe.c b/src/lib/krb5/krb/mk_safe.c
index 405b7b3bd..a4fad748f 100644
--- a/src/lib/krb5/krb/mk_safe.c
+++ b/src/lib/krb5/krb/mk_safe.c
@@ -17,11 +17,8 @@ static char rcsid_mk_safe_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <errno.h>
#include <krb5/asn1.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/parse.c b/src/lib/krb5/krb/parse.c
index f7131809e..80f80c753 100644
--- a/src/lib/krb5/krb/parse.c
+++ b/src/lib/krb5/krb/parse.c
@@ -19,11 +19,8 @@ static char rcsid_parse_c [] =
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
-#include <errno.h>
-
/*
converts a single-string representation of the name to the multi-part
principal format used in the protocols.
diff --git a/src/lib/krb5/krb/rd_error.c b/src/lib/krb5/krb/rd_error.c
index 2bcf44a7f..36058f5df 100644
--- a/src/lib/krb5/krb/rd_error.c
+++ b/src/lib/krb5/krb/rd_error.c
@@ -19,7 +19,6 @@ static char rcsid_rd_error_c[] =
#include <krb5/krb5.h>
#include <krb5/asn1.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/rd_priv.c b/src/lib/krb5/krb/rd_priv.c
index 6e9f15050..05f5805b7 100644
--- a/src/lib/krb5/krb/rd_priv.c
+++ b/src/lib/krb5/krb/rd_priv.c
@@ -17,12 +17,8 @@ static char rcsid_rd_priv_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-
-#include <errno.h>
#include <krb5/asn1.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/rd_req.c b/src/lib/krb5/krb/rd_req.c
index f54415738..8d3e21c0c 100644
--- a/src/lib/krb5/krb/rd_req.c
+++ b/src/lib/krb5/krb/rd_req.c
@@ -17,8 +17,6 @@ static char rd_req_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <krb5/isode_err.h>
#include <krb5/asn1.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/rd_req_dec.c b/src/lib/krb5/krb/rd_req_dec.c
index 4b91c4c27..383a2d213 100644
--- a/src/lib/krb5/krb/rd_req_dec.c
+++ b/src/lib/krb5/krb/rd_req_dec.c
@@ -17,11 +17,7 @@ static char rd_req_dec_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <errno.h>
-
#include <krb5/ext-proto.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/asn1.h>
diff --git a/src/lib/krb5/krb/rd_req_sim.c b/src/lib/krb5/krb/rd_req_sim.c
index 49d8ca2c3..6336343a1 100644
--- a/src/lib/krb5/krb/rd_req_sim.c
+++ b/src/lib/krb5/krb/rd_req_sim.c
@@ -17,10 +17,6 @@ static char rd_req_sim_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <krb5/isode_err.h>
-#include <errno.h>
-
#include <krb5/asn1.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/rd_safe.c b/src/lib/krb5/krb/rd_safe.c
index c03a272c5..02d698037 100644
--- a/src/lib/krb5/krb/rd_safe.c
+++ b/src/lib/krb5/krb/rd_safe.c
@@ -17,11 +17,7 @@ static char rcsid_rd_safe_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
-#include <errno.h>
-
#include <krb5/asn1.h>
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
diff --git a/src/lib/krb5/krb/send_tgs.c b/src/lib/krb5/krb/send_tgs.c
index eb5e7457c..16214ecab 100644
--- a/src/lib/krb5/krb/send_tgs.c
+++ b/src/lib/krb5/krb/send_tgs.c
@@ -18,9 +18,6 @@ static char rcsid_send_tgs_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
#include <krb5/asn1.h>
-#include <errno.h>
-
-#include <stdio.h>
#include <krb5/libos-proto.h>
#include <krb5/ext-proto.h>
/*
diff --git a/src/lib/krb5/krb/tgtname.c b/src/lib/krb5/krb/tgtname.c
index cf95caf7f..f132cfb41 100644
--- a/src/lib/krb5/krb/tgtname.c
+++ b/src/lib/krb5/krb/tgtname.c
@@ -19,7 +19,6 @@ static char rcsid_tgtname_c [] =
#include <krb5/krb5.h>
#include <krb5/ext-proto.h>
#include <krb5/kdb.h>
-#include <errno.h>
static krb5_data tgtdata = {sizeof(TGTNAME), TGTNAME};
diff --git a/src/lib/krb5/krb/unparse.c b/src/lib/krb5/krb/unparse.c
index 31a8f51f8..b57d78a5d 100644
--- a/src/lib/krb5/krb/unparse.c
+++ b/src/lib/krb5/krb/unparse.c
@@ -18,11 +18,8 @@ static char rcsid_unparse_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
-
/*
converts the multi-part
principal format used in the protocols to a single-string representation
diff --git a/src/lib/krb5/krb/walk_rtree.c b/src/lib/krb5/krb/walk_rtree.c
index 6f2c89acf..f4b4fa563 100644
--- a/src/lib/krb5/krb/walk_rtree.c
+++ b/src/lib/krb5/krb/walk_rtree.c
@@ -17,9 +17,7 @@ static char rcsid_walk_rtree_c[] =
#include <krb5/copyright.h>
#include <krb5/krb5.h>
-#include <krb5/krb5_err.h>
#include <krb5/ext-proto.h>
-#include <errno.h>
#include "int-proto.h"
/* internal function, used by krb5_get_cred_from_kdc() */