aboutsummaryrefslogtreecommitdiff
path: root/src/lib
AgeCommit message (Collapse)AuthorFilesLines
2005-02-03* Makefile.in (gssapi.h): Change SIZEOF symbols to start with GSS_ whenKen Raeburn3-9/+14
extracting from autoconf.h. Don't look for HAVE_ or USE_ symbols. Add ${include_xom} to the prologue. (include_xom): New variable. * gssapi.h: Always include stddef.h unconditionally. (GSS_SIZEOF_INT, GSS_SIZEOF_LONG, GSS_SIZEOF_SHORT): Don't define. ticket: 2910 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17077 dc483132-0cff-0310-8789-dd5450dbe970
2005-02-03* configure.in: Check for xom.h. Set include_xom to a C include directive orKen Raeburn2-0/+9
comment, and substitute it in the Makefiles. ticket: 2910 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17076 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-28 * t_walk_rtree.c (main): Free context at end to allow searchingEzra Peisach2-0/+6
for memory leaks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17072 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-17Some applications such as Eudora on Windows load and unload the KerberosJeffrey Altman4-2/+15
libraries as part of a plug-in. Plugins are often loaded for a specific purpose and then unregistered. In order to support this model, the libraries must restore the library state to the uninitialized state when the library is unloaded. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17050 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-17 krb5_unparse_name(), krb5_unparse_name_ext():Jeffrey Altman2-14/+20
prevent dereferencing of pointer if 'name' or 'size' are NULL ticket: new tags: pullup target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17049 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-17 * gc_frm_kdc.c (krb5_get_cred_from_kdc_opt): More memory leaksEzra Peisach2-30/+54
fixed as introduced in ticket #2541. Do not rely on knowledge that upon failure from krb5_cc_retrieve_cred, returned credential data is untouched. Testsuite passes all tests, but would like another set of eyes to look over code before closing ticket. ticket: 2885 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17048 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-17subject; krb5_do_preauth could attempt to free NULL pointerEzra Peisach2-1/+8
* preauth2.c (krb5_do_preauth): Upon error in decoding krb5_type_info{,2}, on failure, do not call krb5_free_type_info with a null pointer. The only way to reach this code is to set a preauth list requesting for ETYPE_INFO or ETYPE_INFO2 in a call to krb5_get_in_tkt_with_password. Before sending the request, krb5_do_preauth tries to parse a NULL length asn1 buffer, fails and tries to free a null pointer. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17047 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-15 * rc_dfl.c: Move the extraction of the struct dfl_dataJeffrey Altman2-3/+8
from the krb5_rcache after obtaining the lock, not before. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17046 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-15 * cp_key_cnt.c, copy_princ.c:Jeffrey Altman3-19/+34
prevent krb5_copy_principal() and krb5_copy_keyblock() from calling malloc(0). On platforms in which malloc(0) returns NULL, these functions will return an ENOMEM error the way they were written. ticket: 2881 target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17045 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-14Fix braino in previous change to xdr_bytes. New test case forTom Yu3-4/+7
RPCSEC_GSS fixed-size buffers. ticket: 2877 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17039 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-14 * authgss_prot.c (xdr_rpc_gss_wrap_data): Use xdr_alloc to avoidTom Yu3-37/+32
size limit issues. Use (unsigned int)-1 instead of MAX_NETOBJ_SZ. (xdr_rpc_gss_unwrap_data): Use (unsigned int)-1 instead of MAX_NETOBJ_SZ. * xdr.c (xdr_bytes): Don't assign from *sizep if XDR_FREE, since it'll be uninitialized then. Shuts up Purify. ticket: 2877 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17038 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-14* cc_file.c (struct _krb5_fcc_data): Fields disk_file_lock, file_is_lockedKen Raeburn2-40/+13
deleted. (krb5_fcc_open_file, krb5_fcc_close_file, dereference, krb5_fcc_resolve, krb5_fcc_generate_new, krb5_fcc_set_flags): Don't set or check them. ticket: 2874 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17034 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-14* prng.c (krb5int_prng_init): Incorporate do_yarrow_init body. Don't checkKen Raeburn2-28/+19
inited variable. (inited): Variable deleted. (krb5_c_random_make_octets, krb5int_prng_cleanup): Don't check it. (do_yarrow_init): Deleted. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17033 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-14* yarrow.c (yarrow_reseed_locked): Renamed from krb5int_yarrow_reseed and madeKen Raeburn2-6/+27
static. (Yarrow_detect_fork, yarrow_input_maybe_locking, krb5int_yarrow_output_Block): Call it. (krb5int_yarrow_reseed): New function, grabs lock and calls the old version. (krb5int_yarrow_final): Hold the lock until after clearing the Yarrow context data. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17032 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-13 correction to previous commit. do not call krb5_gss_release_cred()Jeffrey Altman1-11/+46
if the cred was not acquired. destroy each field of the cred one piece at a time based upon what was allocated. ticket: 2875 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17025 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-13Tree does not compile with GCC 4.0Ezra Peisach2-0/+6
* yarrow.c: Declare yarrow_gate_locked static before first use. GCC 4.0 snapshots are more particular about using a static function before a prototype is given. ticket: new status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17024 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-13 Fix the calls to krb5_gss_release_cred to pass in the correct type.Jeffrey Altman3-41/+19
This fixes a mutex leak. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17023 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-13 * prng.c (read_entropy_from_device): Use ssize_t, not size_t, soTom Yu2-1/+6
read() returning -1 doesn't cause trouble. ticket: 2871 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17020 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-12Fix some potential resource leaks in dnsglue.cTom Yu2-17/+43
ticket: 2872 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17018 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-122005-01-11 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2-13/+30
* cc_mslsa.c: - do not free krb5_creds if krb5_copy_creds fails - cause MSTicketToMITTicket to return failure if krb5_copy_data fails ticket: 2870 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17017 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-12* gc_frm_kdc.c (krb5_get_cred_from_kdc_opt): Free credentials retrieved fromKen Raeburn2-276/+331
ccache before returning. Based on patch from fumihiko kakuma <kakuma@valinux.co.jp>. Also whitespace changes for readability. ticket: 2541 tags: pullup target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17014 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-08* crc-32.h (mit_crc32): Remove gratuitous "const" in argument declarationKen Raeburn2-1/+6
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17011 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-06make dependTom Yu1-0/+6
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17007 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-05 Add new function krb5_boolean krb5_is_thread_safe(void) to library.Jeffrey Altman7-0/+57
This function simply reports whether or not ENABLE_THREADS was specified at compile time. It is meant to be used by applications which need to know whether or not multithread libraries must be initialized OR whether or not calls to Kerberos library functions from multi-threaded applications must be protected by an application global mutex. ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17003 dc483132-0cff-0310-8789-dd5450dbe970
2005-01-03krb5_parse_name not thread-safe, not responsive to environment changesKen Raeburn2-2/+9
As Ezra noted, krb5_parse_name saves away the default realm the first time it looks it up, and will never look it up again, even if the config file has changed, the context isn't the same one, etc. It also used a static variable which wasn't thread-safe. With this patch, we still won't catch changes in the config file specification after the default realm has been looked up for a given krb5_context, because it's cached in the context too, but this will at least be more responsive, and thread safe. * parse.c (krb5_parse_name): Don't cache the default realm name. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16988 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-30run "make depend"Ken Raeburn34-2431/+2623
In most library directories, this just affects where the line breaks are. In most other directories, it's just dropping a trailing blank line. One or two files really do have updated dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16987 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-28Memory leak in asn1_decode_generaltimeEzra Peisach2-0/+6
When decoding a kerberos time, if the asn1 time is 19700101000000Z (i.e. time_t of 0) - 15 bytes of memory are lost. * asn1_decode.c (asn1_decode_generaltime): Fix memory leak when time sent is "19700101000000Z". ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16983 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-25Memory leaks in ccache due to thread integrationEzra Peisach2-0/+10
* cc_file.c (krb5_fcc_close): Free the cache id. (dereference): When removing fcc_set entry from list, free the pointer as well. The first was accidently dropped in the dereference code writing. The cache id pointer is never freed. The second error is the removal of the krb5_fcc_data from the linked list. The fcc_set is removed from the chain, but the memory for the removed fcc_set is never freed. ticket:new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16981 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-20fix MITKRB5-SA-2004-004Tom Yu2-35/+74
ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16961 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-20Mark krb5_principal2salt has being declared with the wrong calling conventionJeffrey Altman2-3/+8
ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16960 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-162004-12-16 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2-0/+12
* cc_mslsa.c: Temporarily deactivate support for KerbSubmitTicketMessage and KerbQueryTicketCacheEx2Message until the new Platform SDK becomes publicly available. ticket: new tags: pullup target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16945 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-15 remove unnecessary if statementJeffrey Altman1-2/+0
ticket: 2814 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16937 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-152004-12-15 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2-43/+88
* cc_mslsa.c: - Activate support for KerbSubmitTicketMessage - Activate support for KerbQueryTicketCacheEx2Message - Add locale support for regions which use MultiByte characters ticket: new tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16935 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-152004-12-15 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman3-3/+7
rename krb5support_32.dll to k5sprt32.dll ticket: 2804 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16934 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-08* include/k5-int.h (struct _krb5int_access): Add function pointer fieldKen Raeburn4-13/+27
use_dns_kdc. * lib/krb5/os/accessor.c (krb5int_accessor): Set new field use_dns_kdc. * lib/krb4/RealmsConfig-glue.c (krb_get_krbhst): Check if DNS should be used for getting KDC names before actually using it. ticket: 2772 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16920 dc483132-0cff-0310-8789-dd5450dbe970
2004-12-06allow build with KRB5_DNS_LOOKUP undefinedTom Yu2-0/+7
* locate_kdc.c (krb5_locate_srv_dns_1): Don't compile if KRB5_DNS_LOOKUP is not defined. ticket: new target_version: 1.4 tags: pullup component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16915 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-26fix missing mutex initialization in keytab file codeKen Raeburn2-0/+12
Missed a case in the checked-in (and pulled-up) fix to 2781. * kt_file.c (krb5_ktfile_wresolve): Initialize mutex here too. ticket: new status: open target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16908 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-24fix missing locking in keytab; fix stdio handling tooKen Raeburn2-24/+102
The keytab type list lock was implemented, but I missed the per-keytab lock. Since I was in there, I ripped out the bogus stdio buffer mangling that the code was doing, and set up a buffer to be used that we can sanitize later. * kt_file.c (struct _krb5_ktfile_data): Add mutex and buffer. (KTFILEBUFP, KTLOCK, KTUNLOCK, KTCHECKLOCK): New macros. (krb5_ktfile_resolve): Initialize mutex. (krb5_ktfile_close): Zap data buffer before freeing. (krb5_ktfile_get_entry, krb5_ktfile_start_seq_get, krb5_ktfile_get_next, krb5_ktfile_end_get, krb5_ktfile_add, krb5_ktfile_remove): Lock and unlock the mutex. (krb5_ktfileint_open): Check that the mutex is locked. Set the stdio buffer to the new buffer in the ktfile data. (krb5_ktfileint_write_entry, krb5_ktfileint_find_slot): Check that the mutex is locked. Don't call setbuf. Flush the stdio buffer after writing. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16905 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-24set errno=0 prior to fopen in kt_fileTom Yu2-2/+11
* kt_file.c (krb5_ktfileint_open): Update previous change by explicitly setting errno=0 prior to calling fopen(). Also, return EMFILE, not ENFILE, for compatibility with Solaris 8, which does set errno when out of file descriptors. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16904 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-23KDC on Tru64 was hanging because of another case where Yarrow codeKen Raeburn2-12/+47
assumes locks are recursive. Probably didn't trigger on Linux, Solaris, or NetBSD because they have /dev/random and Tru64 does not. * yarrow.c (yarrow_input_maybe_locking): Renamed from yarrow_input_maybe_locking, made static. New argument indicates whether or not to do locking. (krb5int_yarrow_input): New wrapper function. (yarrow_input_locked): New wrapper function. (Yarrow_detect_fork): Call yarrow_input_locked. ticket: 2755 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16903 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-19* locate_kdc.c (krb5int_add_host_to_list): If debugging, log the requestedKen Raeburn4-10/+32
family and socket type. If AI_NUMERICSERV is defined, set it in ai_flags. If getaddrinfo returns an error with debugging enabled, log the error. (krb5_locate_srv_conf_1): When logging an error from add_host_to_list, include the corresponding error string. * t_locate_kdc.c: Include port-sockets.h, instead of sys/socket.h, netdb.h, netinet/in.h, and arpa/inet.h. * Makefile.in ($(OUTPRE)t_locate_kdc.exe): New target. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16899 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-19 * kt_file.c (krb5_ktfileint_open): Patch from Roland Dowdeswell toTom Yu2-2/+7
return ENFILE when fopen() returns NULL but doesn't set errno. ticket: 2760 target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16898 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-19* cc_mslsa.c (MSCredToMITCred): Don't create an empty array for addresses, justKen Raeburn2-6/+6
use a null pointer now. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16895 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-18* Makefile.in (SHLIB_EXPLIBS): Remove -ldl accidentally added in last changeKen Raeburn2-1/+6
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16888 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-18install rpc headers into correct directoryTom Yu2-2/+7
RPC headers need to be installed into PREFIX/include/gssrpc, not PREFIX/include ticket: new target_version: 1.4 version_reported: 1.4 tags: pullup component: krb5-build git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16887 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-17* prng.c (do_yarrow_init): Move mutex initialization here.Ken Raeburn2-1/+12
(krb5int_prng_init): Don't do it here. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16880 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-17* Makefile.in (SHLIB_EXPDEPS, SHLIB_EXPLIBS): Add support libraryKen Raeburn2-2/+7
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16879 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-16oops, bad updateKen Raeburn1-2/+2
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16877 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-16make dependKen Raeburn2-19/+19
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16876 dc483132-0cff-0310-8789-dd5450dbe970
2004-11-16make dependKen Raeburn1-4/+5
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16875 dc483132-0cff-0310-8789-dd5450dbe970