summaryrefslogtreecommitdiffstats
path: root/src/lib/krb5/krb
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert a small part of r22736 which incorrectly fixed a preauthGreg Hudson2009-10-131-4/+2
| | | | | | looping bug in krb5_get_init_creds. A more correct fix will follow. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22888 dc483132-0cff-0310-8789-dd5450dbe970
* Move destest to builtin/des, because it depends on overriding someTom Yu2009-10-101-289/+370
| | | | | | | | internals. Make depend. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22877 dc483132-0cff-0310-8789-dd5450dbe970
* Implement GSS naming extensions and authdata verificationGreg Hudson2009-10-0916-80/+2311
| | | | | | | | | 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
* In krb5_encrypt_helper, return ENOMEM instead of 0 if we can'tGreg Hudson2009-10-061-1/+1
| | | | | | allocate the ciphertext buffer. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22860 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a braino in r22790Greg Hudson2009-09-281-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22791 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a few problems introduced by r22787Greg Hudson2009-09-282-9/+7
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22790 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up krb5_get_credentials:Greg Hudson2009-09-253-65/+59
| | | | | | | | | | | * Use the current coding practice for output parameters. * Rename the helper function krb5_get_credentials_core to krb5int_construct_matching_creds and document it. * Don't fail out if we fail to cache intermediate tgts. * Simplify conditional logic and variable handling. ncreds is now always a temporary holder for the resulting credentials. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22787 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a few bugs in r22736. Cherry-picked from Luke's authdata branchGreg Hudson2009-09-211-5/+5
| | | | | | ticket: 6563 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22780 dc483132-0cff-0310-8789-dd5450dbe970
* Clean up warnings of unused variables that have crept into the source tree..Ezra Peisach2009-09-202-3/+0
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22779 dc483132-0cff-0310-8789-dd5450dbe970
* Re-run make depend without autoconf.h in the source treeGreg Hudson2009-09-161-638/+568
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22775 dc483132-0cff-0310-8789-dd5450dbe970
* Crypto modularity proj.: Move prf and random-to-key ops from backend to krbZhanna Tsitkov2009-09-161-558/+638
| | | | | | bigredbutton: whitespace git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22769 dc483132-0cff-0310-8789-dd5450dbe970
* Implement s4u extensionsGreg Hudson2009-09-1311-132/+1319
| | | | | | | | | Merge Luke's users/lhoward/s4u branch to trunk. Implements S4U2Self and S4U2Proxy extensions. ticket: 6563 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22736 dc483132-0cff-0310-8789-dd5450dbe970
* Re-run make depend. (I am not certain why the dependencies fromGreg Hudson2009-08-031-0/+10
| | | | | | r22477 didn't work for me.) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22482 dc483132-0cff-0310-8789-dd5450dbe970
* Fix of the test cleanup Zhanna Tsitkov2009-08-011-0/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22476 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leak in k5_pac_verify_server_checksumEzra Peisach2009-07-302-1/+5
| | | | | | | | | | k5_pac_verify_server_checksum was leaking memory when the checksum was valid. t_pac.c: Fix memory leak by forgetting to release memory. ticket: 6541 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22474 dc483132-0cff-0310-8789-dd5450dbe970
* memory leak in test code t_authdataEzra Peisach2009-07-301-0/+1
| | | | | | | | Free the krb5_context at the end to release memory. ticket: 6540 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22473 dc483132-0cff-0310-8789-dd5450dbe970
* Fix memory leak by release context at end of test codeEzra Peisach2009-07-301-0/+3
| | | | | | ticket: 6539 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22470 dc483132-0cff-0310-8789-dd5450dbe970
* Enctype list configuration enhancementsGreg Hudson2009-07-293-78/+334
| | | | | | | | | | | In the processing code for enctype lists, add support for "DEFAULT" to indicate the default list, for families (des/des3/aes/rc4), and for removing entries from the current list (-foo). Also add unit tests and document. ticket: 6539 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22469 dc483132-0cff-0310-8789-dd5450dbe970
* Use zero-terminated enctype lists in the context structure instead ofGreg Hudson2009-07-273-169/+148
| | | | | | counted lists, to reduce impedance mismatches. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22456 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_copy_error_message, pass correct pointer toGreg Hudson2009-06-271-1/+1
| | | | | | | | | | krb5int_clear_error. ticket: 6519 tags: pullup target_version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22424 dc483132-0cff-0310-8789-dd5450dbe970
* krb5int_rd_chpw_rep could call krb5_free_error with random valueEzra Peisach2009-06-101-1/+1
| | | | | | | | | | clang picked up on a path in which krberror is not set and passed as an argument to krb5_free_error(). Essentially if the clearresult length < 2 but everything decodes - you can hit this path... ticket: 6511 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22409 dc483132-0cff-0310-8789-dd5450dbe970
* Fix test rules for non-gmake make versionsGreg Hudson2009-05-241-2/+2
| | | | | | | | | | | | | The build rules for the new t_ad_fx_armor and t_authdata test programs used $<, which is only portable for implicit rules (but is valid in gmake for all rules). Stop using $< in those rules so that "make check" works with System V make. ticket: 6495 target_version: 1.7 tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22368 dc483132-0cff-0310-8789-dd5450dbe970
* Use printf format attribute only with gccKen Raeburn2009-05-222-0/+4
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22363 dc483132-0cff-0310-8789-dd5450dbe970
* When using keyed checksum types with TGS subkeys, Microsoft AD 2003Greg Hudson2009-05-191-0/+2
| | | | | | | | | | | | | | | | verifies the checksum using the subkey, whereas MIT and Heimdal verify it using the TGS session key. (RFC 4120 is actually silent on which is correct; RFC 4757 specifies the TGS session key.) To sidestep this interop issue, don't use keyed checksum types with RC4 keys without explicit configuration in krb5.conf. Using keyed checksum types with AES is fine since, experimentally, AD 2008 accepts checksums keyed with the TGS session key. ticket: 6490 status: open tags: pullup git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22356 dc483132-0cff-0310-8789-dd5450dbe970
* In recvauth_common, convert a use of strcpy to strdupGreg Hudson2009-05-111-2/+2
| | | | | | | ticket: 6200 status: open git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22343 dc483132-0cff-0310-8789-dd5450dbe970
* Try decrypting using session key if subkey fails in tgs rep handlingSam Hartman2009-05-072-7/+13
| | | | | | | | | | | | | | | | | | | | | | Heimdal at least up through 1.2 incorrectly encrypts the TGS response in the session key not the subkey when a subkey is supplied. See RFC 4120 page 35. Work around this by trying decryption using the session key after the subkey fails. * decode_kdc_rep.c: rename to krb5int_decode_tgs_rep; only used for TGS and now needs to take keyusage * gc_via_tkt: pass in session key and appropriate usage if subkey fails. Note that the dead code to process AS responses in decode_kdc_rep is not removed by this commit. That will be removed as FAST TGS client support is integrated post 1.7. ticket: 6484 Tags: pullup Target_Version: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22325 dc483132-0cff-0310-8789-dd5450dbe970
* After consultation with kenh, remove a comment and if statement whichGreg Hudson2009-05-071-7/+0
| | | | | | should no longer apply to the pa_sam_2 code, fixing a memory leak. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22322 dc483132-0cff-0310-8789-dd5450dbe970
* Fix yet another memory leak in pa_samGreg Hudson2009-05-061-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22321 dc483132-0cff-0310-8789-dd5450dbe970
* Fix multiple memory leaks in obtain_sam_padataGreg Hudson2009-05-061-23/+29
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22320 dc483132-0cff-0310-8789-dd5450dbe970
* In pa_sam, use the correct function to free sam_challenge in theGreg Hudson2009-05-061-1/+1
| | | | | | | | success path. ticket: 6210 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22319 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a memory leak in pa_sam_2 where an outer data structure wasn'tGreg Hudson2009-05-061-0/+1
| | | | | | freed after the contents are coopted. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22318 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a memory leak in pa_samGreg Hudson2009-05-051-2/+5
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22317 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a memory leak in krb5_obtain_padataGreg Hudson2009-05-051-1/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22316 dc483132-0cff-0310-8789-dd5450dbe970
* In pa_sam_2, free sc2 in an error-handling case where it was leakedGreg Hudson2009-05-051-1/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22315 dc483132-0cff-0310-8789-dd5450dbe970
* In pa_sam_2, free scratch in a couple of error-handling blocks whereGreg Hudson2009-05-051-0/+2
| | | | | | | | it was live and not freed. The function should be reorganized to use a cleanup handler, but (I believe) is not covered by the test suite and should not undergo such major surgery until it is. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22314 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5int_rd_setpw_rep, if we get an error result, set ap_rep.lengthGreg Hudson2009-05-051-0/+1
| | | | | | to 0 so that it is initialized for a check later in the function. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22313 dc483132-0cff-0310-8789-dd5450dbe970
* Remove some unnecessary null checks in krb5_get_in_tkt_with_passwordGreg Hudson2009-05-051-4/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22312 dc483132-0cff-0310-8789-dd5450dbe970
* Remove some unnecessary null checks in krb5_get_in_tkt_with_keytabGreg Hudson2009-05-051-4/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22311 dc483132-0cff-0310-8789-dd5450dbe970
* In krb5_get_in_tkt, free the whole encoded request (since theGreg Hudson2009-05-051-1/+1
| | | | | | | | structure was allocated by encode_krb5_as_req), not just the contents. ticket: 6401 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22310 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a case in the krb5_rd_rep error handler (introduced in the lastGreg Hudson2009-05-051-2/+3
| | | | | | | commit) where scratch.data could be indirected through even if it wasn't allocated successfully. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22309 dc483132-0cff-0310-8789-dd5450dbe970
* Simplify cleanup in obtain_sam_padata slightlyGreg Hudson2009-05-041-5/+3
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22308 dc483132-0cff-0310-8789-dd5450dbe970
* Fix an error message memory leak in krb5_preauth_supply_preauth_dataGreg Hudson2009-05-041-0/+1
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22307 dc483132-0cff-0310-8789-dd5450dbe970
* Fix some direct returns in krb5_get_cred_from_kdc_opt which would leakGreg Hudson2009-05-041-12/+25
| | | | | | memory. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22306 dc483132-0cff-0310-8789-dd5450dbe970
* krb5_rd_rep could leak memory through its output parameter on error.Greg Hudson2009-05-041-26/+34
| | | | | | | Adjust the flow control so that *repl is NULL on error and the memory allocated by decode_krb5_ap_rep_enc_part is freed. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22305 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a memory leak in krb5int_rd_chpw_rep in a block of code handlingGreg Hudson2009-05-021-4/+5
| | | | | | | | buggy MS KDC behavior. It's not entirely clear what should happen in the case where memory was leaked (error packet received containing e_data) so pick a conservative option. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22303 dc483132-0cff-0310-8789-dd5450dbe970
* Fix a memory leak by reorganizing krb5_principal_internalize to useGreg Hudson2009-05-011-34/+34
| | | | | | | the recommended flow control for error handling. Also initialize the output parameter so that it is set in case of error. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22302 dc483132-0cff-0310-8789-dd5450dbe970
* Move an error check to an earlier location in krb5_524_conv_principalGreg Hudson2009-05-011-2/+3
| | | | | | to fix a memory leak. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22300 dc483132-0cff-0310-8789-dd5450dbe970
* make dependSam Hartman2009-04-301-0/+2
| | | | git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22299 dc483132-0cff-0310-8789-dd5450dbe970
* Add DEBUG_ERROR_LOCATIONS supportGreg Hudson2009-04-291-0/+23
| | | | | | | | | | | | If DEBUG_ERROR_LOCATIONS is defined, replace uses of krb5_set_error_message and krb5int_set_error with calls to the new _fl variants of those functions, and include filename and line number information in the calls. Requires C99-style variadic macros if defined. ticket: 6479 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22291 dc483132-0cff-0310-8789-dd5450dbe970
* Fix handling of RET_SEQUENCE flag in mk_priv/mk_ncredGreg Hudson2009-04-283-13/+6
| | | | | | | | | | | | | | | | | Regularize the handling of KRB5_AUTH_CONTEXT_RET_SEQUENCE in krb5_mk_safe, krb5_mk_priv, and krb5_mk_ncred, using krb5_mk_safe as a baseline. RET_SEQUENCE now implies DO_SEQUENCE for all three functions, the sequence number is always incremented if it is used, and outdata->seq is always set if RET_SEQUENCE is passed. Note that in the corresponding rd_ functions, RET_SEQUENCE and DO_SEQUENCE are independent flags, which is not consistent with the above. This compromise is intended to preserve compatibility with any working code which might exist using the RET_SEQUENCE flag. ticket: 6478 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22288 dc483132-0cff-0310-8789-dd5450dbe970