summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5
Commit message (Collapse)AuthorAgeFilesLines
...
* * t_walk_rtree.c (main): Free context at end to allow searchingEzra Peisach2005-01-282-0/+6
| | | | | | for memory leaks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17072 dc483132-0cff-0310-8789-dd5450dbe970
* Some applications such as Eudora on Windows load and unload the KerberosJeffrey Altman2005-01-172-2/+8
| | | | | | | | | | | 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
* * 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
* Fix some potential resource leaks in dnsglue.cTom Yu2005-01-122-17/+43
| | | | | | | 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
* * 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
* make dependTom Yu2005-01-061-0/+6
| | | | 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-055-0/+52
| | | | | | | | | | | | | 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
* 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-308-1004/+1064
| | | | | | | | 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
* 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
* 2004-12-16 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2004-12-162-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
* remove unnecessary if statementJeffrey Altman2004-12-151-2/+0
| | | | | | ticket: 2814 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16937 dc483132-0cff-0310-8789-dd5450dbe970
* 2004-12-15 Jeffrey Altman <jaltman@mit.edu>Jeffrey Altman2004-12-152-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
* * include/k5-int.h (struct _krb5int_access): Add function pointer fieldKen Raeburn2004-12-082-0/+6
| | | | | | | | | | | 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
* allow build with KRB5_DNS_LOOKUP undefinedTom Yu2004-12-062-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
* fix missing mutex initialization in keytab file codeKen Raeburn2004-11-262-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
* fix missing locking in keytab; fix stdio handling tooKen Raeburn2004-11-242-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
* set errno=0 prior to fopen in kt_fileTom Yu2004-11-242-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
* * locate_kdc.c (krb5int_add_host_to_list): If debugging, log the requestedKen Raeburn2004-11-194-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
* * kt_file.c (krb5_ktfileint_open): Patch from Roland Dowdeswell toTom Yu2004-11-192-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
* * cc_mslsa.c (MSCredToMITCred): Don't create an empty array for addresses, justKen Raeburn2004-11-192-6/+6
| | | | | | use a null pointer now. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16895 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (SHLIB_EXPLIBS): Remove -ldl accidentally added in last changeKen Raeburn2004-11-182-1/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16888 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (SHLIB_EXPDEPS, SHLIB_EXPLIBS): Add support libraryKen Raeburn2004-11-172-2/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16879 dc483132-0cff-0310-8789-dd5450dbe970
* oops, bad updateKen Raeburn2004-11-161-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16877 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2004-11-162-19/+19
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16876 dc483132-0cff-0310-8789-dd5450dbe970
* Now a kvno invocation will only open the ccache file a small number ofKen Raeburn2004-11-162-2/+23
| | | | | | | | | | | | | | times, but there's still excessive seeking and re-reading of data happening. * cc_retr.c (krb5_cc_retrieve_cred_seq): Temporarily clear the KRB5_TC_OPENCLOSE flag on the credentials cache while reading multiple entries from it. ticket: 2763 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16873 dc483132-0cff-0310-8789-dd5450dbe970
* Create a ccache get-flags operation.Ken Raeburn2004-11-168-1/+94
| | | | | | | | | | | | | | | | | | | | The MSLSA and CCAPI versions are untested! * cc_file.c (krb5_fcc_get_flags): New function. (krb5_fcc_ops, krb5_cc_file_ops): Add it. * cc_memory.c (krb5_mcc_get_flags): New function. (krb5_mcc_ops): Add it. * cc_mslsa.c (krb5_lcc_get_flags): New function. (krb5_lcc_ops): Add it. * ccfns.c (krb5_cc_get_flags): New function. * ccapi/stdcc.c (krb5_stdcc_get_flags): New function. (krb5_cc_stdcc_ops): Add it. * ccapi/stdcc.h (krb5_stdcc_get_flags): Declare. ticket: 2763 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16871 dc483132-0cff-0310-8789-dd5450dbe970
* * mk_req_ext.c (krb5_mk_req_extended): Free keyblock beforeTom Yu2004-10-262-0/+10
| | | | | | | | | copying new one in. ticket: 2725 component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16837 dc483132-0cff-0310-8789-dd5450dbe970
* * locate_kdc.c: Include stdarg.h.Ken Raeburn2004-10-212-52/+40
| | | | | | | | | (Tprintf): New function, prints to stderr or not depending on TEST macro. (add_addrinfo_to_list, krb5int_add_host_to_list, krb5_locate_srv_conf_1, krb5_locate_srv_dns_1, krb5int_locate_server): Call it instead of conditionally calling fprintf. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16833 dc483132-0cff-0310-8789-dd5450dbe970
* * dnssrv.c (krb5int_make_srv_query_realm): Append a dot to the hostname, ifKen Raeburn2004-10-192-0/+10
| | | | | | there's room in the buffer, to avoid domain search paths. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16832 dc483132-0cff-0310-8789-dd5450dbe970
* * dnsglue.c (initparse): Skip query type and class when we lackTom Yu2004-10-192-3/+12
| | | | | | | | ns_initparse(). (krb5int_dns_nextans) [!HAVE_NS_INITPARSE]: Pass correct pointer to dn_skipname(). Actually skip the RR name. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16831 dc483132-0cff-0310-8789-dd5450dbe970
* add dependencies for t_*.c test programsKen Raeburn2004-10-192-0/+24
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16829 dc483132-0cff-0310-8789-dd5450dbe970
* make dependKen Raeburn2004-10-192-9/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16828 dc483132-0cff-0310-8789-dd5450dbe970
* ignore t_locate_kdcKen Raeburn2004-10-191-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16827 dc483132-0cff-0310-8789-dd5450dbe970
* * Makefile.in (TEST_PROGS): Add t_locate_kdc.Ken Raeburn2004-10-192-1/+8
| | | | | | | | | (check-unix): Run t_locate_kdc to test fetching DNS SRV records. We probably don't want this test to be part of this test suite long-term, since it relies on external DNS data rather than being self-contained. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16826 dc483132-0cff-0310-8789-dd5450dbe970
* * t_deltat.c (main): Unadorned integer no longer fails now that weTom Yu2004-10-142-1/+6
| | | | | | | | default to seconds. ticket: 2734 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16819 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_string_to_deltat should default to seconds if no unit is provided. If ↵Alexandra Ellwood2004-10-135-721/+541
| | | | | | | | the format is invalid, it should return a distinct error (KRB5_DELTAT_BADFORMAT, not EINVAL) ticket: 2734 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16816 dc483132-0cff-0310-8789-dd5450dbe970
* Fix the forced setting of the Initial Ticket Flag on Win2000 andJeffrey Altman2004-10-082-1/+21
| | | | | | | | add the functionality to XP and 2003 SP1. ticket: 2735 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16814 dc483132-0cff-0310-8789-dd5450dbe970
* * localaddr.c (print_addr): If getnameinfo returns EAI_SYSTEM, report what theKen Raeburn2004-10-062-5/+10
| | | | | | | | system error is. Also fix a fencepost error in the last change. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16809 dc483132-0cff-0310-8789-dd5450dbe970
* * localaddr.c (foreach_localaddr): Be more careful not to walk past the end ofKen Raeburn2004-10-062-6/+13
| | | | | | | the ifreq array. (get_ifreq_array): Return 0 in success case, not errno. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16808 dc483132-0cff-0310-8789-dd5450dbe970
* * localaddr.c (get_ifreq_array): Split out from foreach_localaddr generalKen Raeburn2004-10-062-27/+50
| | | | | | | version. (foreach_localaddr): Call it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16807 dc483132-0cff-0310-8789-dd5450dbe970
* * localaddr.c (foreach_localaddr) [HAVE_STRUCT_IF_LADDRCONF && 0]: FixKen Raeburn2004-10-052-2/+9
| | | | | | | if_laddrreq.iflr_name field name not properly adjusted. The iflr_addr field is an HP-UX specific sockaddr_ext with sa_ field name prefixes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16804 dc483132-0cff-0310-8789-dd5450dbe970
* * localaddr.c (get_if_laddrconf, foreach_localaddr): New implementation forKen Raeburn2004-10-012-0/+205
| | | | | | | HP-UX 11, based on Solaris support and information from Doug Engert. Disabled for now, until it can be tested. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16801 dc483132-0cff-0310-8789-dd5450dbe970