From 940e8da090162b9fd879ead7654e5cdcf37c15c6 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Mon, 26 Mar 1990 13:31:15 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@410 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/free/Imakefile | 49 ++++++++++++++++++++++++++++++++++ src/lib/krb5/free/f_address.c | 34 +++++++++++++++++++++++ src/lib/krb5/free/f_ap_rep.c | 29 ++++++++++++++++++++ src/lib/krb5/free/f_ap_req.c | 31 +++++++++++++++++++++ src/lib/krb5/free/f_authdata.c | 31 +++++++++++++++++++++ src/lib/krb5/free/f_authent.c | 31 +++++++++++++++++++++ src/lib/krb5/free/f_cksum.c | 29 ++++++++++++++++++++ src/lib/krb5/free/f_enc_kdc.c | 35 ++++++++++++++++++++++++ src/lib/krb5/free/f_enc_tkt.c | 37 +++++++++++++++++++++++++ src/lib/krb5/free/f_error.c | 33 +++++++++++++++++++++++ src/lib/krb5/free/f_kdc_rep.c | 35 ++++++++++++++++++++++++ src/lib/krb5/free/f_keyblock.c | 29 ++++++++++++++++++++ src/lib/krb5/free/f_last_req.c | 31 +++++++++++++++++++++ src/lib/krb5/free/f_princ.c | 31 +++++++++++++++++++++ src/lib/krb5/free/f_priv.c | 29 ++++++++++++++++++++ src/lib/krb5/free/f_priv_enc.c | 31 +++++++++++++++++++++ src/lib/krb5/free/f_safe.c | 33 +++++++++++++++++++++++ src/lib/krb5/free/f_ticket.c | 31 +++++++++++++++++++++ 18 files changed, 589 insertions(+) create mode 100644 src/lib/krb5/free/Imakefile create mode 100644 src/lib/krb5/free/f_address.c create mode 100644 src/lib/krb5/free/f_ap_rep.c create mode 100644 src/lib/krb5/free/f_ap_req.c create mode 100644 src/lib/krb5/free/f_authdata.c create mode 100644 src/lib/krb5/free/f_authent.c create mode 100644 src/lib/krb5/free/f_cksum.c create mode 100644 src/lib/krb5/free/f_enc_kdc.c create mode 100644 src/lib/krb5/free/f_enc_tkt.c create mode 100644 src/lib/krb5/free/f_error.c create mode 100644 src/lib/krb5/free/f_kdc_rep.c create mode 100644 src/lib/krb5/free/f_keyblock.c create mode 100644 src/lib/krb5/free/f_last_req.c create mode 100644 src/lib/krb5/free/f_princ.c create mode 100644 src/lib/krb5/free/f_priv.c create mode 100644 src/lib/krb5/free/f_priv_enc.c create mode 100644 src/lib/krb5/free/f_safe.c create mode 100644 src/lib/krb5/free/f_ticket.c diff --git a/src/lib/krb5/free/Imakefile b/src/lib/krb5/free/Imakefile new file mode 100644 index 000000000..ed91524c2 --- /dev/null +++ b/src/lib/krb5/free/Imakefile @@ -0,0 +1,49 @@ +NormalLibraryObjectRule() + +OBJS= \ + f_address.o \ + f_ap_rep.o \ + f_ap_req.o \ + f_as_req.o \ + f_authdata.o \ + f_authent.o \ + f_cksum.o \ + f_enc_kdc.o \ + f_enc_tkt.o \ + f_error.o \ + f_kdc_rep.o \ + f_keyblock.o \ + f_last_req.o \ + f_princ.o \ + f_priv.o \ + f_priv_enc.o \ + f_real_tgs.o \ + f_safe.o \ + f_tgs_enc.o \ + f_tgs_req.o \ + f_ticket.o + +SRCS= \ + f_address.c \ + f_ap_rep.c \ + f_ap_req.c \ + f_as_req.c \ + f_authdata.c \ + f_authent.c \ + f_cksum.c \ + f_enc_kdc.c \ + f_enc_tkt.c \ + f_error.c \ + f_kdc_rep.c \ + f_keyblock.c \ + f_last_req.c \ + f_princ.c \ + f_priv.c \ + f_priv_enc.c \ + f_real_tgs.c \ + f_safe.c \ + f_tgs_enc.c \ + f_tgs_req.c \ + f_ticket.c + +NormalLibraryTarget(kfree,$(OBJS)) diff --git a/src/lib/krb5/free/f_address.c b/src/lib/krb5/free/f_address.c new file mode 100644 index 000000000..76c8994b9 --- /dev/null +++ b/src/lib/krb5/free/f_address.c @@ -0,0 +1,34 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_address() + */ + +#if !defined(lint) && !defined(SABER) +static char f_address_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_address(val) +krb5_address **val; +{ + register krb5_address **temp; + + for (temp = val; *temp; temp++) { + if ((*temp)->contents) + xfree((*temp)->contents); + xfree(*temp); + } + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_ap_rep.c b/src/lib/krb5/free/f_ap_rep.c new file mode 100644 index 000000000..9b18b3bd3 --- /dev/null +++ b/src/lib/krb5/free/f_ap_rep.c @@ -0,0 +1,29 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_ap_rep() + */ + +#if !defined(lint) && !defined(SABER) +static char f_ap_rep_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_ap_rep(val) +register krb5_ap_rep *val; +{ + if (val->enc_part.data) + xfree(val->enc_part.data); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_ap_req.c b/src/lib/krb5/free/f_ap_req.c new file mode 100644 index 000000000..73ec495b6 --- /dev/null +++ b/src/lib/krb5/free/f_ap_req.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_ap_req() + */ + +#if !defined(lint) && !defined(SABER) +static char f_ap_req_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_ap_req(val) +register krb5_ap_req *val; +{ + if (val->ticket) + krb5_free_ticket(val->ticket); + if (val->authenticator.data) + xfree(val->authenticator.data); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_authdata.c b/src/lib/krb5/free/f_authdata.c new file mode 100644 index 000000000..f7827c133 --- /dev/null +++ b/src/lib/krb5/free/f_authdata.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_authdata() + */ + +#if !defined(lint) && !defined(SABER) +static char f_authdata_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_authdata(val) +krb5_authdata **val; +{ + register krb5_authdata **temp; + + for (temp = val; *temp; temp++) + xfree(*temp); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_authent.c b/src/lib/krb5/free/f_authent.c new file mode 100644 index 000000000..ef23dc099 --- /dev/null +++ b/src/lib/krb5/free/f_authent.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_authenticator() + */ + +#if !defined(lint) && !defined(SABER) +static char f_authent_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_authenticator(val) +krb5_authenticator *val; +{ + if (val->checksum) + xfree(val->checksum); + if (val->client) + krb5_free_principal(val->client); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_cksum.c b/src/lib/krb5/free/f_cksum.c new file mode 100644 index 000000000..70ece9127 --- /dev/null +++ b/src/lib/krb5/free/f_cksum.c @@ -0,0 +1,29 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_checksum() + */ + +#if !defined(lint) && !defined(SABER) +static char f_cksum_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_checksum(val) +register krb5_checksum *val; +{ + if (val->contents) + xfree(val->contents); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_enc_kdc.c b/src/lib/krb5/free/f_enc_kdc.c new file mode 100644 index 000000000..8589d38dc --- /dev/null +++ b/src/lib/krb5/free/f_enc_kdc.c @@ -0,0 +1,35 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_enc_kdc_rep_part() + */ + +#if !defined(lint) && !defined(SABER) +static char f_enc_kdc_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_enc_kdc_rep_part(val) +register krb5_enc_kdc_rep_part *val; +{ + if (val->session) + krb5_free_keyblock(val->session); + if (val->last_req) + krb5_free_last_req(val->last_req); + if (val->server) + krb5_free_principal(val->server); + if (val->caddrs) + krb5_free_address(val->caddrs); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_enc_tkt.c b/src/lib/krb5/free/f_enc_tkt.c new file mode 100644 index 000000000..5a0c66690 --- /dev/null +++ b/src/lib/krb5/free/f_enc_tkt.c @@ -0,0 +1,37 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_enc_tkt_part() + */ + +#if !defined(lint) && !defined(SABER) +static char f_enc_tkt_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_enc_tkt_part(val) +krb5_enc_tkt_part *val; +{ + if (val->session) + krb5_free_keyblock(val->session); + if (val->client) + krb5_free_principal(val->client); + if (val->transited.data) + xfree(val->transited.data); + if (val->caddrs) + krb5_free_address(val->caddrs); + if (val->authorization_data) + krb5_free_authdata(val->authorization_data); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_error.c b/src/lib/krb5/free/f_error.c new file mode 100644 index 000000000..c565f8756 --- /dev/null +++ b/src/lib/krb5/free/f_error.c @@ -0,0 +1,33 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_error() + */ + +#if !defined(lint) && !defined(SABER) +static char f_error_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_error(val) +register krb5_error *val; +{ + if (val->client) + krb5_free_principal(val->client); + if (val->server) + krb5_free_principal(val->server); + if (val->text.data) + xfree(val->text.data); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_kdc_rep.c b/src/lib/krb5/free/f_kdc_rep.c new file mode 100644 index 000000000..3903c33c7 --- /dev/null +++ b/src/lib/krb5/free/f_kdc_rep.c @@ -0,0 +1,35 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_kdc_rep() + */ + +#if !defined(lint) && !defined(SABER) +static char f_kdc_rep_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_kdc_rep(val) +krb5_kdc_rep *val; +{ + if (val->client) + krb5_free_principal(val->client); + if (val->ticket) + krb5_free_ticket(val->ticket); + if (val->enc_part.data) + xfree(val->enc_part.data); + if (val->enc_part2) + krb5_free_enc_kdc_rep_part(val->enc_part2); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_keyblock.c b/src/lib/krb5/free/f_keyblock.c new file mode 100644 index 000000000..61f88e0fc --- /dev/null +++ b/src/lib/krb5/free/f_keyblock.c @@ -0,0 +1,29 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_keyblock() + */ + +#if !defined(lint) && !defined(SABER) +static char f_keyblock_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_keyblock(val) +register krb5_keyblock *val; +{ + if (val->contents) + xfree(val->contents); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_last_req.c b/src/lib/krb5/free/f_last_req.c new file mode 100644 index 000000000..d7f4ad6e4 --- /dev/null +++ b/src/lib/krb5/free/f_last_req.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_last_req() + */ + +#if !defined(lint) && !defined(SABER) +static char f_last_req_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_last_req(val) +krb5_last_req_entry **val; +{ + register krb5_last_req_entry **temp; + + for (temp = val; *temp; temp++) + xfree(*temp); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_princ.c b/src/lib/krb5/free/f_princ.c new file mode 100644 index 000000000..0a73c6ce2 --- /dev/null +++ b/src/lib/krb5/free/f_princ.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_principal() + */ + +#if !defined(lint) && !defined(SABER) +static char f_princ_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_principal(val) +krb5_principal val; +{ + register krb5_data **temp; + + for (temp = val; *temp; temp++) + krb5_free_data(*temp); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_priv.c b/src/lib/krb5/free/f_priv.c new file mode 100644 index 000000000..a0265ac4f --- /dev/null +++ b/src/lib/krb5/free/f_priv.c @@ -0,0 +1,29 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_priv() + */ + +#if !defined(lint) && !defined(SABER) +static char f_priv_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_priv(val) +register krb5_priv *val; +{ + if (val->enc_part.data) + xfree(val->enc_part.data); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_priv_enc.c b/src/lib/krb5/free/f_priv_enc.c new file mode 100644 index 000000000..a1664a0a7 --- /dev/null +++ b/src/lib/krb5/free/f_priv_enc.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_priv_enc_part() + */ + +#if !defined(lint) && !defined(SABER) +static char f_priv_enc_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_priv_enc_part(val) +register krb5_priv_enc_part *val; +{ + if (val->user_data.data) + xfree(val->user_data.data); + if (val->addresses) + krb5_free_address(val->addresses); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_safe.c b/src/lib/krb5/free/f_safe.c new file mode 100644 index 000000000..66b4acfb9 --- /dev/null +++ b/src/lib/krb5/free/f_safe.c @@ -0,0 +1,33 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_safe() + */ + +#if !defined(lint) && !defined(SABER) +static char f_safe_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_safe(val) +register krb5_safe *val; +{ + if (val->user_data.data) + xfree(val->user_data.data); + if (val->addresses) + krb5_free_address(val->addresses); + if (val->checksum) + krb5_free_checksum(val->checksum); + xfree(val); + return; +} diff --git a/src/lib/krb5/free/f_ticket.c b/src/lib/krb5/free/f_ticket.c new file mode 100644 index 000000000..599935516 --- /dev/null +++ b/src/lib/krb5/free/f_ticket.c @@ -0,0 +1,31 @@ +/* + * $Source$ + * $Author$ + * + * Copyright 1990 by the Massachusetts Institute of Technology. + * + * For copying and distribution information, please see the file + * . + * + * krb5_free_ticket() + */ + +#if !defined(lint) && !defined(SABER) +static char f_ticket_c [] = +"$Id$"; +#endif /* !lint & !SABER */ + +#include +#include + +void +krb5_free_ticket(val) +krb5_ticket *val; +{ + if (val->enc_part.data) + xfree(val->enc_part.data); + if (val->enc_part2) + krb5_free_enc_tkt_part(val->enc_part2); + xfree(val); + return; +} -- 2.26.2