aboutsummaryrefslogtreecommitdiff
path: root/src/lib/krb5/ccache
AgeCommit message (Collapse)AuthorFilesLines
2009-12-14fast negotiation projecSam Hartman2-2/+164
Merge branches/fast-negotiate into trunk. This implements http://k5wiki.kerberos.org/wiki/Projects/Fast_negotiation Additional changes: * krb5_c_make_checksum with checksum type 0 uses mandatory checksum for given key enctype Conflicts: src/lib/crypto/krb/make_checksum.c ticket: 6595 Tags: enhancement git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23465 dc483132-0cff-0310-8789-dd5450dbe970
2009-11-30ReindentZhanna Tsitkov2-39/+29
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23393 dc483132-0cff-0310-8789-dd5450dbe970
2009-11-22Consolidate Makefile variables now that we have only a single globalGreg Hudson4-109/+105
configure script: $(SRCTOP) --> $(top_srcdir) $(srcdir)/$(thisconfigdir) --> $(top_srcdir) $(thisconfigdir) --> $(BUILDTOP) $(myfulldir) --> $(mydir) ticket: 6583 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23308 dc483132-0cff-0310-8789-dd5450dbe970
2009-11-02Clean up a bunch of signed/unsigned comparison warningsGreg Hudson2-14/+12
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23120 dc483132-0cff-0310-8789-dd5450dbe970
2009-10-31In lib/krb5/ccache, ensure that function definition headers haveGreg Hudson4-16/+28
function names at the beginnings of lines. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23107 dc483132-0cff-0310-8789-dd5450dbe970
2009-10-31make mark-cstyleTom Yu25-4803/+4825
make reindent git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23100 dc483132-0cff-0310-8789-dd5450dbe970
2009-10-10Move destest to builtin/des, because it depends on overriding someTom Yu1-36/+42
internals. Make depend. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22877 dc483132-0cff-0310-8789-dd5450dbe970
2009-10-09Implement GSS naming extensions and authdata verificationGreg Hudson2-4/+4
Merge Luke's users/lhoward/authdata branch to trunk. Implements GSS naming extensions and verification of authorization data. ticket: 6572 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22875 dc483132-0cff-0310-8789-dd5450dbe970
2009-09-16Re-run make depend without autoconf.h in the source treeGreg Hudson1-74/+68
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22775 dc483132-0cff-0310-8789-dd5450dbe970
2009-09-16Crypto modularity proj.: Move prf and random-to-key ops from backend to krbZhanna Tsitkov1-68/+74
bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22769 dc483132-0cff-0310-8789-dd5450dbe970
2009-08-21Use {load,store}_{16,32}_be for big-endian integersKen Raeburn1-17/+4
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22568 dc483132-0cff-0310-8789-dd5450dbe970
2009-06-21Update comments to reflect reality and the fact that this is not a file basedEzra Peisach1-20/+28
cache. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22419 dc483132-0cff-0310-8789-dd5450dbe970
2009-04-23In krb5_fcc_read, remove an assert which could never trigger (becauseGreg Hudson1-1/+0
len is unsigned and cannot be less than zero). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22274 dc483132-0cff-0310-8789-dd5450dbe970
2009-04-13krb5_fcc_generate_new was destroying a locked mutex in the err_outGreg Hudson1-0/+1
label, which is used for I/O failures. Unlock the mutex first. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22200 dc483132-0cff-0310-8789-dd5450dbe970
2009-04-12Remove dead assignment of variables that are never usedEzra Peisach2-5/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22194 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-18Some fixups and stubs for building ccapi on UNIX, and dependencies.Ken Raeburn4-4/+27
(Doesn't make a complete working implementation, but it mostly compiles.) Does *not* include the changes to actually cause the ccapi code to get built in normal UNIX builds. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22023 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-11Add test for krb5_cc_get_principal and ensure returned value correctEzra Peisach1-1/+22
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21967 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-10In krb5_ccache_internalize: fix resource leaks, fix several casesGreg Hudson1-25/+46
where success could be returned on failure, validate the length of the ccache name, make the value of *argp well-defined on failure, and lay out the function in a linear style with a cleanup handler. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21952 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-10In the ccache serialization code, remove some unnecessary checks forGreg Hudson1-4/+3
nullity of ccache->ops; we assume a valid ops pointer in neighboring parts of the code. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21951 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-10Fix a memory leak (unlikely to happen in practice) in krb5_mcc_store;Greg Hudson1-5/+6
use a cleanup handler for robustness. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21950 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-02Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except ↵Ken Raeburn1-1/+1
unicode, windows code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875 dc483132-0cff-0310-8789-dd5450dbe970
2009-02-02Get rid of casts of free() argument to char*, except where it'sKen Raeburn2-6/+6
casting away const (so as to make this change warning-neutral), and in unicode source (which we may want to keep in sync with another source), and krb5_xfree macro (to be handled separately). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21870 dc483132-0cff-0310-8789-dd5450dbe970
2009-01-28Start to phase out krb5_xfree macro, which just casts its argument toKen Raeburn4-44/+44
char* and calls free. Replace most uses, outside of the LDAP KDB plugin, which doesn't build on my test system of the moment because of version dependencies. Add one explicit cast to make the change warning-neutral (under gcc 4.0.1 on Mac OS X 10.5.6). git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21812 dc483132-0cff-0310-8789-dd5450dbe970
2009-01-05move generated dependencies out of Makefile.inKen Raeburn2-128/+126
Move automatically-generated dependencies into separate files in the source tree, and take the data out of Makefile.in. Keep the "make depend" rules for stripping out the dependencies from Makefile.in, in case some optional directories were missed, but everything that builds on my UNIX build has been converted. (Converting a directory just requires creating an empty "deps" file so that config.status can build the makefile, and then later running "make depend" in that directory to get the correct content for it.) Change configure scripts to incorporate the "deps" file when building each Makefile. This change requires the existence of a file "deps" in each source directory where we build a makefile, even if there are no sources for which to compute dependencies; a switch to GNU make would let us conditionalize that, but we can assess that later. Update dependencies for the generate Makefile itself to list the deps file. This will also require some minor tweaking of the Windows build, to make it incorporate the new deps file. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21701 dc483132-0cff-0310-8789-dd5450dbe970
2008-12-18Mem leak fixZhanna Tsitkov1-1/+2
Ticket: 6285 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21542 dc483132-0cff-0310-8789-dd5450dbe970
2008-12-13Fixed memory leak in krb5_stdccv3_removeZhanna Tsitkov1-1/+5
Ticket: 6299 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21362 dc483132-0cff-0310-8789-dd5450dbe970
2008-12-05When storing info into cred cache, remove any dups. Zhanna Tsitkov1-4/+9
Ticket: 6291 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21292 dc483132-0cff-0310-8789-dd5450dbe970
2008-12-01make dependEzra Peisach1-1/+1
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21206 dc483132-0cff-0310-8789-dd5450dbe970
2008-12-01Move cc_mutex code from k5-int.h - where it is globally available to cc-int.hEzra Peisach2-1/+31
where it is declared and used. The functions are not exported by the library - nor are they used outside lib/krb5/ccache... For cc_file.h - include cc-int.h. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21205 dc483132-0cff-0310-8789-dd5450dbe970
2008-11-04Don't build dependencies for v4rcp.c.Ken Raeburn1-66/+72
Rebuild dependencies for k5-buf.h, and without krb4 support. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20964 dc483132-0cff-0310-8789-dd5450dbe970
2008-10-29Only prompt automatically from GUI appsAlexandra Ellwood1-1/+2
Direct callers such as kinit need command line prompts. Do not automatically prompt (via krb5 or gssapi calls) unless the caller has loaded GUI libraries. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20937 dc483132-0cff-0310-8789-dd5450dbe970
2008-10-23Use snprintf instead of strcpy/strcat in many placesGreg Hudson1-2/+1
ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20912 dc483132-0cff-0310-8789-dd5450dbe970
2008-10-20Use strdup in place of malloc/strcpy in many placesGreg Hudson2-13/+5
ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20898 dc483132-0cff-0310-8789-dd5450dbe970
2008-10-01Finished KLL to KIM shim.Alexandra Ellwood1-18/+36
Switched krb5 code to using it. ticket: 6134 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20796 dc483132-0cff-0310-8789-dd5450dbe970
2008-09-22Merge 1.7 work on auxiliary ccache functions necessary for KIM. Adds ↵Justin Anderson9-181/+966
krb5_cc_lock/unlock, krb5_cccol_lock/unlock, krb5_cc_last_change_time, krb5_cccol_last_change_time, krb5_cc_move, and adds pertype cursor support to some cache types Locking functions work the same as the CCAPI cc_ccache_lock / cc_context_lock functions, though not as read/write locks. ticket: 6124 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20743 dc483132-0cff-0310-8789-dd5450dbe970
2008-09-18makedependKen Raeburn1-62/+68
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20731 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-27Based on patch from lxs, with some changes:Ken Raeburn1-1/+1
Add several new gcc warning flags, used in the KfM build process. Put declarations before code. Fix a bunch of signed/unsigned type mixes, mostly by changing variable types to unsigned int. Fix constness in handling name of default ccache name. Make sure functions get declared with prototypes: krb5int_pthread_loaded krb5int_gmt_mktime krb5int_aes_encrypt krb5int_aes_decrypt gssint_mecherrmap_init gssint_mecherramp_get. Don't shadow global names: stat accept index open encrypt. Fix variable shadowing in LDAP ASN.1 support. Don't define unused krb5int_local_addresses. Don't export internal krb5_change_set_password. Fix error return indications from gssint_oid_to_mech. Create and use k5-gmt_mktime.h to provide one global declaration of krb5int_gmt_mktime, needed before we've generated krb5.h on some platforms. Not incorporated from initial patch: const changes in function signatures. ticket: 6096 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20697 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-17Using gcov, it was noted that the tests were never including authdataEzra Peisach1-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
2008-08-16In parsing authorization data, if run out of memory, the authorizationEzra Peisach2-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
2008-08-16Move internal cccursor structures/prototypes to the ccache private includeEzra Peisach3-2/+23
file. Functions are not exported from library. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20665 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-15Conditionalize building of CCAPI ccache type on USE_CCAPIAlexandra Ellwood4-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
2008-08-15Move prototype for krb5int_random_string from k5-int.h to cc-int.h asEzra Peisach4-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
2008-08-14In parsing principal - if run out memory - clean up after ourselves. Ezra Peisach2-2/+10
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20658 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-14Error return from krb5int_random_string not tested in ccache codeEzra Peisach2-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
2008-08-14krb5_fcc_read_addrs returns pointer to released memory on malloc failreEzra Peisach1-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
2008-08-14krb5_fcc_resolve file locking error on malloc failuerEzra Peisach1-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
2008-08-12Rewrite the building of the ccache-type linked list to be linearKen Raeburn2-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
2008-08-07Don't use memcmp for comparing structures of valuesKen Raeburn1-2/+10
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20634 dc483132-0cff-0310-8789-dd5450dbe970
2008-08-02Use krb5int_random_string, load_32_be, load_16_be, store_32_be, andKen Raeburn1-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
2008-08-02Rename and export random_string from cc_memory.cKen Raeburn1-5/+3
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20596 dc483132-0cff-0310-8789-dd5450dbe970