summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Some applications such as Eudora on Windows load and unload the KerberosJeffrey Altman2005-01-178-2/+29
| | | | | | | | | | | 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
* krb5_unparse_name(), krb5_unparse_name_ext():Jeffrey Altman2005-01-172-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
* * gc_frm_kdc.c (krb5_get_cred_from_kdc_opt): More memory leaksEzra Peisach2005-01-172-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
* subject; krb5_do_preauth could attempt to free NULL pointerEzra Peisach2005-01-172-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
* * rc_dfl.c: Move the extraction of the struct dfl_dataJeffrey Altman2005-01-152-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
* * cp_key_cnt.c, copy_princ.c:Jeffrey Altman2005-01-153-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
* * k5-thread.h [HAVE_PTHREAD && HAVE_PRAGMA_WEAK_REF]: Mark pthread_self andKen Raeburn2005-01-142-0/+7
| | | | | | | | | pthread_equal as weak references. ticket: 2878 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17041 dc483132-0cff-0310-8789-dd5450dbe970
* Fix braino in previous change to xdr_bytes. New test case forTom Yu2005-01-145-5/+31
| | | | | | | | | RPCSEC_GSS fixed-size buffers. ticket: 2877 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17039 dc483132-0cff-0310-8789-dd5450dbe970
* * authgss_prot.c (xdr_rpc_gss_wrap_data): Use xdr_alloc to avoidTom Yu2005-01-143-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
* fix calling convention for thread support fnsKen Raeburn2005-01-142-6/+18
| | | | | | | | | | | | | | | | This depends on a change to k5-thread.h that was included with a checkin I did earlier for 2878. * threads.c (k5_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats): Define as KRB5_CALLCONV. (krb5int_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [_WIN32]: Undef macros before defining functions. ticket: new target_version: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17037 dc483132-0cff-0310-8789-dd5450dbe970
* * k5-thread.h (k5_pthread_assert_locked): Only call pthread_equal ifKen Raeburn2005-01-142-6/+8
| | | | | | | | | | | thread support is loaded. (k5_pthread_mutex_unlock): Use k5_pthread_assert_locked instead of duplicating it. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17036 dc483132-0cff-0310-8789-dd5450dbe970
* * prof_file.c (profile_open_file): If mutex creation fails, free storageKen Raeburn2005-01-142-1/+4
| | | | | | | | | directly instead of calling profile_close_file. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17035 dc483132-0cff-0310-8789-dd5450dbe970
* * cc_file.c (struct _krb5_fcc_data): Fields disk_file_lock, file_is_lockedKen Raeburn2005-01-142-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
* * prng.c (krb5int_prng_init): Incorporate do_yarrow_init body. Don't checkKen Raeburn2005-01-142-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
* * yarrow.c (yarrow_reseed_locked): Renamed from krb5int_yarrow_reseed and madeKen Raeburn2005-01-142-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
* More paranoid checking...Ken Raeburn2005-01-142-26/+96
| | | | | | | | | | | | | | | | | | | | | | | | | * k5-thread.h (k5_os_mutex) [pthread case]: Add new field "owner" if DEBUG_THREADS. (k5_pthread_mutex_lock, k5_pthread_mutex_unlock, k5_pthread_assert_locked): New macros/functions; if DEBUG_THREADS, set or check the owner field. (K5_OS_MUTEX_PARTIAL_INITIALIZER) [pthread case && DEBUG_THREADS]: Set the owner field. If PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP is defined, use it. (k5_os_mutex_lock, k5_os_mutex_unlock, k5_os_mutex_assert_locked) [pthread case]: Use k5_pthread_ versions. (k5_mutex_destroy): Update the location data with the mutex locked, before destroying it. (k5_mutex_unlock): Update the location data while the mutex is still locked, and check the assertion that the mutex really is locked. Convert inline function to macro. * k5-thread.h (krb5int_mutex_lock_update_stats, krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [!DEBUG_THREADS_STATS]: Declare KRB5_CALLCONV. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17031 dc483132-0cff-0310-8789-dd5450dbe970
* * error_message.c (com_err_terminate): Lock the list mutex before walkingKen Raeburn2005-01-142-1/+8
| | | | | | | | | through it; unlock and destroy it afterwards. ticket: 2878 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17030 dc483132-0cff-0310-8789-dd5450dbe970
* profile code never destroys its per-file mutexesKen Raeburn2005-01-142-6/+12
| | | | | | | | | | * prof_file.c (profile_free_file_data): Destroy mutex before freeing containing structure. ticket: new target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17029 dc483132-0cff-0310-8789-dd5450dbe970
* * ftpd.c: GCC 4.0 fixes... Move static declaration of gunique outEzra Peisach2005-01-132-1/+6
| | | | | | | | | of function. ticket: 2876 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17026 dc483132-0cff-0310-8789-dd5450dbe970
* correction to previous commit. do not call krb5_gss_release_cred()Jeffrey Altman2005-01-131-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
* Tree does not compile with GCC 4.0Ezra Peisach2005-01-132-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
* Fix the calls to krb5_gss_release_cred to pass in the correct type.Jeffrey Altman2005-01-133-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
* * prng.c (read_entropy_from_device): Use ssize_t, not size_t, soTom Yu2005-01-132-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
* * default.exp (start_tail): New proc. Handles GNU tail race condition withKen Raeburn2005-01-122-64/+74
| | | | | | | | | | less delay than the old code that was in start_kerberos_daemons. (start_kerberos_daemons): Call start_tail for both log files. ticket: 2873 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17019 dc483132-0cff-0310-8789-dd5450dbe970
* Fix some potential resource leaks in dnsglue.cTom Yu2005-01-124-18/+48
| | | | | | | ticket: 2872 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17018 dc483132-0cff-0310-8789-dd5450dbe970
* 2005-01-11 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2005-01-122-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
* * krb-root/rlogin.exp (start_rlogin_daemon): Use built-in sleep command.Ken Raeburn2005-01-1210-8/+22
| | | | | | | | | | | | * krb-root/telnet.exp (start_telnet_daemon): Likewise. * krb-standalone/gssftp.exp (start_ftp_daemon): Use built-in sleep command. * krb-standalone/rcp.exp (start_rsh_daemon): Likewise. * krb-standalone/rsh.exp (start_rsh_daemon): Likewise. * krb-standalone/sample.exp (start_sserver_daemon): Likewise. * krb-standalone/v4gssftp.exp (start_ftp_daemon): Likewise. * krb-standalone/v4krb524d.exp (start_k524_daemon): Likewise. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17016 dc483132-0cff-0310-8789-dd5450dbe970
* * default.exp (start_kerberos_daemons): Format date internally rather thanKen Raeburn2005-01-122-2/+7
| | | | | | running "date". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17015 dc483132-0cff-0310-8789-dd5450dbe970
* * gc_frm_kdc.c (krb5_get_cred_from_kdc_opt): Free credentials retrieved fromKen Raeburn2005-01-122-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
* * k5-int.h (krb5int_zap_data): Fix preprocessor test for WindowsKen Raeburn2005-01-092-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17013 dc483132-0cff-0310-8789-dd5450dbe970
* * k5-thread.h (KRB5_CALLCONV, KRB5_CALLCONV_C): Define if not defined.Ken Raeburn2005-01-092-2/+26
| | | | | | | | | (krb5int_mutx_lock_update_stats, krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [!DEBUG_THREADS_STATS]: Declare, with KRB5_CALLCONV. (k5_debug_make_loc): Change "lineno" to type int. (k5_debug_make_loc): Likewise for argument "line". git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17012 dc483132-0cff-0310-8789-dd5450dbe970
* * crc-32.h (mit_crc32): Remove gratuitous "const" in argument declarationKen Raeburn2005-01-082-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17011 dc483132-0cff-0310-8789-dd5450dbe970
* make dependTom Yu2005-01-062-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17007 dc483132-0cff-0310-8789-dd5450dbe970
* Add new function krb5_boolean krb5_is_thread_safe(void) to library.Jeffrey Altman2005-01-059-0/+63
| | | | | | | | | | | | | 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
* * win-mac.h: define NEED_INSIXADDR_ANY for ipv6 symbolJeffrey Altman2005-01-052-0/+5
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17002 dc483132-0cff-0310-8789-dd5450dbe970
* Makefile.in: add krb5 support library to windows klist executableJeffrey Altman2005-01-052-1/+5
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17001 dc483132-0cff-0310-8789-dd5450dbe970
* * configure.in: Check for uint32_t and int32_t in system headersKen Raeburn2005-01-052-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16999 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (krb5.h): Don't pull in autoconf SIZEOF macrosKen Raeburn2005-01-052-1/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16998 dc483132-0cff-0310-8789-dd5450dbe970
* * threads.c (krb5int_mutex_lock_update_stats,Ken Raeburn2005-01-052-0/+24
| | | | | | | krb5int_mutex_unlock_update_stats, krb5int_mutex_report_stats) [_WIN32 && !DEBUG_THREADS_STATS]: Define empty versions for Windows. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16997 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_parse_name not thread-safe, not responsive to environment changesKen Raeburn2005-01-032-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
* run "make depend"Ken Raeburn2004-12-3059-2573/+2772
| | | | | | | | 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
* Do the target object file name hacking in "make depend" earlier, before theKen Raeburn2004-12-305-11/+33
| | | | | | | | | | | | | | | | | line breaks are recomputed, instead of after. This will result in lots of whitespace changes in dependencies in directories that build library object files, but the final output is nicer (fewer long lines), and running "make depend" uses one fewer invocation of sed (balancing out the extra one I added in another checkin earlier today). * config/post.in (.depend): Don't do target name munging here. (.depfix2.sed): Pass extra value $(STLIBOBJS). * util/depfix.sed: Don't change foo.o to $(OUTPRE)foo.$(OBJEXT) here. * util/depgen.sed: Add new argument for STLIBOBJS. Do the OUTPRE/OBJEXT substitution here, and if STLIBOBJS is non-empty, add foo.so and foo.po while we're at it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16986 dc483132-0cff-0310-8789-dd5450dbe970
* * post.in (.depend): Delete blank lines in generated file.Ken Raeburn2004-12-302-21/+29
| | | | | | | (DEP_CFG_VERIFY, DEP_VERIFY, depend-verify-*, .depend-verify-*, .depfix2.sed): Move all the flag files to $(BUILDTOP) so there'll be only one of each. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16985 dc483132-0cff-0310-8789-dd5450dbe970
* Memory leak in asn1_decode_generaltimeEzra Peisach2004-12-282-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
* Memory leaks in ccache due to thread integrationEzra Peisach2004-12-252-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
* * def-check.pl: Check for PRIVATE or INTERNAL annotations in defsTom Yu2004-12-212-1/+13
| | | | | | | | | | file. ticket: 2796 version_reported: 1.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16976 dc483132-0cff-0310-8789-dd5450dbe970
* * krb5.hin: Flag krb5_principal2salt as KRB5_CALLCONV_WRONGTom Yu2004-12-212-1/+5
| | | | | | ticket: 2840 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16975 dc483132-0cff-0310-8789-dd5450dbe970
* * kerberos.c (kerberos4_status): Null-terminate the correctTom Yu2004-12-202-1/+6
| | | | | | | | | | string. Reported by Marcin Garski. ticket: 2838 tags: pullup target_version: 1.4 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16969 dc483132-0cff-0310-8789-dd5450dbe970
* fix MITKRB5-SA-2004-004Tom Yu2004-12-204-35/+296
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16961 dc483132-0cff-0310-8789-dd5450dbe970
* Mark krb5_principal2salt has being declared with the wrong calling conventionJeffrey Altman2004-12-202-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