summaryrefslogtreecommitdiffstats
path: root/src/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Change krb5_rc_resolve_type (not a public API) to allocate the rcacheGreg Hudson2009-02-052-37/+38
| | | | | | | structure. Make output parameter values of krb5_rc_resolve_type and krb5_rc_default well-defined in case of errors. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21896 dc483132-0cff-0310-8789-dd5450dbe970
* Detect failure to register with rpcbind/portmap due to securityEzra Peisach2009-02-054-3/+28
| | | | | | | | restrictons and not bomb out in tests. ticket: 6349 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21895 dc483132-0cff-0310-8789-dd5450dbe970
* Add a missing break in the switch statement ofGreg Hudson2009-02-051-0/+1
| | | | | | | | | | krb5int_setpw_result_code_string. ticket: 6368 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21894 dc483132-0cff-0310-8789-dd5450dbe970
* Create and use (in several places) a variant ofKen Raeburn2009-02-055-68/+55
| | | | | | | krb5int_copy_data_contents that adds a trailing '\0' so the result can be used as a C string. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21893 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_ktfileint_find_slot, check for an error return from ftell.Greg Hudson2009-02-051-0/+3
| | | | | | | (Such an error will never happen in any reasonable stdio implementation but it's more correct to check.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21892 dc483132-0cff-0310-8789-dd5450dbe970
* Coverity was nervous that hst_realm.c's domain_heuristic() wasn'tGreg Hudson2009-02-051-10/+10
| | | | | | | | | checking for a NULL return from strchr. The code was safe because a previous call to strchr on the same argments was checked, but make Coverity less nervous by storing the result of that previous call and reusing it. Also make the function conform better to our standards. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21891 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a memory leak in krb5_kt_resolve when we fail to lockGreg Hudson2009-02-051-6/+9
| | | | | | | | | | kt_typehead_lock. ticket: 6367 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21890 dc483132-0cff-0310-8789-dd5450dbe970
* include omitted system header string.hKen Raeburn2009-02-051-0/+1
| | | | | | | | | | | Sun cc warns about some of the string functions being undeclared in several source files. So, include string.h there. ticket: 6365 target_version: 1.7 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21889 dc483132-0cff-0310-8789-dd5450dbe970
* int/ptr bug in gssapi codeKen Raeburn2009-02-051-1/+1
| | | | | | | | | | | | Fix a pointer argument passed where an integer is needed. Update Sun compiler options to make that an error. (The options we're currently using make it an error for assignment but not for argument passing.) ticket: 6363 target_version: 1.7 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21887 dc483132-0cff-0310-8789-dd5450dbe970
* don't do arithmetic on void pointersKen Raeburn2009-02-041-2/+2
| | | | | | | | | Fix one file in gssapi where we compute offsets from a void* without casting. Change options used with Sun compiler to make such expressions an error. ticket: 6362 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21886 dc483132-0cff-0310-8789-dd5450dbe970
* new multi-masterkey support doesn't work well when system clock is setWill Fiveash2009-02-041-11/+18
| | | | | | | | | | back The ticket contains the details. ticket: 6361 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21884 dc483132-0cff-0310-8789-dd5450dbe970
* Remove xfread/xfwrite macros. Casting the first argument to char * isGreg Hudson2009-02-041-36/+33
| | | | | | | | unnecessary (fread's first argument is void *, which does not require a cast) and confuses Coverity's UNINIT checker; casting the third argument to unsigned is not necessary for our current set of warnings. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21883 dc483132-0cff-0310-8789-dd5450dbe970
* Use macros for config parametersZhanna Tsitkov2009-02-0416-111/+111
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21879 dc483132-0cff-0310-8789-dd5450dbe970
* prefer structure assignment to memcpyKen Raeburn2009-02-034-9/+9
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21876 dc483132-0cff-0310-8789-dd5450dbe970
* Remove unnecessary pointer casts in args to free,memcpy,memset,memchr except ↵Ken Raeburn2009-02-0248-112/+107
| | | | | | unicode, windows code git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21875 dc483132-0cff-0310-8789-dd5450dbe970
* TWRITE_STR casts second argument; don't add redundant castingKen Raeburn2009-02-021-3/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21874 dc483132-0cff-0310-8789-dd5450dbe970
* Get rid of casts of free() argument to char*, except where it'sKen Raeburn2009-02-027-25/+20
| | | | | | | | 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
* address lib/kadm5 test suite slownessKen Raeburn2009-02-022-0/+2
| | | | | | | | | | | | In mod-principal tests for clearing the principal's policy, instead of just testing to see if the wrong string is output and timing out looking for it, check also for the new expected value. Cuts test suite run time by about two minutes for each pass (client vs server). ticket: 6357 target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21866 dc483132-0cff-0310-8789-dd5450dbe970
* comment needed some grammatical/typographical fixes tooKen Raeburn2009-02-021-11/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21864 dc483132-0cff-0310-8789-dd5450dbe970
* comment whitespaceKen Raeburn2009-02-021-11/+11
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21863 dc483132-0cff-0310-8789-dd5450dbe970