summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Declare cleanup function as void and propogate thoughout the file. This handlesEzra Peisach1995-09-202-10/+16
| | | | | | conflicts with free git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6812 dc483132-0cff-0310-8789-dd5450dbe970
* Don't modify a const input variable val; copy it to a scratch variableTheodore Tso1995-09-182-2/+9
| | | | | | and modify that. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6811 dc483132-0cff-0310-8789-dd5450dbe970
* Fix typo error in checkinEzra Peisach1995-09-182-2/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6806 dc483132-0cff-0310-8789-dd5450dbe970
* Lots of memory leaks and other fixes...Theodore Tso1995-09-1618-106/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gssapiP_krb5.h: Remove context and cred from the gssapi security context, as they aren't needed. kg_seal and kg_unseal now take a krb5_context argument. ser_sctx.c (kg_ctx_size, kg_ctx_externalize, kg_ctx_internalize): No longer serialize the context and cred fields of the gssapi security context. krb5_gss_glue.c: Don't rely on the context field of the gssapi security context. Use kg_context instead. verify.c (krb5_gss_verify, krb5_gss_verify_mic): unseal.c (krb5_gss_unwrap, krb5_gss_unseal): sign.c (krb5_gss_sign, krb5_gss_get_mic): seal.c (krb5_gss_seal, krb5_gss_wrap): process_context_token.c (krb5_gss_process_context_token): k5unseal.c (kg_unseal): k5seal.c (kg_seal_size): Add a krb5_context argument to this function, so we don't have to depend on the context field in the gssapi security context. init_sec_context.c (krb5_gss_init_sec_context): Don't initialize the context and cred fields in the gssapi security context. Copy ctx->subkey to ctx->seq.key, so they are separately allocated. gssapi_krb5.c (kg_get_context): When initialize kg_context, call krb5_init_ets() so that the error tables are initialized. export_sec_context.c (krb5_gss_export_sec_context): Don't depend on the context field from the gssapi security context. Free ctx->seq.key. delete_sec_context.c (krb5_gss_delete_sec_context): kg_seal() now takes a krb5_context argument. Free ctx->seq.key. acquire_cred.c (krb5_gss_acquire_cred): Clear the gssapi credential before setting it, to prevent purify from complaining. accept_sec_context.c (krb5_gss_accept_sec_context): Remove context and cred from the gssapi security context. Make sure the ticket is freed after we're done with it. import_sec_context.c (krb5_gss_import_sec_context): Don't bash the input interprocess_token. Otherwise, it can't be freed. Don't depend on the context field in the gss security context. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6798 dc483132-0cff-0310-8789-dd5450dbe970
* sendauth.c (krb5_sendauth): Make sure the scratch credentialsTheodore Tso1995-09-169-25/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | structure may have possible been used be freed.. rd_safe.c (krb5_rd_safe_basic): Fall through to the cleanup code at the end, to make sure the decoded message in message is freed. rd_req_dec.c (krb5_rd_req_decoded): Use krb5_copy_keyblock to copy authent->subkey to auth_context->remote_subkey. Keeping them separate avoids aliasing problems. mk_req_ext.c (krb5_generate_authenticator): Fix memory leak. Don't bash authent->subkey with key after carefully copying it using krb5_copy_keyblock! recvauth.c (krb5_recvauth): krb5_get_server_rcache() already opens the rcache; doing it again merely causes a memory leak. gen_subkey.c (krb5_generate_subkey): Eliminate memory leak. krb5_init_random_key() does its own allocation of the keyblock. gc_via_tkt.c (krb5_kdcrep2creds): Fix memory leak. srv_rcache.c (krb5_get_server_rcache): Fix memory leak. rd_safe.c (krb5_rd_safe_basic): Fix memory leak. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6797 dc483132-0cff-0310-8789-dd5450dbe970
* moderately clean handling of allocated storage on error during partialMark Eichin1995-09-142-95/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | construction, in spite of not having exception handling in the language. * krb5_decode.c (clean_krb5_authenticator, clean_krb5_ticket, clean_krb5_enc_tkt_part,clean_krb5_ap_req, clean_krb5_ap_rep_enc_part, clean_krb5_safe, clean_krb5_priv_enc_part, clean_krb5_cred_enc_part, clean_krb5_error): new static functions to free objects that may be partially constructed. (setup_buf_only, setup_no_tagnum, setup_no_length, setup): define in terms of each other to remove duplication, then add local variable error_cleanup to common declarations. (clean_return): new macro, uses error_cleanup on rep if possible and the allows the argument to be returned. (alloc_field, check_apptag, next_tag, begin_structure, get_field_body, get_field, get_lenfield_body, get_lenfield): use clean_return. (free_field): new macro to simplify the writing of clean_*. (clear_field): macro to clean up preparation of fields for later use by clean_* functions. (decode_krb5_authenticator, decode_krb5_ticket, decode_krb5_encryption_key, decode_krb5_enc_tkt_part, decode_krb5_enc_kdc_rep_part, decode_krb5_as_rep, decode_krb5_tgs_rep, decode_krb5_ap_req, decode_krb5_ap_rep, decode_krb5_ap_rep_enc_part, decode_krb5_as_req, decode_krb5_tgs_req, decode_krb5_kdc_req_body, decode_krb5_safe, decode_krb5_priv, decode_krb5_enc_priv_part, decode_krb5_cred, decode_krb5_enc_cred_part, decode_krb5_error, decode_krb5_authdata, decode_krb5_pwd_sequence, decode_krb5_pwd_data, decode_krb5_padata_sequence, decode_krb5_alt_method, decode_krb5_etype_info): change setup macro to pass a cleanup method (or just free if there were no partial allocations, or 0 for the two cases with no allocation at all.) Also explicitly zero pointer subfields, since calloc is not a safe way to assure that. Generally, provide for automatic deallocation of storage on error. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6785 dc483132-0cff-0310-8789-dd5450dbe970
* Clear the buffer before calling the SIOCGIFCONF ioctl. This makesTheodore Tso1995-09-132-1/+8
| | | | | | purify happy. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6782 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leak. Free the default realm when we're done. Remove theTheodore Tso1995-09-132-132/+157
| | | | | | | "profile" parameter from the kdc.conf file. This is bad idea, architecturally. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6780 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leaks and lint flamesTheodore Tso1995-09-132-25/+39
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6779 dc483132-0cff-0310-8789-dd5450dbe970
* fetch_mkey.c (krb5_db_fetch_mkey): This routine now sets the masterTheodore Tso1995-09-133-3/+13
| | | | | | | | | | encblock's crypto system using krb5_use_enctype() from the stored keytype of the master key. decrypt_key.c (krb5_dbekd_decrypt_key_data): Remove the encryption type; the master_encblock should always be set correctly. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6778 dc483132-0cff-0310-8789-dd5450dbe970
* Free the auth context when freeing the GSSAPI context structureTheodore Tso1995-09-133-0/+14
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6776 dc483132-0cff-0310-8789-dd5450dbe970
* Added inclusion of des_int.hKeith Vetter1995-09-132-0/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6772 dc483132-0cff-0310-8789-dd5450dbe970
* Revert keytype -> emctype changes.Ezra Peisach1995-09-126-175/+75
| | | | | | Document the Macintosh changes to adm_conn.c (hardwired path for adm cache) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6770 dc483132-0cff-0310-8789-dd5450dbe970
* Undo MACINTOSH changes to path in these files - theye were correct. TheEzra Peisach1995-09-124-12/+5
| | | | | | | Makefile.in alread specifies the right locations to include so that ,krb5/...> is not required for unix git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6769 dc483132-0cff-0310-8789-dd5450dbe970
* Reintegrate the keytab -> enctype changesEzra Peisach1995-09-123-5/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6768 dc483132-0cff-0310-8789-dd5450dbe970
* Put back in the keytype -> enctype changesEzra Peisach1995-09-122-2/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6767 dc483132-0cff-0310-8789-dd5450dbe970
* Reintegrate Macintosh changesEzra Peisach1995-09-1234-309/+293
| | | | | | | | t_ser.c: Work around an optimizer bug in gcc under OSF/1 2.1. The timeofday calls were left in the stage as described in the ChangeLog git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6766 dc483132-0cff-0310-8789-dd5450dbe970
* Integrate Macintosh changes into previous sourcesEzra Peisach1995-09-127-18/+34
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6764 dc483132-0cff-0310-8789-dd5450dbe970
* Reintegrate changes lost during Macintosh checkinEzra Peisach1995-09-126-15/+62
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6763 dc483132-0cff-0310-8789-dd5450dbe970
* Reinstate previous changes that were lostEzra Peisach1995-09-124-15/+30
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6762 dc483132-0cff-0310-8789-dd5450dbe970
* Reinstate the keytype -> enctype changes and keep the new Mac changesEzra Peisach1995-09-126-18/+24
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6761 dc483132-0cff-0310-8789-dd5450dbe970
* Rvert lost changesEzra Peisach1995-09-122-7/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6760 dc483132-0cff-0310-8789-dd5450dbe970
* Reintegrate the keytype->enctype changesEzra Peisach1995-09-125-25/+20
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6759 dc483132-0cff-0310-8789-dd5450dbe970
* Initial version of a sscanf() replacement, for those platforms (likeTheodore Tso1995-09-123-3/+794
| | | | | | Macroloss) that don't have sscanf(). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6758 dc483132-0cff-0310-8789-dd5450dbe970
* Replace nuked history in ChangeLogEzra Peisach1995-09-121-3/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6757 dc483132-0cff-0310-8789-dd5450dbe970
* Reintegrate the keytype->enctype changesEzra Peisach1995-09-125-10/+28
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6756 dc483132-0cff-0310-8789-dd5450dbe970
* Reintegrate the keytype -> enctype changesEzra Peisach1995-09-128-20/+32
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6755 dc483132-0cff-0310-8789-dd5450dbe970
* Revert back proven's changes which were removedEzra Peisach1995-09-123-2/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6754 dc483132-0cff-0310-8789-dd5450dbe970
* Replace function declaration back to taking an int. SOCKET is defined asEzra Peisach1995-09-112-2/+9
| | | | | | unsigned int under unix and this causes a prototype error git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6752 dc483132-0cff-0310-8789-dd5450dbe970
* Mac Beta 1 submissionKeith Vetter1995-09-11136-806/+1277
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6749 dc483132-0cff-0310-8789-dd5450dbe970
* Set the encryption type before decryptingEzra Peisach1995-09-092-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6745 dc483132-0cff-0310-8789-dd5450dbe970
* (gss_delete_sec_context): Add extra indirection so that we actuallyTheodore Tso1995-09-093-6/+14
| | | | | | | | fetch the context correctly. (gss_accept_sec_context): Remove unused code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6744 dc483132-0cff-0310-8789-dd5450dbe970
* decrypt_key.c: Upon error, after freeing contents field, set toEzra Peisach1995-09-082-0/+9
| | | | | | | | null to indicate to upper levels that it is really empty. Another bug discovered by purify... git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6743 dc483132-0cff-0310-8789-dd5450dbe970
* Renamed a file since the Mac can't have two files with the same nameKeith Vetter1995-09-085-12/+22
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6739 dc483132-0cff-0310-8789-dd5450dbe970
* * scc_gennew.c (krb5_scc_generate_new): don't use automaticMark Eichin1995-09-072-1/+8
| | | | | | | | aggregate initialization. so we can still compile under sunos git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6738 dc483132-0cff-0310-8789-dd5450dbe970
* Use KRB5_ADM_SERVICE_INSTANCE for the instance name, instead ofTheodore Tso1995-09-072-2/+7
| | | | | | KRB5_ADM_SERVICE_NAME. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6734 dc483132-0cff-0310-8789-dd5450dbe970
* * auth_con.c, decrypt_tk.c, encode_kdc.c, encrypt_tk.c,Chris Provenzano1995-09-0631-123/+133
| | | | | | | | | | | * gc_frm_kdc.c, gen_seqnum.c, get_creds.c, get_in_tkt.c, * in_tkt_ktb.c, in_tkt_pwd.c, in_tkt_sky.c, init_ctx.c, * kdc_rep_dc.c, mk_cred.c, mk_priv.c, mk_rep.c, mk_req._ext.c, * preauth.c, rd_cred.c, rd_priv.c, rd_rep.c, rd_req_dec.c, * send_tgs.c, sendauth.c, ser_actx.c, ser_ctx.c, ser_eblk.c, * ser_key.c, t_ser.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6727 dc483132-0cff-0310-8789-dd5450dbe970
* * ktf_g_ent.c, ktf_remove.c, ktf_util.c, ktfile.h :Chris Provenzano1995-09-065-13/+18
| | | | | | s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6726 dc483132-0cff-0310-8789-dd5450dbe970
* * read_servi.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-062-4/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6725 dc483132-0cff-0310-8789-dd5450dbe970
* * kdb5_err.et : Change KRB5_KDB_BAD_KEYTYPE to KRB5_KDB_BAD_ENCTYPEChris Provenzano1995-09-063-2/+6
| | | | | | * krb5_err.et : Change KRB5_BAD_KEYTYPE to KRB5_BAD_ENCTYPE git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6724 dc483132-0cff-0310-8789-dd5450dbe970
* * scc_read.c, scc_write.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-063-5/+8
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6723 dc483132-0cff-0310-8789-dd5450dbe970
* * file_read.c, file_write.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-063-4/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6722 dc483132-0cff-0310-8789-dd5450dbe970
* * asn1_k_decode.c, asn1_k_decode.h, asn1_k_encode.c, asn1_k_encode.h,Chris Provenzano1995-09-067-25/+29
| | | | | | * krb5_decode.c, krb5_encode.c: s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6721 dc483132-0cff-0310-8789-dd5450dbe970
* * get_cred.c, mk_priv.c, mk_safe.c, rd_priv.c, rd_req.c, rd_safe.c,Chris Provenzano1995-09-068-9/+14
| | | | | | * set_key.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6720 dc483132-0cff-0310-8789-dd5450dbe970
* * DNR.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-062-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6719 dc483132-0cff-0310-8789-dd5450dbe970
* * decrypt_key.c, encrypt_key.c, fetch_mkey.c, kdb_compat.c,Chris Provenzano1995-09-069-25/+30
| | | | | | | * kdb_cpw.c, kdb_xdr.c, store_mkey.c, t_kdb.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6718 dc483132-0cff-0310-8789-dd5450dbe970
* * adm_kt_dec.c, adm_kt_enc.c, alt_prof.c, keysalt.c, str_conv.c :Chris Provenzano1995-09-066-70/+74
| | | | | | s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6717 dc483132-0cff-0310-8789-dd5450dbe970
* * accept_sec_context.c, init_sec_context.c, util.c :Chris Provenzano1995-09-064-5/+9
| | | | | | s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/g git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6716 dc483132-0cff-0310-8789-dd5450dbe970
* * string2key.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-062-7/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6715 dc483132-0cff-0310-8789-dd5450dbe970
* * md5crypto.c, t_cksum.c : s/keytype/enctype/g, s/KEYTYPE/ENCTYPE/gChris Provenzano1995-09-063-6/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6714 dc483132-0cff-0310-8789-dd5450dbe970