aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/crypto/crypto_tests/t_pkcs5.c5
-rw-r--r--src/lib/crypto/nss/hash_provider/hash_gen.h2
-rw-r--r--src/lib/gssapi/krb5/k5sealiov.c5
-rw-r--r--src/lib/gssapi/krb5/k5sealv3.c5
-rw-r--r--src/lib/gssapi/krb5/k5sealv3iov.c5
-rw-r--r--src/lib/gssapi/krb5/k5unsealiov.c5
-rw-r--r--src/lib/gssapi/krb5/naming_exts.c4
-rw-r--r--src/lib/gssapi/krb5/prf.c4
-rw-r--r--src/lib/gssapi/krb5/store_cred.c4
-rw-r--r--src/lib/gssapi/spnego/spnego_mech.c4
-rw-r--r--src/lib/kadm5/alt_prof.c2
-rw-r--r--src/lib/kadm5/chpass_util.c5
-rw-r--r--src/lib/kadm5/clnt/client_init.c11
-rw-r--r--src/lib/kadm5/srv/server_acl.c3
-rw-r--r--src/lib/kadm5/srv/server_init.c5
-rw-r--r--src/lib/kadm5/srv/server_kdb.c2
-rw-r--r--src/lib/kadm5/unit-test/setkey-test.c1
-rw-r--r--src/lib/kdb/kdb5.c3
-rw-r--r--src/lib/kdb/kdb5.h4
-rw-r--r--src/lib/kdb/kdb_convert.c3
-rw-r--r--src/lib/krb5/krb/appdefault.c2
-rw-r--r--src/lib/krb5/krb/bld_princ.c1
-rw-r--r--src/lib/krb5/krb/chpw.c1
-rw-r--r--src/lib/krb5/krb/deltat.c3
-rw-r--r--src/lib/krb5/krb/get_in_tkt.c2
-rw-r--r--src/lib/krb5/krb/kerrs.c1
-rw-r--r--src/lib/krb5/krb/t_kerb.c2
-rw-r--r--src/lib/krb5/krb/x-deltat.y3
-rw-r--r--src/lib/krb5/krb5_libinit.c3
-rw-r--r--src/lib/krb5/os/changepw.c2
-rw-r--r--src/lib/krb5/os/locate_kdc.c3
-rw-r--r--src/lib/krb5/os/sendto_kdc.c2
-rw-r--r--src/lib/krb5/os/t_locate_kdc.c5
-rw-r--r--src/lib/krb5/os/t_std_conf.c2
-rw-r--r--src/lib/krb5/os/t_trace.c9
-rw-r--r--src/lib/krb5/rcache/rc_dfl.c2
-rw-r--r--src/lib/krb5/rcache/t_replay.c5
-rw-r--r--src/lib/rpc/auth_unix.c3
-rw-r--r--src/lib/rpc/clnt_generic.c2
-rw-r--r--src/lib/rpc/clnt_perror.c3
-rw-r--r--src/lib/rpc/clnt_simple.c2
-rw-r--r--src/lib/rpc/getrpcport.c2
-rw-r--r--src/lib/rpc/pmap_rmt.c5
-rw-r--r--src/lib/rpc/svc_auth_gss.c5
-rw-r--r--src/lib/rpc/svc_tcp.c7
-rw-r--r--src/lib/rpc/svc_udp.c6
-rw-r--r--src/lib/rpc/unit-test/client.c2
47 files changed, 38 insertions, 129 deletions
diff --git a/src/lib/crypto/crypto_tests/t_pkcs5.c b/src/lib/crypto/crypto_tests/t_pkcs5.c
index 7ab078d..8e87a80 100644
--- a/src/lib/crypto/crypto_tests/t_pkcs5.c
+++ b/src/lib/crypto/crypto_tests/t_pkcs5.c
@@ -26,11 +26,6 @@
/* Test vectors for PBKDF2 (from PKCS #5v2), based on RFC 3211. */
-#include <assert.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-
#include "k5-int.h"
static void printhex (size_t len, const char *p)
diff --git a/src/lib/crypto/nss/hash_provider/hash_gen.h b/src/lib/crypto/nss/hash_provider/hash_gen.h
index 95e2900..2b84da5 100644
--- a/src/lib/crypto/nss/hash_provider/hash_gen.h
+++ b/src/lib/crypto/nss/hash_provider/hash_gen.h
@@ -33,8 +33,8 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "sechash.h"
#include "k5-int.h"
+#include "sechash.h"
krb5_error_code k5_nss_gen_hash(HASH_HashType hashType, unsigned int icount,
const krb5_data *input, krb5_data *output);
diff --git a/src/lib/gssapi/krb5/k5sealiov.c b/src/lib/gssapi/krb5/k5sealiov.c
index 0b99a77..a129670 100644
--- a/src/lib/gssapi/krb5/k5sealiov.c
+++ b/src/lib/gssapi/krb5/k5sealiov.c
@@ -24,11 +24,8 @@
* or implied warranty.
*/
-#include <assert.h>
-#include "k5-platform.h" /* for 64-bit support */
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
static krb5_error_code
make_seal_token_v1_iov(krb5_context context,
diff --git a/src/lib/gssapi/krb5/k5sealv3.c b/src/lib/gssapi/krb5/k5sealv3.c
index f3ade5e..1a5c14c 100644
--- a/src/lib/gssapi/krb5/k5sealv3.c
+++ b/src/lib/gssapi/krb5/k5sealv3.c
@@ -26,11 +26,8 @@
/* draft-ietf-krb-wg-gssapi-cfx-05 */
-#include <assert.h>
-#include "k5-platform.h" /* for 64-bit support */
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
int
gss_krb5int_rotate_left (void *ptr, size_t bufsiz, size_t rc)
diff --git a/src/lib/gssapi/krb5/k5sealv3iov.c b/src/lib/gssapi/krb5/k5sealv3iov.c
index 960f31b..a73edb6 100644
--- a/src/lib/gssapi/krb5/k5sealv3iov.c
+++ b/src/lib/gssapi/krb5/k5sealv3iov.c
@@ -24,11 +24,8 @@
* or implied warranty.
*/
-#include <assert.h>
-#include "k5-platform.h" /* for 64-bit support */
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
krb5_error_code
gss_krb5int_make_seal_token_v3_iov(krb5_context context,
diff --git a/src/lib/gssapi/krb5/k5unsealiov.c b/src/lib/gssapi/krb5/k5unsealiov.c
index b654c66..f34d802 100644
--- a/src/lib/gssapi/krb5/k5unsealiov.c
+++ b/src/lib/gssapi/krb5/k5unsealiov.c
@@ -24,11 +24,8 @@
* or implied warranty.
*/
-#include <assert.h>
-#include "k5-platform.h" /* for 64-bit support */
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
static OM_uint32
kg_unseal_v1_iov(krb5_context context,
diff --git a/src/lib/gssapi/krb5/naming_exts.c b/src/lib/gssapi/krb5/naming_exts.c
index 10dbe32..6062a6d 100644
--- a/src/lib/gssapi/krb5/naming_exts.c
+++ b/src/lib/gssapi/krb5/naming_exts.c
@@ -24,10 +24,8 @@
* or implied warranty.
*/
-#include <assert.h>
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
krb5_error_code
kg_init_name(krb5_context context, krb5_principal principal,
diff --git a/src/lib/gssapi/krb5/prf.c b/src/lib/gssapi/krb5/prf.c
index bfca89b..e19291f 100644
--- a/src/lib/gssapi/krb5/prf.c
+++ b/src/lib/gssapi/krb5/prf.c
@@ -24,10 +24,8 @@
* or implied warranty.
*/
-#include <assert.h>
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
#ifndef MIN /* Usually found in <sys/param.h>. */
#define MIN(_a,_b) ((_a)<(_b)?(_a):(_b))
diff --git a/src/lib/gssapi/krb5/store_cred.c b/src/lib/gssapi/krb5/store_cred.c
index 0a020d7..a6becf3 100644
--- a/src/lib/gssapi/krb5/store_cred.c
+++ b/src/lib/gssapi/krb5/store_cred.c
@@ -24,10 +24,8 @@
* or implied warranty.
*/
-#include <assert.h>
-#include "k5-int.h" /* for zap() */
+#include "k5-int.h"
#include "gssapiP_krb5.h"
-#include <stdarg.h>
static int
has_unexpired_creds(krb5_gss_cred_id_t kcred,
diff --git a/src/lib/gssapi/spnego/spnego_mech.c b/src/lib/gssapi/spnego/spnego_mech.c
index c9c1b11..173c6d2 100644
--- a/src/lib/gssapi/spnego/spnego_mech.c
+++ b/src/lib/gssapi/spnego/spnego_mech.c
@@ -59,10 +59,6 @@
*/
/* #pragma ident "@(#)spnego_mech.c 1.7 04/09/28 SMI" */
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <k5-int.h>
#include <krb5.h>
#include <mglueP.h>
diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c
index 9ebcb73..205333b 100644
--- a/src/lib/kadm5/alt_prof.c
+++ b/src/lib/kadm5/alt_prof.c
@@ -29,8 +29,8 @@
*/
/* Implement alternate profile file handling. */
-#include "fake-addrinfo.h"
#include "k5-int.h"
+#include "fake-addrinfo.h"
#include <kadm5/admin.h>
#include "adm_proto.h"
#include <stdio.h>
diff --git a/src/lib/kadm5/chpass_util.c b/src/lib/kadm5/chpass_util.c
index 7a75136..408b0eb 100644
--- a/src/lib/kadm5/chpass_util.c
+++ b/src/lib/kadm5/chpass_util.c
@@ -4,11 +4,8 @@
*/
-#include <stdio.h>
#include "autoconf.h"
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
+#include <stdio.h>
#include <time.h>
#include <string.h>
diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c
index 48d9388..7fac2a8 100644
--- a/src/lib/kadm5/clnt/client_init.c
+++ b/src/lib/kadm5/clnt/client_init.c
@@ -29,23 +29,14 @@
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
-#include <stdio.h>
+#include <k5-int.h>
#include <netdb.h>
-#include "autoconf.h"
-#ifdef HAVE_MEMORY_H
-#include <memory.h>
-#endif
-#include <string.h>
#include <com_err.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <fake-addrinfo.h>
-#include <k5-int.h> /* for KRB5_ADM_DEFAULT_PORT */
#include <krb5.h>
-#ifdef __STDC__
-#include <stdlib.h>
-#endif
#include <kadm5/admin.h>
#include <kadm5/kadm_rpc.h>
diff --git a/src/lib/kadm5/srv/server_acl.c b/src/lib/kadm5/srv/server_acl.c
index b2aeb7d..044b0e9 100644
--- a/src/lib/kadm5/srv/server_acl.c
+++ b/src/lib/kadm5/srv/server_acl.c
@@ -24,11 +24,10 @@
* or implied warranty.
*/
-#include <stdio.h>
+#include "k5-int.h"
#include <syslog.h>
#include <sys/param.h>
#include <gssapi/gssapi_generic.h>
-#include "k5-int.h"
#include <kadm5/server_internal.h>
#include <kadm5/admin.h>
#include "adm_proto.h"
diff --git a/src/lib/kadm5/srv/server_init.c b/src/lib/kadm5/srv/server_init.c
index f46f89d..c0e0b78 100644
--- a/src/lib/kadm5/srv/server_init.c
+++ b/src/lib/kadm5/srv/server_init.c
@@ -10,11 +10,8 @@
* Use is subject to license terms.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
+#include "k5-int.h"
#include <com_err.h>
-#include "k5-int.h" /* needed for gssapiP_krb5.h */
#include <kadm5/admin.h>
#include <krb5.h>
#include <kdb_log.h>
diff --git a/src/lib/kadm5/srv/server_kdb.c b/src/lib/kadm5/srv/server_kdb.c
index 6db5229..f99bf58 100644
--- a/src/lib/kadm5/srv/server_kdb.c
+++ b/src/lib/kadm5/srv/server_kdb.c
@@ -10,8 +10,6 @@
* Use is subject to license terms.
*/
-#include <stdio.h>
-#include <stdlib.h>
#include "k5-int.h"
#include <kadm5/admin.h>
#include "server_internal.h"
diff --git a/src/lib/kadm5/unit-test/setkey-test.c b/src/lib/kadm5/unit-test/setkey-test.c
index 4da236e..28364b6 100644
--- a/src/lib/kadm5/unit-test/setkey-test.c
+++ b/src/lib/kadm5/unit-test/setkey-test.c
@@ -1,5 +1,4 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <stdio.h>
#include <k5-int.h>
#include <kadm5/admin.h>
diff --git a/src/lib/kdb/kdb5.c b/src/lib/kdb/kdb5.c
index 4b4bb49..7541b1e 100644
--- a/src/lib/kdb/kdb5.c
+++ b/src/lib/kdb/kdb5.c
@@ -37,10 +37,7 @@
* Include files
*/
-#include <stdio.h>
-#include <string.h>
#include <k5-int.h>
-#include <osconf.h>
#include "kdb5.h"
#include "kdb_log.h"
#include "kdb5int.h"
diff --git a/src/lib/kdb/kdb5.h b/src/lib/kdb/kdb5.h
index 33bc49c..9a43046 100644
--- a/src/lib/kdb/kdb5.h
+++ b/src/lib/kdb/kdb5.h
@@ -2,14 +2,14 @@
#ifndef _KRB5_KDB5_H_
#define _KRB5_KDB5_H_
+#include <k5-int.h>
+
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <errno.h>
#include <utime.h>
-#include <utime.h>
-#include <k5-int.h>
#include "kdb.h"
#define KRB5_DB_GET_DB_CONTEXT(kcontext) (((kdb5_dal_handle*) (kcontext)->dal_handle)->db_context)
diff --git a/src/lib/kdb/kdb_convert.c b/src/lib/kdb/kdb_convert.c
index ee3e984..1370395 100644
--- a/src/lib/kdb/kdb_convert.c
+++ b/src/lib/kdb/kdb_convert.c
@@ -10,13 +10,12 @@
* This file contains api's for conversion of the kdb_incr_update_t
* struct(s) into krb5_db_entry struct(s) and vice-versa.
*/
+#include <k5-int.h>
#include <sys/types.h>
#include <com_err.h>
#include <locale.h>
-#include <errno.h>
#include <iprop_hdr.h>
#include "iprop.h"
-#include <k5-int.h>
#include <kdb.h>
#include <kdb_log.h>
diff --git a/src/lib/krb5/krb/appdefault.c b/src/lib/krb5/krb/appdefault.c
index e3d14be..73fd260 100644
--- a/src/lib/krb5/krb/appdefault.c
+++ b/src/lib/krb5/krb/appdefault.c
@@ -4,8 +4,6 @@
* handle the [appdefaults] profile section
*/
-#include <stdio.h>
-#include <string.h>
#include "k5-int.h"
diff --git a/src/lib/krb5/krb/bld_princ.c b/src/lib/krb5/krb/bld_princ.c
index 3dbe356..ab6fed8 100644
--- a/src/lib/krb5/krb/bld_princ.c
+++ b/src/lib/krb5/krb/bld_princ.c
@@ -24,7 +24,6 @@
* or implied warranty.
*/
-#include <stdarg.h>
#include "k5-int.h"
static krb5_error_code
diff --git a/src/lib/krb5/krb/chpw.c b/src/lib/krb5/krb/chpw.c
index b67a588..463ce64 100644
--- a/src/lib/krb5/krb/chpw.c
+++ b/src/lib/krb5/krb/chpw.c
@@ -2,7 +2,6 @@
/*
** set password functions added by Paul W. Nelson, Thursby Software Systems, Inc.
*/
-#include <string.h>
#include "k5-int.h"
#include "k5-unicode.h"
diff --git a/src/lib/krb5/krb/deltat.c b/src/lib/krb5/krb/deltat.c
index cf6e289..0169da8 100644
--- a/src/lib/krb5/krb/deltat.c
+++ b/src/lib/krb5/krb/deltat.c
@@ -75,9 +75,8 @@
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
-#include <ctype.h>
-#include <errno.h>
#include "k5-int.h"
+#include <ctype.h>
struct param {
krb5_int32 delta;
diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c
index 88bad4c..5a2b8d8 100644
--- a/src/lib/krb5/krb/get_in_tkt.c
+++ b/src/lib/krb5/krb/get_in_tkt.c
@@ -24,8 +24,6 @@
* or implied warranty.
*/
-#include <string.h>
-
#include "k5-int.h"
#include "int-proto.h"
#include "os-proto.h"
diff --git a/src/lib/krb5/krb/kerrs.c b/src/lib/krb5/krb/kerrs.c
index 16e7267..c5d6c81 100644
--- a/src/lib/krb5/krb/kerrs.c
+++ b/src/lib/krb5/krb/kerrs.c
@@ -24,7 +24,6 @@
* or implied warranty.
*/
-#include <stdarg.h>
#include "k5-int.h"
#include "int-proto.h"
diff --git a/src/lib/krb5/krb/t_kerb.c b/src/lib/krb5/krb/t_kerb.c
index 0f27ce9..60cfb5b 100644
--- a/src/lib/krb5/krb/t_kerb.c
+++ b/src/lib/krb5/krb/t_kerb.c
@@ -4,8 +4,8 @@
* routines.
*/
-#include "krb5.h"
#include "autoconf.h"
+#include "krb5.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
diff --git a/src/lib/krb5/krb/x-deltat.y b/src/lib/krb5/krb/x-deltat.y
index 5d5f2f8..0fb0078 100644
--- a/src/lib/krb5/krb/x-deltat.y
+++ b/src/lib/krb5/krb/x-deltat.y
@@ -47,9 +47,8 @@
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
-#include <ctype.h>
-#include <errno.h>
#include "k5-int.h"
+#include <ctype.h>
struct param {
krb5_int32 delta;
diff --git a/src/lib/krb5/krb5_libinit.c b/src/lib/krb5/krb5_libinit.c
index f2382d1..b72bc58 100644
--- a/src/lib/krb5/krb5_libinit.c
+++ b/src/lib/krb5/krb5_libinit.c
@@ -1,8 +1,5 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <assert.h>
-#include "autoconf.h"
-#include "com_err.h"
#include "k5-int.h"
#if defined(_WIN32) || defined(USE_CCAPI)
diff --git a/src/lib/krb5/os/changepw.c b/src/lib/krb5/os/changepw.c
index 0ee427d..dde8436 100644
--- a/src/lib/krb5/os/changepw.c
+++ b/src/lib/krb5/os/changepw.c
@@ -31,8 +31,8 @@
* infrastructure
*/
-#include "fake-addrinfo.h"
#include "k5-int.h"
+#include "fake-addrinfo.h"
#include "os-proto.h"
#include "../krb/auth_con.h"
#include "../krb/int-proto.h"
diff --git a/src/lib/krb5/os/locate_kdc.c b/src/lib/krb5/os/locate_kdc.c
index 2fade13..1f2039c 100644
--- a/src/lib/krb5/os/locate_kdc.c
+++ b/src/lib/krb5/os/locate_kdc.c
@@ -24,10 +24,9 @@
* or implied warranty.
*/
-#include "fake-addrinfo.h"
#include "k5-int.h"
+#include "fake-addrinfo.h"
#include "os-proto.h"
-#include <stdio.h>
#ifdef KRB5_DNS_LOOKUP
#ifdef WSHELPER
#include <wshelper.h>
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c
index a7fa461..4555321 100644
--- a/src/lib/krb5/os/sendto_kdc.c
+++ b/src/lib/krb5/os/sendto_kdc.c
@@ -53,8 +53,8 @@
/* Send packet to KDC for realm; wait for response, retransmitting
* as necessary. */
-#include "fake-addrinfo.h"
#include "k5-int.h"
+#include "fake-addrinfo.h"
#include "os-proto.h"
diff --git a/src/lib/krb5/os/t_locate_kdc.c b/src/lib/krb5/os/t_locate_kdc.c
index dd609fd..e986ae9 100644
--- a/src/lib/krb5/os/t_locate_kdc.c
+++ b/src/lib/krb5/os/t_locate_kdc.c
@@ -1,8 +1,7 @@
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
+#include "k5-platform.h"
#include "port-sockets.h"
+#include <sys/types.h>
#include <com_err.h>
#define TEST
diff --git a/src/lib/krb5/os/t_std_conf.c b/src/lib/krb5/os/t_std_conf.c
index 6ee54d5..72021c3 100644
--- a/src/lib/krb5/os/t_std_conf.c
+++ b/src/lib/krb5/os/t_std_conf.c
@@ -4,8 +4,8 @@
* values from the krb5 config file(s).
*/
-#include "fake-addrinfo.h"
#include "k5-int.h"
+#include "fake-addrinfo.h"
#include <stdio.h>
#include <string.h>
diff --git a/src/lib/krb5/os/t_trace.c b/src/lib/krb5/os/t_trace.c
index 4cb2bd0..5aea68e 100644
--- a/src/lib/krb5/os/t_trace.c
+++ b/src/lib/krb5/os/t_trace.c
@@ -30,15 +30,10 @@
* OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include "port-sockets.h"
-#include <com_err.h>
-
-#define TEST
#include "k5-int.h"
+#include "port-sockets.h"
#include "os-proto.h"
+#include <com_err.h>
const char *prog;
diff --git a/src/lib/krb5/rcache/rc_dfl.c b/src/lib/krb5/rcache/rc_dfl.c
index 70d98c1..8f517d0 100644
--- a/src/lib/krb5/rcache/rc_dfl.c
+++ b/src/lib/krb5/rcache/rc_dfl.c
@@ -9,10 +9,10 @@
/*
* An implementation for the default replay cache type.
*/
+#include "k5-int.h"
#include "rc_base.h"
#include "rc_dfl.h"
#include "rc_io.h"
-#include "k5-int.h"
#include "rc-int.h"
/*
diff --git a/src/lib/krb5/rcache/t_replay.c b/src/lib/krb5/rcache/t_replay.c
index 0e108bf..db273ec 100644
--- a/src/lib/krb5/rcache/t_replay.c
+++ b/src/lib/krb5/rcache/t_replay.c
@@ -24,11 +24,6 @@
* or implied warranty.
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
#include "k5-int.h"
static void
diff --git a/src/lib/rpc/auth_unix.c b/src/lib/rpc/auth_unix.c
index c09b524..6cb998d 100644
--- a/src/lib/rpc/auth_unix.c
+++ b/src/lib/rpc/auth_unix.c
@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
*
*/
+#include "autoconf.h"
#include <stdio.h>
#include <unistd.h>
#include <string.h>
@@ -54,8 +55,6 @@ static char sccsid[] = "@(#)auth_unix.c 1.19 87/08/11 Copyr 1984 Sun Micro";
#include <gssrpc/auth.h>
#include <gssrpc/auth_unix.h>
-#include "autoconf.h"
-
/*
* Unix authenticator operations vector
*/
diff --git a/src/lib/rpc/clnt_generic.c b/src/lib/rpc/clnt_generic.c
index da3e8e8..595c5f2 100644
--- a/src/lib/rpc/clnt_generic.c
+++ b/src/lib/rpc/clnt_generic.c
@@ -36,12 +36,12 @@
static char sccsid[] = "@(#)clnt_generic.c 1.4 87/08/11 (C) 1987 SMI";
#endif
+#include "autoconf.h"
#include <string.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
#include <sys/errno.h>
#include <netdb.h>
-#include "autoconf.h"
/*
* Generic client creation: takes (hostname, program-number, protocol) and
diff --git a/src/lib/rpc/clnt_perror.c b/src/lib/rpc/clnt_perror.c
index b21ea8a..fcc3657 100644
--- a/src/lib/rpc/clnt_perror.c
+++ b/src/lib/rpc/clnt_perror.c
@@ -38,6 +38,7 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
/*
* clnt_perror.c
*/
+#include "autoconf.h"
#include <stdio.h>
#include <string.h>
#include <errno.h>
@@ -46,8 +47,6 @@ static char sccsid[] = "@(#)clnt_perror.c 1.15 87/10/07 Copyr 1984 Sun Micro";
#include <gssrpc/auth.h>
#include <gssrpc/clnt.h>
-#include "autoconf.h"
-
#ifndef HAVE_STRERROR
#ifdef NEED_SYS_ERRLIST
extern char *sys_errlist[];
diff --git a/src/lib/rpc/clnt_simple.c b/src/lib/rpc/clnt_simple.c
index df8f246..4ec99ed 100644
--- a/src/lib/rpc/clnt_simple.c
+++ b/src/lib/rpc/clnt_simple.c
@@ -40,6 +40,7 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
* Simplified front end to rpc.
*/
+#include "autoconf.h"
#include <stdio.h>
/* for close() */
#include <unistd.h>
@@ -48,7 +49,6 @@ static char sccsid[] = "@(#)clnt_simple.c 1.35 87/08/11 Copyr 1984 Sun Micro";
#include <netdb.h>
#include <string.h>
#include <port-sockets.h>
-#include "autoconf.h"
static struct callrpc_private {
CLIENT *client;
diff --git a/src/lib/rpc/getrpcport.c b/src/lib/rpc/getrpcport.c
index 32ff739..e281754 100644
--- a/src/lib/rpc/getrpcport.c
+++ b/src/lib/rpc/getrpcport.c
@@ -32,13 +32,13 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "autoconf.h"
#include <stdio.h>
#include <string.h>
#include <gssrpc/rpc.h>
#include <gssrpc/pmap_clnt.h>
#include <netdb.h>
#include <sys/socket.h>
-#include "autoconf.h"
int
gssrpc_getrpcport(
diff --git a/src/lib/rpc/pmap_rmt.c b/src/lib/rpc/pmap_rmt.c
index 10d9e3f..cd0b309 100644
--- a/src/lib/rpc/pmap_rmt.c
+++ b/src/lib/rpc/pmap_rmt.c
@@ -41,6 +41,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
* remote call and broadcast service
*/
+#include "k5-platform.h"
#include <unistd.h>
#include <gssrpc/rpc.h>
#include <gssrpc/pmap_prot.h>
@@ -50,8 +51,6 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
#ifdef sun
#include <sys/sockio.h>
#endif
-#include <stdio.h>
-#include <errno.h>
#ifdef OSF1
#include <net/route.h>
#include <sys/mbuf.h>
@@ -60,9 +59,7 @@ static char sccsid[] = "@(#)pmap_rmt.c 1.21 87/08/27 Copyr 1984 Sun Micro";
#include <sys/ioctl.h>
#include <arpa/inet.h>
#define MAX_BROADCAST_SIZE 1400
-#include <string.h>
#include <port-sockets.h>
-#include "k5-platform.h" /* set_cloexec_fd */
static struct timeval timeout = { 3, 0 };
diff --git a/src/lib/rpc/svc_auth_gss.c b/src/lib/rpc/svc_auth_gss.c
index 8da7003..09a3534 100644
--- a/src/lib/rpc/svc_auth_gss.c
+++ b/src/lib/rpc/svc_auth_gss.c
@@ -34,9 +34,7 @@
Id: svc_auth_gss.c,v 1.28 2002/10/15 21:29:36 kwc Exp
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include "k5-platform.h"
#include <gssrpc/rpc.h>
#include <gssrpc/auth_gssapi.h>
#ifdef HAVE_HEIMDAL
@@ -46,7 +44,6 @@
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_generic.h>
#endif
-#include "k5-platform.h" /* SIZE_MAX */
#ifdef DEBUG_GSSAPI
int svc_debug_gss = DEBUG_GSSAPI;
diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c
index f052203..d78cf55 100644
--- a/src/lib/rpc/svc_tcp.c
+++ b/src/lib/rpc/svc_tcp.c
@@ -43,15 +43,10 @@ static char sccsid[] = "@(#)svc_tcp.c 1.21 87/08/11 Copyr 1984 Sun Micro";
* and a record/tcp stream.
*/
-#include <stdio.h>
-#include <string.h>
+#include "k5-platform.h"
#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
-#include <errno.h>
-#include <stdlib.h>
-#include "autoconf.h"
-#include "k5-platform.h" /* set_cloexec_fd */
#include <port-sockets.h>
#include <socket-utils.h>
/*extern bool_t abort();
diff --git a/src/lib/rpc/svc_udp.c b/src/lib/rpc/svc_udp.c
index 9280061..f70bf01 100644
--- a/src/lib/rpc/svc_udp.c
+++ b/src/lib/rpc/svc_udp.c
@@ -41,19 +41,15 @@ static char sccsid[] = "@(#)svc_udp.c 1.24 87/08/11 Copyr 1984 Sun Micro";
* achieving execute-at-most-once semantics.)
*/
-#include <stdio.h>
-#include <string.h>
+#include "k5-platform.h"
#include <unistd.h>
#include <gssrpc/rpc.h>
#include <sys/socket.h>
-#include <errno.h>
-#include "autoconf.h"
#ifdef HAVE_SYS_UIO_H
#include <sys/uio.h>
#endif
#include <port-sockets.h>
#include <socket-utils.h>
-#include "k5-platform.h"
#ifndef GETSOCKNAME_ARG3_TYPE
diff --git a/src/lib/rpc/unit-test/client.c b/src/lib/rpc/unit-test/client.c
index 646477f..06b0863 100644
--- a/src/lib/rpc/unit-test/client.c
+++ b/src/lib/rpc/unit-test/client.c
@@ -5,11 +5,11 @@
*
*/
+#include "autoconf.h"
#include <stdio.h>
#include <string.h>
#include <netdb.h>
#include <sys/socket.h>
-#include "autoconf.h"
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif