From a0490b297ecdffb8a8b6f9f28dfc6c79272fa64a Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sun, 1 Jul 2001 11:45:10 +0000 Subject: [PATCH] * tcl_kadm5.h: File with prototypes for Tcl_kadm5_init and Tcl_ovsec_kadm_init. * tcl_kadm5.c: Include tcl_kadm5.h. Declare tcl_kadm5_{rename,chpass,get}_principal, tcl_kadm5_chpass_principal_util, tcl_kadm5_randkey_principal, tcl_kadm5_{create,delete,modify,get}_policy, tcl_kadm5_free_{principal,policy}_ent, tcl_kadm5_get_privs as static. * test.c, tcl_ovsec_kadm.c: Include tcl_kadm5.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13538 dc483132-0cff-0310-8789-dd5450dbe970 --- src/kadmin/testing/util/ChangeLog | 13 ++++++ src/kadmin/testing/util/tcl_kadm5.c | 58 +++++++++++++----------- src/kadmin/testing/util/tcl_kadm5.h | 4 ++ src/kadmin/testing/util/tcl_ovsec_kadm.c | 1 + src/kadmin/testing/util/test.c | 5 +- 5 files changed, 50 insertions(+), 31 deletions(-) create mode 100644 src/kadmin/testing/util/tcl_kadm5.h diff --git a/src/kadmin/testing/util/ChangeLog b/src/kadmin/testing/util/ChangeLog index 6fcb79c8e..fc74237e9 100644 --- a/src/kadmin/testing/util/ChangeLog +++ b/src/kadmin/testing/util/ChangeLog @@ -1,3 +1,16 @@ +2001-07-01 Ezra Peisach + + * tcl_kadm5.h: File with prototypes for Tcl_kadm5_init and + Tcl_ovsec_kadm_init. + + * tcl_kadm5.c: Include tcl_kadm5.h. Declare + tcl_kadm5_{rename,chpass,get}_principal, + tcl_kadm5_chpass_principal_util, tcl_kadm5_randkey_principal, + tcl_kadm5_{create,delete,modify,get}_policy, + tcl_kadm5_free_{principal,policy}_ent, tcl_kadm5_get_privs as static. + + * test.c, tcl_ovsec_kadm.c: Include tcl_kadm5.h. + 2001-06-08 Ezra Peisach * tcl_kadm5.c: Cleanup assignments in conditionals. diff --git a/src/kadmin/testing/util/tcl_kadm5.c b/src/kadmin/testing/util/tcl_kadm5.c index 73ddd31d4..9e0e2ea25 100644 --- a/src/kadmin/testing/util/tcl_kadm5.c +++ b/src/kadmin/testing/util/tcl_kadm5.c @@ -11,6 +11,7 @@ #include #include #include +#include "tcl_kadm5.h" struct flagval { char *name; @@ -1821,8 +1822,9 @@ finished: } -int tcl_kadm5_rename_principal(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_rename_principal(ClientData clientData, + Tcl_Interp *interp, + int argc, char *argv[]) { krb5_principal source, target; krb5_error_code krb5_ret; @@ -1861,8 +1863,9 @@ int tcl_kadm5_rename_principal(ClientData clientData, Tcl_Interp *interp, -int tcl_kadm5_chpass_principal(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_chpass_principal(ClientData clientData, + Tcl_Interp *interp, + int argc, char *argv[]) { krb5_principal princ; char *pw; @@ -1918,9 +1921,9 @@ finished: -int tcl_kadm5_chpass_principal_util(ClientData clientData, - Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_chpass_principal_util(ClientData clientData, + Tcl_Interp *interp, + int argc, char *argv[]) { krb5_principal princ; char *new_pw; @@ -2005,8 +2008,9 @@ finished: -int tcl_kadm5_randkey_principal(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_randkey_principal(ClientData clientData, + Tcl_Interp *interp, + int argc, char *argv[]) { krb5_principal princ; krb5_keyblock *keyblocks; @@ -2079,8 +2083,8 @@ finished: -int tcl_kadm5_get_principal(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_get_principal(ClientData clientData, Tcl_Interp *interp, + int argc, char *argv[]) { krb5_principal princ; kadm5_principal_ent_rec ent; @@ -2153,8 +2157,8 @@ finished: return retcode; } -int tcl_kadm5_create_policy(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_create_policy(ClientData clientData, Tcl_Interp *interp, + int argc, char *argv[]) { int tcl_ret; kadm5_ret_t ret; @@ -2201,8 +2205,8 @@ finished: -int tcl_kadm5_delete_policy(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_delete_policy(ClientData clientData, Tcl_Interp *interp, + int argc, char *argv[]) { kadm5_ret_t ret; char *policy; @@ -2229,8 +2233,8 @@ int tcl_kadm5_delete_policy(ClientData clientData, Tcl_Interp *interp, -int tcl_kadm5_modify_policy(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_modify_policy(ClientData clientData, Tcl_Interp *interp, + int argc, char *argv[]) { char *policy_string; kadm5_policy_ent_t policy = 0; @@ -2275,8 +2279,8 @@ finished: } -int tcl_kadm5_get_policy(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_get_policy(ClientData clientData, Tcl_Interp *interp, + int argc, char *argv[]) { kadm5_policy_ent_rec ent; Tcl_DString *ent_dstring = 0; @@ -2334,9 +2338,9 @@ finished: -int tcl_kadm5_free_principal_ent(ClientData clientData, - Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_free_principal_ent(ClientData clientData, + Tcl_Interp *interp, + int argc, char *argv[]) { char *ent_name; kadm5_principal_ent_t ent; @@ -2391,9 +2395,9 @@ int tcl_kadm5_free_principal_ent(ClientData clientData, } -int tcl_kadm5_free_policy_ent(ClientData clientData, - Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_free_policy_ent(ClientData clientData, + Tcl_Interp *interp, + int argc, char *argv[]) { char *ent_name; kadm5_policy_ent_t ent; @@ -2447,8 +2451,8 @@ int tcl_kadm5_free_policy_ent(ClientData clientData, } -int tcl_kadm5_get_privs(ClientData clientData, Tcl_Interp *interp, - int argc, char *argv[]) +static int tcl_kadm5_get_privs(ClientData clientData, Tcl_Interp *interp, + int argc, char *argv[]) { int tcl_ret; char *set_ret; diff --git a/src/kadmin/testing/util/tcl_kadm5.h b/src/kadmin/testing/util/tcl_kadm5.h new file mode 100644 index 000000000..7e237753a --- /dev/null +++ b/src/kadmin/testing/util/tcl_kadm5.h @@ -0,0 +1,4 @@ + +void Tcl_kadm5_init(Tcl_Interp *interp); +void Tcl_ovsec_kadm_init(Tcl_Interp *interp); + diff --git a/src/kadmin/testing/util/tcl_ovsec_kadm.c b/src/kadmin/testing/util/tcl_ovsec_kadm.c index 6fe3d2f4f..b8a39bde2 100644 --- a/src/kadmin/testing/util/tcl_ovsec_kadm.c +++ b/src/kadmin/testing/util/tcl_ovsec_kadm.c @@ -11,6 +11,7 @@ #include #include #include +#include "tcl_kadm5.h" struct flagval { char *name; diff --git a/src/kadmin/testing/util/test.c b/src/kadmin/testing/util/test.c index 1627b113c..dabd927d0 100644 --- a/src/kadmin/testing/util/test.c +++ b/src/kadmin/testing/util/test.c @@ -3,6 +3,7 @@ #elif HAVE_TCL_TCL_H #include #endif +#include "tcl_kadm5.h" #define _TCL_MAIN ((TCL_MAJOR_VERSION * 100 + TCL_MINOR_VERSION) >= 704) @@ -27,10 +28,6 @@ extern int main(); int *tclDummyMainPtr = (int *) main; #endif -/* No header files... sigh... */ -extern void Tcl_ovsec_kadm_init(Tcl_Interp *interp); -extern void Tcl_kadm5_init(Tcl_Interp *interp); - int Tcl_AppInit(Tcl_Interp *interp) { Tcl_ovsec_kadm_init(interp); -- 2.26.2