summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* send_tgs.c:Sam Hartman2009-02-231-30/+33
| | | | | | | | | | | | | | * Move generation of subkey into krb5int_send_tgs from construct_authenticator so that it is available for encrypting authorization data. * Initialize rep->message_type and note that rep is touched on unsuccessful calls (this has always been true). * Do not set *subkey until successful return. Thanks to Greg Hudson for pointing out these problems. Ticket: 6393 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22044 dc483132-0cff-0310-8789-dd5450dbe970
* Some fixups and stubs for building ccapi on UNIX, and dependencies.Ken Raeburn2009-02-184-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
* Revert the fopen part of the previous krb5_kuserok change, but keepGreg Hudson2009-02-171-5/+4
| | | | | | | the string-handling change. It introduced an unwanted behavior change when .k5login was detectable but unreadable. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22011 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_kuserok, just try opening .k5login; don't check ahead of timeGreg Hudson2009-02-171-9/+11
| | | | | | | whether it looks accessible. Also rewrite the construction of the .k5login filename to use snprintf instead of strnpy/strncat. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22010 dc483132-0cff-0310-8789-dd5450dbe970
* Correct numerous memory leaks on error conditions in the ASN.1Greg Hudson2009-02-133-299/+1030
| | | | | | decoder functions. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22004 dc483132-0cff-0310-8789-dd5450dbe970
* In tgs_construct_tgsreq, free scratch even if scratch->data is NULL.Greg Hudson2009-02-131-2/+2
| | | | | | | (Which probably can't happen, but static analyzers don't know that.) Also protect scratch from being freed before initialization. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22002 dc483132-0cff-0310-8789-dd5450dbe970
* Implement TGS authenticator subkey usageSam Hartman2009-02-134-35/+52
| | | | | | | | | | | | | | | | | Implement support for use of a subkey in the TGS req. This is needed by FAST TGS support. The interface to krb5_send_tgs changed in order to gain a subkey output parameter. Since this is a private interface it was renamed to krb5int_send_tgs and removed from the export list. * send_tgs.c: generate a subkey and return to caller * decode_kdc_rep.c: Use subkey keyusage * gc_via_tkt.c: pass in subkey to decode_kdc_rep * send_tgs.c: use subkey for encrypting authorization data ticket: 6393 tags: enhancement git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21993 dc483132-0cff-0310-8789-dd5450dbe970
* Don't apply 'const' twice. Make kg_arcfour_l40 staticKen Raeburn2009-02-121-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21987 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_get_in_tkt_with_password, free opte before returning the errorGreg Hudson2009-02-121-1/+1
| | | | | | from krb5_unparse_name, not after. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21985 dc483132-0cff-0310-8789-dd5450dbe970
* Make output parameter of krb5_generate_subkey_extended well-defined onGreg Hudson2009-02-121-7/+15
| | | | | | error, and reformat function to fit coding standards. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21984 dc483132-0cff-0310-8789-dd5450dbe970
* Remove useless unsigned >=0 testsKen Raeburn2009-02-121-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21983 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_rc_io_open_internal, d->fn is always set for the cleanupGreg Hudson2009-02-121-6/+4
| | | | | | handler, so do not check it. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21982 dc483132-0cff-0310-8789-dd5450dbe970
* Modify asn12krb5_buf and asn1_do_full_encode to make output parameterGreg Hudson2009-02-122-18/+27
| | | | | | | values well-defined on error. Clean up memory handling and an unused variable in asn1_do_full_encode. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21981 dc483132-0cff-0310-8789-dd5450dbe970
* Fix allocation failure check in walk_rtreeGreg Hudson2009-02-121-1/+1
| | | | | | | | | | | Check the correct variable for null after allocating the server string in rtree_capath_vals. ticket: 6392 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21980 dc483132-0cff-0310-8789-dd5450dbe970
* Ensure we have a free function for every data type we have an ASN.1Greg Hudson2009-02-112-7/+44
| | | | | | | | | decoder for. Export the new free functions, but only declare them in k5-int.h since they shouldn't be needed by applications. Also export a couple of encoder and decoder functions not previously exported. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21969 dc483132-0cff-0310-8789-dd5450dbe970
* Add test for krb5_cc_get_principal and ensure returned value correctEzra Peisach2009-02-111-1/+22
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21967 dc483132-0cff-0310-8789-dd5450dbe970
* remove local objects from list for windowsKen Raeburn2009-02-111-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21965 dc483132-0cff-0310-8789-dd5450dbe970
* remove des425 syms; add some new dce,iov syms needed for gssapiKen Raeburn2009-02-111-9/+18
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21964 dc483132-0cff-0310-8789-dd5450dbe970
* pull in unicode stuff on windowsKen Raeburn2009-02-111-2/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21961 dc483132-0cff-0310-8789-dd5450dbe970
* hide stat buf init on windowsKen Raeburn2009-02-111-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21960 dc483132-0cff-0310-8789-dd5450dbe970
* make build on windows, in current makefile frameworkKen Raeburn2009-02-112-5/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21959 dc483132-0cff-0310-8789-dd5450dbe970
* Windows version of 'copy a bunch of files around'Ken Raeburn2009-02-111-0/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21958 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_ccache_internalize: fix resource leaks, fix several casesGreg Hudson2009-02-101-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
* In the ccache serialization code, remove some unnecessary checks forGreg Hudson2009-02-101-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
* Fix a memory leak (unlikely to happen in practice) in krb5_mcc_store;Greg Hudson2009-02-101-5/+6
| | | | | | use a cleanup handler for robustness. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21950 dc483132-0cff-0310-8789-dd5450dbe970
* Adjust the structure of krb5_decode.c functions to initialize outputGreg Hudson2009-02-101-375/+432
| | | | | | | | parameters to NULL and not set them to the real values until a successful return is guaranteed. Also fix get_eoc which was returning without clean_return. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21940 dc483132-0cff-0310-8789-dd5450dbe970
* Make asn1buf_destroy return void, since it's a free function. InGreg Hudson2009-02-093-23/+23
| | | | | | | krb5_encode.c functions, make *code well-defined in case of error, and clean up some memory leaks. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21928 dc483132-0cff-0310-8789-dd5450dbe970
* In asn1_k_encode.c, stop inconsistently destroying buf on some errors.Greg Hudson2009-02-091-23/+7
| | | | | | It belongs to the caller. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21927 dc483132-0cff-0310-8789-dd5450dbe970
* Fix one more case of an explicit null check before calling a freeKen Raeburn2009-02-091-7/+2
| | | | | | | | | | | function that does the null check. Also, use krb5_free_keyblock_contents instead of open-coding all the work (and not trying hard enough to clear the memory). ticket: 6377 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21926 dc483132-0cff-0310-8789-dd5450dbe970
* Check if mem allocation was successfulZhanna Tsitkov2009-02-091-127/+115
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21925 dc483132-0cff-0310-8789-dd5450dbe970
* Fix possible free of uninitialized value in walk_rtreeGreg Hudson2009-02-091-1/+1
| | | | | | | | | | | | | In rtree_hier_realms, if the first rtree_hier_tweens call failed, the cleanup handler would free stweens which had not been initialized. Initialize ctweens and stweens to NULL in the variable declarations to make the cleanup handler safe. ticket: 6379 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21924 dc483132-0cff-0310-8789-dd5450dbe970
* Change contract of krb5int_utf8_normalize and fix memory leaksGreg Hudson2009-02-092-42/+49
| | | | | | | | | | | | Make krb5int_utf8_normalize return a krb5_error_code and always allocate a structure to be placed in the output parameter. Adjust the function structure to use a cleanup handler, fixing many memory leaks. ticket: 6378 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21923 dc483132-0cff-0310-8789-dd5450dbe970
* Provide omitted return value in last changeKen Raeburn2009-02-091-1/+1
| | | | | | ticket: 6377 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21922 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unused fileKen Raeburn2009-02-091-161/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21921 dc483132-0cff-0310-8789-dd5450dbe970
* make krb5_free_* functions ignore NULLKen Raeburn2009-02-096-230/+191
| | | | | | | | | | | | This makes them safer to call in various contexts where NULL may leak through, and makes analysis easier. Also, remove some checks for NULL before calling a free routine that will also check for NULL. ticket: 6377 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21920 dc483132-0cff-0310-8789-dd5450dbe970
* use unsigned value for shifting, avoiding undefined behaviorKen Raeburn2009-02-091-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21914 dc483132-0cff-0310-8789-dd5450dbe970
* Memory handling fixes in walk_rtreeGreg Hudson2009-02-061-13/+35
| | | | | | | | | | | | | In walk_rtree's rtree_hier_tree, don't leak the result of rtree_hier_realms. In rtree_hier_realms, avoid freeing one too many krb5_data contents on allocation failure, and use the recommend pattern to ensure well-defined output parameter values. ticket: 6376 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21912 dc483132-0cff-0310-8789-dd5450dbe970
* Fix whitespace on previous commit to ure.c. Correct two other casesGreg Hudson2009-02-061-4/+6
| | | | | | | where %lX was used with a krb5_ui_4 type argument without a cast to unsigned long. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21911 dc483132-0cff-0310-8789-dd5450dbe970
* Pass the correct width argument to fprintf for URE_CHAR inGreg Hudson2009-02-061-1/+2
| | | | | | ure_write_dfa. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21910 dc483132-0cff-0310-8789-dd5450dbe970
* Fix error handling in krb5_walk_realm_treeGreg Hudson2009-02-061-1/+1
| | | | | | | | | | | | rtree_hier_realms was forgetting to assign the return value of krb5int_copy_data_contents to retval, which would cause a failure to notice out-of-memory conditions. ticket: 6375 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21909 dc483132-0cff-0310-8789-dd5450dbe970
* Unsigned/signed fixesEzra Peisach2009-02-064-5/+6
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21908 dc483132-0cff-0310-8789-dd5450dbe970
* Change variable accepting return from strftime to time_t. ThisEzra Peisach2009-02-061-1/+1
| | | | | | matches prototype for function and removes a signed/unsigned warning. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21907 dc483132-0cff-0310-8789-dd5450dbe970
* Do not assume sizeof(bool_t) == sizeof(krb5_boolean)Ezra Peisach2009-02-061-3/+26
| | | | | | | | | | | | | bool_t is defined as int, krb5_boolean as unsigned int. These are similar size but someone someday might change the krb5_boolean. Instead of passing a krb5_boolean * to xdr_bool, implement xdr_krb5_boolean which keeps the different types separate. This cleans up a number of warnings. ticket: 6374 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21906 dc483132-0cff-0310-8789-dd5450dbe970
* Cleanup some warnings due to getsockname's third argument is sometimesEzra Peisach2009-02-063-4/+15
| | | | | | unsigned. Use GETSOCKNAME_ARG3_TYPE and fallback to int if not defined. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21904 dc483132-0cff-0310-8789-dd5450dbe970
* remove some redundant or useless qualifiersKen Raeburn2009-02-061-24/+24
| | | | | | | | | | | Remove some redundant qualifiers specified redundantly multiple times more than once in variable declarations. Also remove some useless qualifiers in casts and function argument declarations. ticket: 6373 target_version: 1.7 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21903 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory handling bug in mk_req_extGreg Hudson2009-02-051-2/+1
| | | | | | | | | | | In make_etype_list, assign *authdata before we have a chance to fail, since we may have invalidated the previous value with realloc. ticket: 6372 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21901 dc483132-0cff-0310-8789-dd5450dbe970
* deal with memleaks in migrate mkey projectWill Fiveash2009-02-052-6/+11
| | | | | | | | | | | | | Ken R. told me that Coverity found several potential memleaks introduced by the mkey migration project. This addresses those leaks and tweaks the code formatting in a few places. ticket: 6371 Version_Reported: 1.7 Target_Version: 1.7 Tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21900 dc483132-0cff-0310-8789-dd5450dbe970
* In gc_frm_kdc.c's do_traversal(), fix an assert which was doing anGreg Hudson2009-02-051-1/+1
| | | | | | assignment instead of a compare. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21899 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_rc_io_store, check the return value of krb5int_buf_len as wellGreg Hudson2009-02-051-4/+6
| | | | | | | as krb5int_buf_data. The length can't be negative if the data is non-NULL, but Coverity doesn't know that. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21898 dc483132-0cff-0310-8789-dd5450dbe970
* In recvauth_common, initialize ap_option. It can't be usedGreg Hudson2009-02-051-1/+1
| | | | | | | uninitialized, but you can only deduce that by examining the relationships between ap_option, problem, and outbuf. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21897 dc483132-0cff-0310-8789-dd5450dbe970