summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
* Use capaths unconditionally. Update copyrightKen Raeburn2008-08-221-12/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20686 dc483132-0cff-0310-8789-dd5450dbe970
* lean client changesZhanna Tsitkov2008-08-2033-43/+234
| | | | | | | | | All changes are under LEAN_CLIENT macro. Application server functionality is disabled. Ticket:new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20680 dc483132-0cff-0310-8789-dd5450dbe970
* Fix broken build -- conditionalize some stuff on DISABLE_PKINIT that IKen Raeburn2008-08-192-1/+5
| | | | | | | | missed last time. ticket: 6076 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20675 dc483132-0cff-0310-8789-dd5450dbe970
* Using gcov, it was noted that the tests were never including authdataEzra Peisach2008-08-171-8/+86
| | | | | | | in the test credential - and a segment of code was never tested. Add some fake authdata to the test creds. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20668 dc483132-0cff-0310-8789-dd5450dbe970
* In parsing authorization data, if run out of memory, the authorizationEzra Peisach2008-08-162-2/+6
| | | | | | | data was released, but the pointer not zeroed. This resulted in higher level code trying to free it again. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20667 dc483132-0cff-0310-8789-dd5450dbe970
* In copying a credential - if we run out memory - the cleanup code failed to ↵Ezra Peisach2008-08-161-3/+5
| | | | | | clear the second_ticket git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20666 dc483132-0cff-0310-8789-dd5450dbe970
* Move internal cccursor structures/prototypes to the ccache private includeEzra Peisach2008-08-163-2/+23
| | | | | | | file. Functions are not exported from library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20665 dc483132-0cff-0310-8789-dd5450dbe970
* Conditionalize building of CCAPI ccache type on USE_CCAPIAlexandra Ellwood2008-08-154-13/+22
| | | | | | | | | Still refer to Windows by OS macro because KfW builds do not set USE_CCAPI. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20664 dc483132-0cff-0310-8789-dd5450dbe970
* Move prototype for krb5int_random_string from k5-int.h to cc-int.h asEzra Peisach2008-08-154-4/+6
| | | | | | | it is private to the ccache code. Include cc-int.h where needed, and update Makefile.in dependencies. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20662 dc483132-0cff-0310-8789-dd5450dbe970
* a stash file is not a keytabWill Fiveash2008-08-1510-109/+283
| | | | | | | | | Note, this is the commit for the associated Krb Consortium project: Projects/Masterkey Keytab Stash ticket: 194 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20661 dc483132-0cff-0310-8789-dd5450dbe970
* If the LDAP KDB back end is being built, define ENABLE_LDAP. IfKen Raeburn2008-08-142-2/+12
| | | | | | | | ENABLE_LDAP is not defined, don't build the LDAP KDB ASN.1 encoding and decoding functions, and use null pointers for them in the accessor function table. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20659 dc483132-0cff-0310-8789-dd5450dbe970
* In parsing principal - if run out memory - clean up after ourselves. Ezra Peisach2008-08-142-2/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20658 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5int_copy_creds_contents - if we run out of memory, do notEzra Peisach2008-08-141-1/+2
| | | | | | release pointer to output creds structure that is passed in by caller. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20657 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up memory leak in krb5_build_principal if we run out of memoryEzra Peisach2008-08-141-0/+3
| | | | | | while building pricipal. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20656 dc483132-0cff-0310-8789-dd5450dbe970
* Error return from krb5int_random_string not tested in ccache codeEzra Peisach2008-08-142-2/+13
| | | | | | | | | krb5int_random_string should probably only fail on malloc failure. Test for an error return from the function and cleanup properly (release mutex, return error instead of using uninitialized memory). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20655 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_fcc_read_addrs returns pointer to released memory on malloc failreEzra Peisach2008-08-141-0/+1
| | | | | | | | In cleanup code on malloc failure, addresses are released including pointer to the krb5_address * - but the freed value is returned to caller. Clear pointer. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20654 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_fcc_resolve file locking error on malloc failuerEzra Peisach2008-08-141-1/+2
| | | | | | | | | | | | | | | | | In krb5_fcc_resolve, on malloc failure, the data->lock mutex needs to be destroyed. Unfortunately, this is done with the mutex is still locked. When thread debugging code is enabled, this results in aeg fault. Also - in krb5_fcc_generate_new, a strdup failure would result in the krb5int_cc_file_mutex being unlocked twice. [I have a modified version of valgrind in which I can signal after a certain number of mallocs for it to fail - I vary the allocation number from 1300 to 0 - and see what breaks - some memory leaks will be fixed separately] ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20653 dc483132-0cff-0310-8789-dd5450dbe970
* Don't build PKINIT ASN.1 support code if not building PKINIT pluginKen Raeburn2008-08-133-46/+61
| | | | | | | | | | | | | | | | | | | If --disable-pkinit is given at configure time, don't build the PKINIT plugin. If the PKINIT plugin is not going to be built, define DISABLE_PKINIT. If DISABLE_PKINIT is defined, don't build the PKINIT-related ASN.1 encoding and decoding routines, and fill their slots in the accessor function table with null pointers. Tweak the accessor table initialization to use conditionally-varying macros rather than conditionally selecting between two blocks of invocations of fixed macros. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20652 dc483132-0cff-0310-8789-dd5450dbe970
* Open log file for appending only, not also readingAlexandra Ellwood2008-08-131-1/+1
| | | | | | ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20651 dc483132-0cff-0310-8789-dd5450dbe970
* Use a valid UTF8 password for randkey passwordAlexandra Ellwood2008-08-131-3/+5
| | | | | | | | KfM RC4 string to key function expects password to be valid UTF8 ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20650 dc483132-0cff-0310-8789-dd5450dbe970
* Rewrite the building of the ccache-type linked list to be linearKen Raeburn2008-08-122-25/+37
| | | | | | | | | instead of branched, and thus a bit easier to follow and modify. If NO_FILE_CCACHE is defined, leave the file cache out of the list, and (if we're not using ccapi) use the memory cache as the default. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20649 dc483132-0cff-0310-8789-dd5450dbe970
* If CONFIG_SMALL_NO_CRYPTO is defined, turn off CONFIG_SMALL changes for ↵Ken Raeburn2008-08-126-12/+12
| | | | | | crypto code only git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20648 dc483132-0cff-0310-8789-dd5450dbe970
* Update copyright notices to reflect donation of DES implementation byTom Yu2008-08-126-33/+143
| | | | | | | | Dennis Ferguson. ticket: 6070 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20642 dc483132-0cff-0310-8789-dd5450dbe970
* Disable CONFIG_SMALL optimizations for nowKen Raeburn2008-08-071-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20635 dc483132-0cff-0310-8789-dd5450dbe970
* Don't use memcmp for comparing structures of valuesKen Raeburn2008-08-071-2/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20634 dc483132-0cff-0310-8789-dd5450dbe970
* Don't leak attr_types storage on errorKen Raeburn2008-08-071-9/+27
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20633 dc483132-0cff-0310-8789-dd5450dbe970
* sequence_of_no_tagvars declared variables used only inKen Raeburn2008-08-071-20/+16
| | | | | | | | end_sequence_of_no_tagvars and only as unnecessary temporaries, so get rid of them; also, push most of the work of the latter macro into a helper function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20632 dc483132-0cff-0310-8789-dd5450dbe970
* get_eoc() is always followed by next_tag(), so don't bother settingKen Raeburn2008-08-072-26/+16
| | | | | | | the variables that it's about to clobber. Since we don't need any of the tag info at the call site, push it down into the helper function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20631 dc483132-0cff-0310-8789-dd5450dbe970
* malloc+memset(,0,) -> callocKen Raeburn2008-08-0719-84/+43
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20630 dc483132-0cff-0310-8789-dd5450dbe970
* Pull out EOC error checks into separate functionsKen Raeburn2008-08-072-12/+34
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20629 dc483132-0cff-0310-8789-dd5450dbe970
* Use bitfields for class and construction typeKen Raeburn2008-08-071-0/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20628 dc483132-0cff-0310-8789-dd5450dbe970
* Rewrite tagnum-checking code to streamline normal path and push refinedKen Raeburn2008-08-075-33/+40
| | | | | | | | | | | error code selection into error path. Don't expand asn1buf_insert_octet inline or define asn1buf_ensure_space macro if CONFIG_SMALL. Remove some null-before-free checks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20626 dc483132-0cff-0310-8789-dd5450dbe970
* Check fstat result. Close fd on errorKen Raeburn2008-08-061-1/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20624 dc483132-0cff-0310-8789-dd5450dbe970
* Remove some 'register' declarationsKen Raeburn2008-08-061-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20621 dc483132-0cff-0310-8789-dd5450dbe970
* Rewrite conditional test for update log processing to make static analysis ↵Ken Raeburn2008-08-061-4/+4
| | | | | | simpler git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20620 dc483132-0cff-0310-8789-dd5450dbe970
* After freeing dbprinc, reset it to nullKen Raeburn2008-08-061-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20619 dc483132-0cff-0310-8789-dd5450dbe970
* In loop over entries, make local vars local to each iterationKen Raeburn2008-08-061-11/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20618 dc483132-0cff-0310-8789-dd5450dbe970
* Fully initialize handle data on allocationKen Raeburn2008-08-061-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20617 dc483132-0cff-0310-8789-dd5450dbe970
* Don't coerce fgetc value to char before EOF checkKen Raeburn2008-08-061-2/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20616 dc483132-0cff-0310-8789-dd5450dbe970
* fix cleanup code in allocating preauth infoKen Raeburn2008-08-061-2/+2
| | | | | | | | | | | | After an allocation failure, free up the previously allocated array elements by counting back down to zero, not continuing to count up until we hit zero. ticket: new target_version: 1.6.4 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20608 dc483132-0cff-0310-8789-dd5450dbe970
* specify return type of 'harmless'Ken Raeburn2008-08-051-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20605 dc483132-0cff-0310-8789-dd5450dbe970
* Use load/store_32/16_be/le functionsKen Raeburn2008-08-023-23/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20603 dc483132-0cff-0310-8789-dd5450dbe970
* Pull out two copies of errno mapping into a common functionKen Raeburn2008-08-021-60/+42
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20602 dc483132-0cff-0310-8789-dd5450dbe970
* Use load_store_16/32_beKen Raeburn2008-08-022-10/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20601 dc483132-0cff-0310-8789-dd5450dbe970
* Make more uses of load/store_32_be/le, which on x86 at least expandsKen Raeburn2008-08-027-67/+22
| | | | | | | to a single unaligned load/store instruction, instead of open-coding the shifts and masks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20599 dc483132-0cff-0310-8789-dd5450dbe970
* Use GET_HALF_BLOCK to fetch new values instead of open-codingKen Raeburn2008-08-022-16/+10
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20598 dc483132-0cff-0310-8789-dd5450dbe970
* Use krb5int_random_string, load_32_be, load_16_be, store_32_be, andKen Raeburn2008-08-021-66/+6
| | | | | | | store_16_be. Change krb5_krcc_unparse_int32 to call krb5_krc_unparse_ui_4 and reduce duplicated code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20597 dc483132-0cff-0310-8789-dd5450dbe970
* Rename and export random_string from cc_memory.cKen Raeburn2008-08-021-5/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20596 dc483132-0cff-0310-8789-dd5450dbe970
* Reduce code duplication: krb5_fcc_store_int32 vs krb5_fcc_store_ui_4Ken Raeburn2008-08-021-18/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20595 dc483132-0cff-0310-8789-dd5450dbe970
* Two versions of resolver code were almost identical, so unify them and ↵Ken Raeburn2008-08-021-37/+11
| | | | | | reduce duplication. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20594 dc483132-0cff-0310-8789-dd5450dbe970