From: John Kohl Date: Tue, 19 Feb 1991 10:10:26 +0000 (+0000) Subject: update copyright notices X-Git-Tag: krb5-1.0-alpha4~247 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cce31e4f909c503eac8e78f2e39779bb3593e979;p=krb5.git update copyright notices use xfree rather than free((char *)) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1725 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/admin/edit/dump.c b/src/admin/edit/dump.c index 234034462..fa612f0dc 100644 --- a/src/admin/edit/dump.c +++ b/src/admin/edit/dump.c @@ -1,28 +1,28 @@ /* - * $source: /afs/athena.mit.edu/astaff/project/krb5/src/admin/edit/rcs/dump.c,v $ - * $author: tytso $ + * $Source$ + * $Author$ * - * copyright 1990 by the massachusetts institute of technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * - * for copying and distribution information, please see the file + * For copying and distribution information, please see the file * . * - * dump a kdc database + * Dump a KDC database */ -#if !defined(lint) && !defined(saber) +#if !defined(lint) && !defined(SABER) static char rcsid_kdb_edit_c[] = -"$id: dump.c,v 1.6 91/01/15 18:25:41 tytso exp locker: tytso $"; +"$Id$"; #endif /* !lint & !saber */ -#include #include #include #include #include #include #include -#include /* for maxpathlen */ +#include /* for MAXPATHLEN */ #include #include @@ -269,7 +269,7 @@ void load_db(argc, argv) cleanup: free(name); free(mod_name); - free((char *)entry.key.contents); + xfree(entry.key.contents); } if (retval = krb5_db_fini()) { com_err(argv[0], retval, diff --git a/src/admin/edit/kdb5_edit.c b/src/admin/edit/kdb5_edit.c index b0b19890d..0908ea0f6 100644 --- a/src/admin/edit/kdb5_edit.c +++ b/src/admin/edit/kdb5_edit.c @@ -2,7 +2,7 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. * * For copying and distribution information, please see the file * . @@ -15,7 +15,6 @@ static char rcsid_kdb_edit_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include #include @@ -386,7 +385,7 @@ OLDDECLARG(struct saltblock *, salt) if (retval = krb5_timeofday(&newentry.mod_date)) { com_err(argv[0], retval, "while fetching date"); memset((char *)newentry.key.contents, 0, newentry.key.length); - free((char *)newentry.key.contents); + xfree(newentry.key.contents); return; } newentry.attributes = mblock.flags; @@ -402,7 +401,7 @@ OLDDECLARG(struct saltblock *, salt) retval = krb5_db_put_principal(&newentry, &one); memset((char *)newentry.key.contents, 0, newentry.key.length); - free((char *)newentry.key.contents); + xfree(newentry.key.contents); if (retval) { com_err(argv[0], retval, "while storing entry for '%s'\n", argv[1]); return; @@ -437,7 +436,7 @@ krb5_pointer infop; &master_random); memset((char *)master_keyblock.contents, 0, master_keyblock.length); - free((char *) master_keyblock.contents); + xfree(master_keyblock.contents); master_keyblock.contents = NULL; } krb5_free_principal(master_princ); @@ -525,7 +524,7 @@ char *dbname; &master_encblock)) { com_err(pname, retval, "while verifying master key"); memset((char *)master_keyblock.contents, 0, master_keyblock.length); - free((char *)master_keyblock.contents); + xfree(master_keyblock.contents); valid_master_key = 0; dbactive = TRUE; return(1); @@ -534,7 +533,7 @@ char *dbname; &master_keyblock)) { com_err(pname, retval, "while processing master key"); memset((char *)master_keyblock.contents, 0, master_keyblock.length); - free((char *)master_keyblock.contents); + xfree(master_keyblock.contents); valid_master_key = 0; dbactive = TRUE; return(1); @@ -545,7 +544,7 @@ char *dbname; com_err(pname, retval, "while initializing random key generator"); (void) krb5_finish_key(&master_encblock); memset((char *)master_keyblock.contents, 0, master_keyblock.length); - free((char *)master_keyblock.contents); + xfree(master_keyblock.contents); valid_master_key = 0; dbactive = TRUE; return(1); @@ -700,7 +699,7 @@ char *argv[]; printf("'%s' added to keytab '%s'\n", pname, ktname); memset((char *)newentry.key.contents, 0, newentry.key.length); - free((char *)newentry.key.contents); + xfree(newentry.key.contents); cleanall: krb5_db_free_principal(&dbentry, nentries); cleanmost: @@ -802,7 +801,7 @@ char *argv[]; if (key.keytype != 1) { com_err(argv[0], 0, "%s does not have a DES key!", pname); memset((char *)key.contents, 0, key.length); - free((char *)key.contents); + xfree(key.contents); continue; } fwrite(argv[i], strlen(argv[1]) + 1, 1, fout); /* p.name */ @@ -812,7 +811,7 @@ char *argv[]; fwrite((char *)key.contents, 8, 1, fout); printf("'%s' added to V4 srvtab '%s'\n", pname, ktname); memset((char *)key.contents, 0, key.length); - free((char *)key.contents); + xfree(key.contents); cleanall: krb5_db_free_principal(&dbentry, nentries); cleanmost: @@ -1121,7 +1120,7 @@ OLDDECLARG(int, salttype) add_key(argv, princ, &tempkey, ++vno, &salt); xfree(salt.saltdata.data); memset((char *)tempkey.contents, 0, tempkey.length); - free((char *)tempkey.contents); + xfree(tempkey.contents); return; } diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c index 4d4c46e23..7215c3559 100644 --- a/src/kdc/do_as_req.c +++ b/src/kdc/do_as_req.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,8 +16,6 @@ static char rcsid_do_as_req_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include - #include #include #include @@ -156,7 +155,7 @@ krb5_data **response; /* filled in with a response packet */ krb5_db_free_principal(&server, 1); \ memset((char *)session_key->contents, 0, \ session_key->length); \ - free((char *)session_key->contents); \ + xfree(session_key->contents); \ session_key->contents = 0; } @@ -252,7 +251,7 @@ krb5_data **response; /* filled in with a response packet */ } retval = krb5_encrypt_tkt_part(&encrypting_key, &ticket_reply); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - free((char *)encrypting_key.contents); + xfree(encrypting_key.contents); if (retval) { cleanup(); return retval; @@ -264,7 +263,7 @@ krb5_data **response; /* filled in with a response packet */ #define cleanup() {krb5_db_free_principal(&client, 1); \ memset((char *)session_key->contents, 0, \ session_key->length); \ - free((char *)session_key->contents); \ + xfree(session_key->contents); \ session_key->contents = 0; \ memset(ticket_reply.enc_part.ciphertext.data, 0, \ ticket_reply.enc_part.ciphertext.length); \ @@ -315,7 +314,7 @@ krb5_data **response; /* filled in with a response packet */ #define cleanup() {krb5_db_free_principal(&client, 1); \ memset((char *)session_key->contents, 0, \ session_key->length); \ - free((char *)session_key->contents); \ + xfree(session_key->contents); \ session_key->contents = 0; \ memset(ticket_reply.enc_part.ciphertext.data, 0, \ ticket_reply.enc_part.ciphertext.length); \ @@ -357,7 +356,7 @@ krb5_data **response; /* filled in with a response packet */ retval = krb5_encode_kdc_rep(KRB5_AS_REP, &reply_encpart, &encrypting_key, &reply, response); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - free((char *)encrypting_key.contents); + xfree(encrypting_key.contents); cleanup(); return retval; } diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c index 83b35e833..57e790903 100644 --- a/src/kdc/do_tgs_req.c +++ b/src/kdc/do_tgs_req.c @@ -16,8 +16,6 @@ static char rcsid_do_tgs_req_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include - #include #include #include @@ -186,7 +184,7 @@ tgt_again: #define cleanup() { krb5_db_free_principal(&server, 1); \ memset((char *)session_key->contents, 0, \ session_key->length); \ - free((char *)session_key->contents); \ + xfree(session_key->contents); \ session_key->contents = 0; } ticket_reply.server = request->server; /* XXX careful for realm... */ @@ -452,7 +450,7 @@ tgt_again: #define cleanup() { krb5_db_free_principal(&server, 1); \ memset((char *)session_key->contents, 0, \ session_key->length); \ - free((char *)session_key->contents); \ + xfree(session_key->contents); \ session_key->contents = 0; \ if (newtransited) free(enc_tkt_reply.transited.tr_contents.data);} @@ -485,7 +483,7 @@ tgt_again: retval = krb5_encrypt_tkt_part(&encrypting_key, &ticket_reply); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - free((char *)encrypting_key.contents); + xfree(encrypting_key.contents); if (retval) { tkt_cleanup(); @@ -527,7 +525,7 @@ tgt_again: header_ticket->enc_part2->session, &reply, response); memset((char *)session_key->contents, 0, session_key->length); - free((char *)session_key->contents); + xfree(session_key->contents); tkt_cleanup(); session_key->contents = 0; return retval; diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c index 00eecc813..96a3c7006 100644 --- a/src/kdc/kdc_util.c +++ b/src/kdc/kdc_util.c @@ -3,6 +3,7 @@ * $Author$ * * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_kdc_util_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include #include @@ -212,7 +212,7 @@ krb5_ticket **ticket; if (freeprinc) { krb5_db_free_principal(&server, nprincs); memset((char *)encrypting_key.contents, 0, encrypting_key.length); - free((char *)encrypting_key.contents); + xfree(encrypting_key.contents); } if (retval) { cleanup_apreq(); diff --git a/src/lib/crypto/des/fin_rndkey.c b/src/lib/crypto/des/fin_rndkey.c index 21b3bea8f..089cd9c44 100644 --- a/src/lib/crypto/des/fin_rndkey.c +++ b/src/lib/crypto/des/fin_rndkey.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -14,7 +15,6 @@ static char rcsid_fin_rndkey_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include #include @@ -27,7 +27,7 @@ krb5_error_code mit_des_finish_random_key (DECLARG(krb5_pointer *, seed)) OLDDECLARG(krb5_pointer *, seed) { memset((char *)*seed, 0, sizeof(mit_des_random_key_seed) ); - free((char *)*seed); + xfree(*seed); *seed = 0; return 0; /* XXX init_random_key */ } diff --git a/src/lib/crypto/des/random_key.c b/src/lib/crypto/des/random_key.c index bc0b06e9a..ee46b7d97 100644 --- a/src/lib/crypto/des/random_key.c +++ b/src/lib/crypto/des/random_key.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -14,8 +15,6 @@ static char rcsid_random_key_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include - #include #include @@ -35,7 +34,7 @@ OLDDECLARG(krb5_keyblock **, keyblock) if (!(randkey = (krb5_keyblock *)malloc(sizeof(*randkey)))) return ENOMEM; if (!(randkey->contents = (krb5_octet *)malloc(sizeof(mit_des_cblock)))) { - free((char *)randkey); + xfree(randkey); return ENOMEM; } randkey->length = sizeof(mit_des_cblock); diff --git a/src/lib/crypto/des/string2key.c b/src/lib/crypto/des/string2key.c index d21443ab4..7453ddeac 100644 --- a/src/lib/crypto/des/string2key.c +++ b/src/lib/crypto/des/string2key.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,8 +16,6 @@ static char rcsid_string2key_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include - #include #include @@ -75,7 +74,7 @@ OLDDECLARG(const krb5_data *, salt) return(ENOMEM); #define cleanup() {memset(keyblock->contents, 0, sizeof(mit_des_cblock));\ - (void) free((char *) keyblock->contents);} + xfree(keyblock->contents);} keyblock->keytype = KEYTYPE_DES; keyblock->length = sizeof(mit_des_cblock); diff --git a/src/lib/kdb/decrypt_key.c b/src/lib/kdb/decrypt_key.c index e942941f1..fb35dd1d0 100644 --- a/src/lib/kdb/decrypt_key.c +++ b/src/lib/kdb/decrypt_key.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_decrypt_key_c [] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include #include @@ -57,13 +57,13 @@ krb5_keyblock *out; sizeof(in->length)), (krb5_pointer) out->contents, in->length-sizeof(in->length), eblock, 0)) { - free((char *)out->contents); + xfree(out->contents); out->contents = 0; out->length = 0; return retval; } if (out->length < 0) { - free((char *)out->contents); + xfree(out->contents); out->contents = 0; out->length = 0; return KRB5_KDB_INVALIDKEYSIZE; diff --git a/src/lib/kdb/encrypt_key.c b/src/lib/kdb/encrypt_key.c index 22000ec31..6d9724f23 100644 --- a/src/lib/kdb/encrypt_key.c +++ b/src/lib/kdb/encrypt_key.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_encrypt_key_c [] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include #include @@ -54,7 +54,7 @@ krb5_encrypted_keyblock *out; out->length += sizeof(out->length); out->contents = (krb5_octet *)malloc(out->length); if (!out->contents) { - free((char *)tmpin.contents); + xfree(tmpin.contents); out->contents = 0; out->length = 0; return ENOMEM; @@ -67,9 +67,9 @@ krb5_encrypted_keyblock *out; (krb5_pointer) (((char *) out->contents) + sizeof(out->length)), tmpin.length, eblock, 0); - free((char *)tmpin.contents); + xfree(tmpin.contents); if (retval) { - free((char *)out->contents); + xfree(out->contents); out->contents = 0; out->length = 0; } diff --git a/src/lib/kdb/kdb_dbm.c b/src/lib/kdb/kdb_dbm.c index 95a92d90d..f29dac649 100644 --- a/src/lib/kdb/kdb_dbm.c +++ b/src/lib/kdb/kdb_dbm.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1988,1989,1990 by the Massachusetts Institute of Technology. + * Copyright 1988,1989,1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -13,7 +14,6 @@ static char rcsid_krb_dbm_c[] = "$Id$"; #endif /* lint */ -#include #include #include #include @@ -522,7 +522,7 @@ krb5_db_entry *entry; if (keysize != entry->key.length) { krb5_free_principal(princ); krb5_free_principal(mod_princ); - free((char *)entry->key.contents); + xfree(entry->key.contents); (void) memset((char *) entry, 0, sizeof(*entry)); return KRB5_KDB_TRUNCATED_RECORD; } @@ -534,7 +534,7 @@ krb5_db_entry *entry; if (!(entry->salt = (krb5_octet *)malloc(entry->salt_length))) { krb5_free_principal(princ); krb5_free_principal(mod_princ); - free((char *)entry->key.contents); + xfree(entry->key.contents); (void) memset((char *) entry, 0, sizeof(*entry)); return KRB5_KDB_TRUNCATED_RECORD; } @@ -549,9 +549,9 @@ krb5_db_entry *entry; { /* erase the key */ memset((char *)entry->key.contents, 0, entry->key.length); - free((char *)entry->key.contents); + xfree(entry->key.contents); if (entry->salt_length) - free((char *)entry->salt); + xfree(entry->salt); krb5_free_principal(entry->principal); krb5_free_principal(entry->mod_name); diff --git a/src/lib/krb5/asn.1/encode.c b/src/lib/krb5/asn.1/encode.c index a51d596de..63bad48cc 100644 --- a/src/lib/krb5/asn.1/encode.c +++ b/src/lib/krb5/asn.1/encode.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_encode_c[] = "$Id$"; #endif /* lint || saber */ -#include #include #include #include @@ -70,7 +70,7 @@ void (*free_translation) PROTOTYPE((krb5_pointer )); alldatout: free((*data_out)->data); datout: - free((char *)*data_out); + xfree(*data_out); *data_out = 0; peout: pe_free(pe); diff --git a/src/lib/krb5/ccache/file/fcc_sseq.c b/src/lib/krb5/ccache/file/fcc_sseq.c index 589e62668..aee5ffceb 100644 --- a/src/lib/krb5/ccache/file/fcc_sseq.c +++ b/src/lib/krb5/ccache/file/fcc_sseq.c @@ -3,6 +3,7 @@ * $Author$ * * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -14,8 +15,6 @@ static char rcsid_fcc_sseq_c[] = "$Id$"; #endif /* !lint && !SABER */ -#include - #include "fcc.h" /* @@ -45,7 +44,7 @@ krb5_fcc_start_seq_get(id, cursor) if (OPENCLOSE(id)) { ret = krb5_fcc_open_file(id, FCC_OPEN_RDONLY); if (ret) { - free((char *)fcursor); + xfree(fcursor); return ret; } } diff --git a/src/lib/krb5/krb/copy_data.c b/src/lib/krb5/krb/copy_data.c index 3e17ce563..0e21c2c6c 100644 --- a/src/lib/krb5/krb/copy_data.c +++ b/src/lib/krb5/krb/copy_data.c @@ -2,7 +2,8 @@ * $Source$ * $Author$ * - * Copyright 1990 by the Massachusetts Institute of Technology. + * Copyright 1990,1991 by the Massachusetts Institute of Technology. + * All Rights Reserved. * * For copying and distribution information, please see the file * . @@ -15,7 +16,6 @@ static char rcsid_copy_data_c[] = "$Id$"; #endif /* !lint & !SABER */ -#include #include #include @@ -34,7 +34,7 @@ krb5_data **outdata; *tempdata = *indata; if (!(tempdata->data = malloc(tempdata->length))) { - free((char *)tempdata); + xfree(tempdata); return ENOMEM; } memcpy((char *)tempdata->data, (char *)indata->data, tempdata->length);