From 542ab506f2269189d3e8b316f34744e7615683e1 Mon Sep 17 00:00:00 2001 From: Mark Eichin Date: Wed, 28 Jun 1995 21:37:32 +0000 Subject: [PATCH] * test.c, k524init.c, getcred.c: rewrote for old style definitiions. * encode.c: use PROTOTYPE instead of KRB5_PROTOTYPE. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6193 dc483132-0cff-0310-8789-dd5450dbe970 --- src/krb524/ChangeLog | 5 +++++ src/krb524/encode.c | 18 ++++++++--------- src/krb524/getcred.c | 4 +++- src/krb524/k524init.c | 4 +++- src/krb524/test.c | 47 +++++++++++++++++++++++++++++++------------ 5 files changed, 54 insertions(+), 24 deletions(-) diff --git a/src/krb524/ChangeLog b/src/krb524/ChangeLog index 0789f3f64..3306ba4c7 100644 --- a/src/krb524/ChangeLog +++ b/src/krb524/ChangeLog @@ -1,3 +1,8 @@ +Wed Jun 28 17:32:51 1995 Mark Eichin + + * test.c, k524init.c, getcred.c: rewrote for old style definitiions. + * encode.c: use PROTOTYPE instead of KRB5_PROTOTYPE. + Wed Jun 28 03:04:38 1995 Mark Eichin * krb524d.c: changed main, krb5_free_keyblock_contents to use old diff --git a/src/krb524/encode.c b/src/krb524/encode.c index b45f361c0..cb8606d25 100644 --- a/src/krb524/encode.c +++ b/src/krb524/encode.c @@ -38,15 +38,15 @@ * the wheel is hidden. */ -int encode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, int *)), - encode_ktext KRB5_PROTOTYPE((char **, int *, KTEXT_ST *)), - encode_bytes KRB5_PROTOTYPE((char **, int *, char *, int)), - encode_int32 KRB5_PROTOTYPE((char **, int *, krb5_int32 *)); - -int decode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, int *)), - decode_ktext KRB5_PROTOTYPE((char **, int *, KTEXT_ST *)), - decode_bytes KRB5_PROTOTYPE((char **, int *, char *, int)), - decode_int32 KRB5_PROTOTYPE((char **, int *, krb5_int32 *)); +int encode_v4tkt PROTOTYPE((KTEXT_ST *, char *, int *)), + encode_ktext PROTOTYPE((char **, int *, KTEXT_ST *)), + encode_bytes PROTOTYPE((char **, int *, char *, int)), + encode_int32 PROTOTYPE((char **, int *, int32 *)); + +int decode_v4tkt PROTOTYPE((KTEXT_ST *, char *, int *)), + decode_ktext PROTOTYPE((char **, int *, KTEXT_ST *)), + decode_bytes PROTOTYPE((char **, int *, char *, int)), + decode_int32 PROTOTYPE((char **, int *, krb5_int32 *)); int encode_bytes(out, outlen, in, len) char **out; diff --git a/src/krb524/getcred.c b/src/krb524/getcred.c index a896381e8..de591f504 100644 --- a/src/krb524/getcred.c +++ b/src/krb524/getcred.c @@ -24,7 +24,9 @@ #include "krb5.h" #include -main(int argc, char **argv) +main(argc, argv) + int argc; + char **argv; { krb5_principal client, server; krb5_ccache cc; diff --git a/src/krb524/k524init.c b/src/krb524/k524init.c index 25cdafaaa..a4aa2101c 100644 --- a/src/krb524/k524init.c +++ b/src/krb524/k524init.c @@ -39,7 +39,9 @@ extern int optind; extern char *optarg; -int main(int argc, char **argv) +int main(argc, argv) + int argc; + char **argv; { krb5_principal client, server; krb5_ccache cc; diff --git a/src/krb524/test.c b/src/krb524/test.c index 138e18019..f6d8c8238 100644 --- a/src/krb524/test.c +++ b/src/krb524/test.c @@ -43,19 +43,25 @@ void do_local(krb5_creds *, krb5_keyblock *), do_remote(krb5_context, krb5_creds *, char *, krb5_keyblock *); -void print_key(char *msg, char *key) +void print_key(msg, key) + char *msg; + char *key; { printf("%s: ", msg); C_Block_print(key); printf("\n"); } -void print_time(char *msg, int t) +void print_time(msg, t) + char *msg; + int t; { printf("%s: %d, %s", msg, t, ctime((time_t *) &t)); } -void krb5_print_times(char *msg, krb5_ticket_times *t) +void krb5_print_times(msg, t) + char *msg; + krb5_ticket_times *t; { printf("%s: Start: %d, %s", msg, t->starttime, ctime((time_t *) &t->starttime)); @@ -67,7 +73,9 @@ void krb5_print_times(char *msg, krb5_ticket_times *t) ctime((time_t *) &t->renew_till)); } -void krb5_print_keyblock(char *msg, krb5_keyblock *key) +void krb5_print_keyblock(msg, key) + char *msg; + krb5_keyblock *key; { printf("%s: Keytype: %d\n", msg, key->keytype); printf("%s: Length: %d\n", msg, key->length); @@ -76,8 +84,10 @@ void krb5_print_keyblock(char *msg, krb5_keyblock *key) printf("\n"); } -void krb5_print_ticket(krb5_context context, krb5_data *ticket_data, - krb5_keyblock *key) +void krb5_print_ticket(context, ticket_data, key) + krb5_context context; + krb5_data *ticket_data; + krb5_keyblock *key; { char *p; krb5_ticket *tkt; @@ -110,8 +120,10 @@ void krb5_print_ticket(krb5_context context, krb5_data *ticket_data, krb5_free_ticket(context, tkt); } -void krb5_print_creds(krb5_context context, krb5_creds *creds, - krb5_keyblock *secret_key) +void krb5_print_creds(context, creds, secret_key) + krb5_context context; + krb5_creds *creds; + krb5_keyblock *secret_key; { char *p; @@ -130,7 +142,9 @@ void krb5_print_creds(krb5_context context, krb5_creds *creds, /* krb5_print_ticket(context, &creds->second_ticket, secret_key); */ } -void krb4_print_ticket(KTEXT ticket, krb5_keyblock *secret_key) +void krb4_print_ticket(ticket, secret_key) + KTEXT ticket; + krb5_keyblock *secret_key; { char pname[ANAME_SZ], pinst[INST_SZ], prealm[REALM_SZ]; char sname[ANAME_SZ], sinst[INST_SZ]; @@ -164,7 +178,9 @@ void krb4_print_ticket(KTEXT ticket, krb5_keyblock *secret_key) &issue_time)); } -void krb4_print_creds(CREDENTIALS *creds, krb5_keyblock *secret_key) +void krb4_print_creds(creds, secret_key) + CREDENTIALS *creds; + krb5_keyblock *secret_key' { printf("Client: %s.%s@%s\n", creds->pname, creds->pinst, creds->realm); @@ -183,7 +199,9 @@ void usage() exit(1); } -int main(int argc, char **argv) +int main(argc, argv) + int argc; + char **argv; { krb5_principal client, server; krb5_ccache cc; @@ -271,8 +289,11 @@ int main(int argc, char **argv) exit(0); } -void do_remote(krb5_context context, krb5_creds *v5creds, char *server, - krb5_keyblock *key) +void do_remote(context, v5creds, server, key) + krb5_context context; + krb5_creds *v5creds; + char *server; + krb5_keyblock *key; { struct sockaddr_in saddr; struct hostent *hp; -- 2.26.2