From 852b8d4be02283bb44b5c8ff676a81fd0014c17a Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 18 Nov 2005 01:22:06 +0000 Subject: [PATCH] Fix additional cases where krb5.h is included before k5-int.h. In most cases, it suffices to remove the inclusion of k5-int.h, sometimes including errno.h or another header. In a couple cases, include order has been changed, or k5-int.h has been included instead of krb5.h. ticket: 3236 status: resolved git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17494 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/cli/ChangeLog | 5 +++++ src/kadmin/cli/kadmin.c | 2 +- src/kadmin/cli/keytab.c | 1 + src/kadmin/testing/util/ChangeLog | 4 ++++ src/kadmin/testing/util/tcl_kadm5.c | 1 - src/kadmin/testing/util/tcl_ovsec_kadm.c | 1 - src/krb524/ChangeLog | 4 ++++ src/krb524/krb524d.c | 2 +- src/lib/kadm5/ChangeLog | 6 ++++++ src/lib/kadm5/admin.h | 2 +- src/lib/kadm5/clnt/ChangeLog | 6 ++++++ src/lib/kadm5/clnt/client_init.c | 2 +- src/lib/kadm5/clnt/client_principal.c | 1 + src/lib/kadm5/clnt/clnt_policy.c | 1 + src/lib/kadm5/clnt/err_handle.h | 3 ++- src/lib/kadm5/kadm_rpc_xdr.c | 2 +- src/lib/kadm5/server_internal.h | 5 +++-- src/lib/kadm5/srv/ChangeLog | 4 ++++ src/lib/kadm5/srv/server_init.c | 1 + src/lib/kadm5/srv/svr_policy.c | 1 + src/lib/kadm5/srv/svr_principal.c | 2 +- src/lib/kadm5/unit-test/ChangeLog | 4 ++++ src/lib/kadm5/unit-test/setkey-test.c | 2 +- src/modules/kdb/db2/ChangeLog | 4 ++++ src/modules/kdb/db2/policy_db.h | 3 ++- src/tests/asn.1/ChangeLog | 5 +++++ src/tests/asn.1/utility.c | 2 +- src/tests/asn.1/utility.h | 1 - 28 files changed, 62 insertions(+), 15 deletions(-) diff --git a/src/kadmin/cli/ChangeLog b/src/kadmin/cli/ChangeLog index 2cb7b032c..8c2cda9fc 100644 --- a/src/kadmin/cli/ChangeLog +++ b/src/kadmin/cli/ChangeLog @@ -1,3 +1,8 @@ +2005-11-17 Ken Raeburn + + * kadmin.c: Include errno.h instead of k5-int.h. + * keytab.c: Include errno.h. + 2005-06-20 Ken Raeburn * Makefile.in (KDB_DEP_LIB): Use DL_LIB and THREAD_LINKOPTS diff --git a/src/kadmin/cli/kadmin.c b/src/kadmin/cli/kadmin.c index b4a0ee708..7af39a661 100644 --- a/src/kadmin/cli/kadmin.c +++ b/src/kadmin/cli/kadmin.c @@ -26,9 +26,9 @@ */ #include -#include #include #include +#include #include #include #include diff --git a/src/kadmin/cli/keytab.c b/src/kadmin/cli/keytab.c index 49fdc20b8..77034fedd 100644 --- a/src/kadmin/cli/keytab.c +++ b/src/kadmin/cli/keytab.c @@ -38,6 +38,7 @@ static char *rcsid = "$Header$"; #include #include #include +#include #include #include diff --git a/src/kadmin/testing/util/ChangeLog b/src/kadmin/testing/util/ChangeLog index 6101c09c7..ad3aff92c 100644 --- a/src/kadmin/testing/util/ChangeLog +++ b/src/kadmin/testing/util/ChangeLog @@ -1,3 +1,7 @@ +2005-11-17 Ken Raeburn + + * tcl_kadm5.c, tcl_ovsec_kadm.c: Don't include k5-int.h. + 2005-06-20 Ken Raeburn * Makefile.in (KDB_DEP_LIB): Use THREAD_LINKOPTS instead of diff --git a/src/kadmin/testing/util/tcl_kadm5.c b/src/kadmin/testing/util/tcl_kadm5.c index 828f207a6..3907efdf0 100644 --- a/src/kadmin/testing/util/tcl_kadm5.c +++ b/src/kadmin/testing/util/tcl_kadm5.c @@ -8,7 +8,6 @@ #define USE_KADM5_API_VERSION 2 #include #include -#include #include #include #include diff --git a/src/kadmin/testing/util/tcl_ovsec_kadm.c b/src/kadmin/testing/util/tcl_ovsec_kadm.c index 9aaa85023..68eb3f7f8 100644 --- a/src/kadmin/testing/util/tcl_ovsec_kadm.c +++ b/src/kadmin/testing/util/tcl_ovsec_kadm.c @@ -8,7 +8,6 @@ #define USE_KADM5_API_VERSION 1 #include #include -#include #include #include #include "tcl_kadm5.h" diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index a8644ed90..9bf6ff104 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,7 @@ +2005-11-17 Ken Raeburn + + * krb524d.c: Include k5-int.h instead of krb5.h. + 2005-06-20 Ken Raeburn * Makefile.in (KDB_DEP_LIB): Use DL_LIB and THREAD_LINKOPTS diff --git a/src/krb524/krb524d.c b/src/krb524/krb524d.c index f126641b4..7572af419 100644 --- a/src/krb524/krb524d.c +++ b/src/krb524/krb524d.c @@ -41,7 +41,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -#include +#include #include #include #include diff --git a/src/lib/kadm5/ChangeLog b/src/lib/kadm5/ChangeLog index 0f910962b..15bdaca53 100644 --- a/src/lib/kadm5/ChangeLog +++ b/src/lib/kadm5/ChangeLog @@ -1,3 +1,9 @@ +2005-11-17 Ken Raeburn + + * admin.h: Include kdb.h instead of k5-int.h. + * kadm_rpc_xdr.c, server_internal.h: Include errno.h instead of + k5-int.h. + 2005-08-20 Ken Raeburn * configure.in: Use K5_AC_INIT instead of AC_INIT. diff --git a/src/lib/kadm5/admin.h b/src/lib/kadm5/admin.h index a70e90b4e..3ce01c7f3 100644 --- a/src/lib/kadm5/admin.h +++ b/src/lib/kadm5/admin.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/lib/kadm5/clnt/ChangeLog b/src/lib/kadm5/clnt/ChangeLog index c3c2057a3..424272772 100644 --- a/src/lib/kadm5/clnt/ChangeLog +++ b/src/lib/kadm5/clnt/ChangeLog @@ -1,3 +1,9 @@ +2005-11-17 Ken Raeburn + + * client_principal.c, clnt_policy.c: Include errno.h. + * client_init.c: Include k5-int.h before krb5.h. + * err_handle.h: Include com_err.h and krb5.h instead of k5-int.h. + 2005-10-13 Ken Raeburn * libkadm5clnt.exports: Don't export internal error-table diff --git a/src/lib/kadm5/clnt/client_init.c b/src/lib/kadm5/clnt/client_init.c index 248d3a3ce..a4e313628 100644 --- a/src/lib/kadm5/clnt/client_init.c +++ b/src/lib/kadm5/clnt/client_init.c @@ -38,8 +38,8 @@ #include #include #include -#include #include /* for KRB5_ADM_DEFAULT_PORT */ +#include #ifdef __STDC__ #include #endif diff --git a/src/lib/kadm5/clnt/client_principal.c b/src/lib/kadm5/clnt/client_principal.c index 9816dd971..735d2bfc9 100644 --- a/src/lib/kadm5/clnt/client_principal.c +++ b/src/lib/kadm5/clnt/client_principal.c @@ -14,6 +14,7 @@ static char *rcsid = "$Header$"; #ifdef HAVE_MEMORY_H #include #endif +#include #include "client_internal.h" #include "err_handle.h" diff --git a/src/lib/kadm5/clnt/clnt_policy.c b/src/lib/kadm5/clnt/clnt_policy.c index f9fdee40a..b1157d1e7 100644 --- a/src/lib/kadm5/clnt/clnt_policy.c +++ b/src/lib/kadm5/clnt/clnt_policy.c @@ -14,6 +14,7 @@ static char *rcsid = "$Header$"; #include "client_internal.h" #include #include +#include #include "err_handle.h" kadm5_ret_t diff --git a/src/lib/kadm5/clnt/err_handle.h b/src/lib/kadm5/clnt/err_handle.h index 4215e1496..7dea7b608 100644 --- a/src/lib/kadm5/clnt/err_handle.h +++ b/src/lib/kadm5/clnt/err_handle.h @@ -9,7 +9,8 @@ **********************************************************************/ #ifndef _idc_sec_1_err_handle_h_H #define _idc_sec_1_err_handle_h_H -#include +#include +#include /* Everything else goes here */ diff --git a/src/lib/kadm5/kadm_rpc_xdr.c b/src/lib/kadm5/kadm_rpc_xdr.c index f7090bdcf..346a36ea9 100644 --- a/src/lib/kadm5/kadm_rpc_xdr.c +++ b/src/lib/kadm5/kadm_rpc_xdr.c @@ -4,7 +4,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/lib/kadm5/server_internal.h b/src/lib/kadm5/server_internal.h index 33d6593ac..cf4755b6d 100644 --- a/src/lib/kadm5/server_internal.h +++ b/src/lib/kadm5/server_internal.h @@ -17,7 +17,7 @@ #include #endif #include -#include "k5-int.h" +#include #include #include #include "admin_internal.h" @@ -39,7 +39,8 @@ typedef struct _osa_pw_hist_t { int n_key_data; krb5_key_data *key_data; } osa_pw_hist_ent, *osa_pw_hist_t; - typedef struct _osa_princ_ent_t { + +typedef struct _osa_princ_ent_t { int version; char *policy; long aux_attributes; diff --git a/src/lib/kadm5/srv/ChangeLog b/src/lib/kadm5/srv/ChangeLog index 4d6fdfd45..39fb06e3a 100644 --- a/src/lib/kadm5/srv/ChangeLog +++ b/src/lib/kadm5/srv/ChangeLog @@ -1,3 +1,7 @@ +2005-11-17 Ken Raeburn + + * server_init.c, svr_policy.c: Include errno.h. + 2005-10-13 Ken Raeburn * libkadm5srv.exports: Don't export internal error-table symbols, diff --git a/src/lib/kadm5/srv/server_init.c b/src/lib/kadm5/srv/server_init.c index a5369298a..dd1fe6693 100644 --- a/src/lib/kadm5/srv/server_init.c +++ b/src/lib/kadm5/srv/server_init.c @@ -11,6 +11,7 @@ static char *rcsid = "$Header$"; #include #include +#include #include #include #include diff --git a/src/lib/kadm5/srv/svr_policy.c b/src/lib/kadm5/srv/svr_policy.c index 24398c1f4..31333b73c 100644 --- a/src/lib/kadm5/srv/svr_policy.c +++ b/src/lib/kadm5/srv/svr_policy.c @@ -12,6 +12,7 @@ static char *rcsid = "$Header$"; #include #include "server_internal.h" #include +#include #define MAX_PW_HISTORY 10 #define MIN_PW_HISTORY 1 diff --git a/src/lib/kadm5/srv/svr_principal.c b/src/lib/kadm5/srv/svr_principal.c index 85b0d76e5..6cecbb5d2 100644 --- a/src/lib/kadm5/srv/svr_principal.c +++ b/src/lib/kadm5/srv/svr_principal.c @@ -10,8 +10,8 @@ static char *rcsid = "$Header$"; #include #include +#include #include -#include "k5-int.h" #include #include #include diff --git a/src/lib/kadm5/unit-test/ChangeLog b/src/lib/kadm5/unit-test/ChangeLog index 06f366fc2..f3bbd0afe 100644 --- a/src/lib/kadm5/unit-test/ChangeLog +++ b/src/lib/kadm5/unit-test/ChangeLog @@ -1,3 +1,7 @@ +2005-11-17 Ken Raeburn + + * setkey-test.c: Include k5-int.h instead of krb5.h. + 2005-10-13 Ken Raeburn * lock-test.c (main): Don't call error table initialization diff --git a/src/lib/kadm5/unit-test/setkey-test.c b/src/lib/kadm5/unit-test/setkey-test.c index af78114de..eafa039e5 100644 --- a/src/lib/kadm5/unit-test/setkey-test.c +++ b/src/lib/kadm5/unit-test/setkey-test.c @@ -1,5 +1,5 @@ #include -#include +#include #include #if HAVE_SRAND48 diff --git a/src/modules/kdb/db2/ChangeLog b/src/modules/kdb/db2/ChangeLog index 22537d4eb..0e83bcb90 100644 --- a/src/modules/kdb/db2/ChangeLog +++ b/src/modules/kdb/db2/ChangeLog @@ -1,3 +1,7 @@ +2005-11-17 Ken Raeburn + + * policy_db.h: Include errno.h and krb5.h instead of k5-int.h. + 2005-10-27 Ken Raeburn * configure.in: Set build_dynobj=yes. diff --git a/src/modules/kdb/db2/policy_db.h b/src/modules/kdb/db2/policy_db.h index 772b24d07..c3c16b9af 100644 --- a/src/modules/kdb/db2/policy_db.h +++ b/src/modules/kdb/db2/policy_db.h @@ -11,7 +11,8 @@ #ifndef __ADB_H__ #define __ADB_H__ #include -#include "k5-int.h" +#include +#include #include #include #include diff --git a/src/tests/asn.1/ChangeLog b/src/tests/asn.1/ChangeLog index cdf67b469..dbe7c3ba6 100644 --- a/src/tests/asn.1/ChangeLog +++ b/src/tests/asn.1/ChangeLog @@ -1,3 +1,8 @@ +2005-11-17 Ken Raeburn + + * utility.h: Don't include krb5.h. + * utility.c: Include utility.h before krb5.h. + 2005-06-01 Ken Raeburn * trval.c (convert_nibble): Declare the argument with a type. diff --git a/src/tests/asn.1/utility.c b/src/tests/asn.1/utility.c index 526cdce2d..660161fa1 100644 --- a/src/tests/asn.1/utility.c +++ b/src/tests/asn.1/utility.c @@ -1,5 +1,5 @@ -#include "krb5.h" #include "utility.h" +#include "krb5.h" #include #include #include diff --git a/src/tests/asn.1/utility.h b/src/tests/asn.1/utility.h index fa79258e5..4c761244f 100644 --- a/src/tests/asn.1/utility.h +++ b/src/tests/asn.1/utility.h @@ -1,7 +1,6 @@ #ifndef __UTILITY_H__ #define __UTILITY_H__ -#include "krb5.h" #include "krbasn1.h" #include "asn1buf.h" -- 2.26.2