]> git.ipfire.org Git - thirdparty/krb5.git/log
thirdparty/krb5.git
15 years agoFix line length in change to kg_validate_ctx_id() macro
Greg Hudson [Fri, 30 Apr 2010 20:16:38 +0000 (20:16 +0000)] 
Fix line length in change to kg_validate_ctx_id() macro

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23951 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoClean up IAKERB changes to init_sec_context.c in krb5 gss mech: add
Greg Hudson [Fri, 30 Apr 2010 20:13:52 +0000 (20:13 +0000)] 
Clean up IAKERB changes to init_sec_context.c in krb5 gss mech: add
back a CFX_EXERCISE block which is likely necessary for compilation
with that flag, and remove the unused exts parameter to mutual_auth().

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23950 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIf IAKERB is used with no TGT, return KRB5_CC_NOTFOUND instead of
Greg Hudson [Tue, 27 Apr 2010 09:36:28 +0000 (09:36 +0000)] 
If IAKERB is used with no TGT, return KRB5_CC_NOTFOUND instead of
going fruitlessly into the AS code path and returning EINVAL.  Also
better handle the case where service credentials exist but are of an
unsupported enctype.  Make a note that we aren't as consistent as we
would like to be in the case where the TGT exists but has expired.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23948 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMake IAKERB work properly when used in conjunction with default creds
Greg Hudson [Tue, 27 Apr 2010 09:14:58 +0000 (09:14 +0000)] 
Make IAKERB work properly when used in conjunction with default creds
or creds acquired with gss_acquire_cred (as opposed to
gss_acquire_cred_with_password).  Previously it would fall back to the
krb5 mech too early and perform a blocking TGS request.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23947 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRegister IAKERB after the krb5 mechs so it doesn't get used in
Greg Hudson [Tue, 27 Apr 2010 09:12:24 +0000 (09:12 +0000)] 
Register IAKERB after the krb5 mechs so it doesn't get used in
preference to the krb5 mech with SPNEGO or when no mech is specified
to gss_init_sec_context().

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23946 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIf gss_acquire_cred_with_password is used with no default ccache,
Greg Hudson [Mon, 26 Apr 2010 19:15:41 +0000 (19:15 +0000)] 
If gss_acquire_cred_with_password is used with no default ccache,
initialize the default ccache and fill it in, instead of creating a
memory ccache.  Adjust gss-sample test cases to expect that there will
be cached creds.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23944 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn the iakerb branch, use krb5_auth_con_set_checksum_func for DES/DES3
Greg Hudson [Mon, 26 Apr 2010 18:55:10 +0000 (18:55 +0000)] 
On the iakerb branch, use krb5_auth_con_set_checksum_func for DES/DES3
enctypes as well as the modern ones.  It works fine and it makes the
subkey available for the IAKERB checksum.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23943 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn the iakerb branch, modify t_gss_sample.py to exercise different
Greg Hudson [Sun, 25 Apr 2010 03:03:30 +0000 (03:03 +0000)] 
On the iakerb branch, modify t_gss_sample.py to exercise different
mechs, including IAKERB.  Currently does not pass due to unresolved
bugs.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23941 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn the iakerb branch, fix spnego_gss_acquire_cred_with_password to
Greg Hudson [Sun, 25 Apr 2010 00:31:32 +0000 (00:31 +0000)] 
On the iakerb branch, fix spnego_gss_acquire_cred_with_password to
wrap the resulting creds.  (The wrapping didn't exist when the code
was originally written.)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23940 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix up IAKERB changes to get_credentials() in gss-krb5's
Greg Hudson [Sat, 24 Apr 2010 23:20:10 +0000 (23:20 +0000)] 
Fix up IAKERB changes to get_credentials() in gss-krb5's
init_sec_context.c after the trunk merge.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23939 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge trunk changes from r23929 to r23937 to iakerb branch
Greg Hudson [Sat, 24 Apr 2010 22:20:58 +0000 (22:20 +0000)] 
Merge trunk changes from r23929 to r23937 to iakerb branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23938 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge trunk changes from r23909 to r23929
Greg Hudson [Sat, 24 Apr 2010 15:02:18 +0000 (15:02 +0000)] 
Merge trunk changes from r23909 to r23929

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23930 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn the krb5 GSSAPI mech, adjust the error code expected from
Greg Hudson [Tue, 20 Apr 2010 08:02:40 +0000 (08:02 +0000)] 
In the krb5 GSSAPI mech, adjust the error code expected from
krb5_get_credentials() when there is no TGT in the ccache, in light of
r23909.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23911 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge trunk changes from r23906 to r23909
Greg Hudson [Tue, 20 Apr 2010 07:58:06 +0000 (07:58 +0000)] 
Merge trunk changes from r23906 to r23909

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23910 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn iakerb.c, use symbolic names for *_creds_step() continue flags, now
Greg Hudson [Tue, 20 Apr 2010 07:42:57 +0000 (07:42 +0000)] 
In iakerb.c, use symbolic names for *_creds_step() continue flags, now
that they exist.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23908 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge trunk changes from r23900 to r23906
Greg Hudson [Tue, 20 Apr 2010 07:41:09 +0000 (07:41 +0000)] 
Merge trunk changes from r23900 to r23906

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23907 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge trunk changes from r23874 to r23900 to iakerb branch
Greg Hudson [Wed, 14 Apr 2010 14:40:16 +0000 (14:40 +0000)] 
Merge trunk changes from r23874 to r23900 to iakerb branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23901 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoCreate KRB5_TKT_CREDS_CONTINUE symbolic name for flag bit 1 in the
Greg Hudson [Wed, 14 Apr 2010 13:56:00 +0000 (13:56 +0000)] 
Create KRB5_TKT_CREDS_CONTINUE symbolic name for flag bit 1 in the
krb5_tkt_creds_step() output.  Finish doxygen documentation for
krb5_tkt_creds APIs.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23898 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove all of the krb5_tkt_code from gc_frm_kdc.c into get_creds.c and
Greg Hudson [Wed, 14 Apr 2010 03:59:42 +0000 (03:59 +0000)] 
Move all of the krb5_tkt_code from gc_frm_kdc.c into get_creds.c and
delete gc_frm_kdc.c.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23897 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoGet rid of krb5_tkt_creds_store_creds() as it is no longer needed
Greg Hudson [Wed, 14 Apr 2010 03:44:01 +0000 (03:44 +0000)] 
Get rid of krb5_tkt_creds_store_creds() as it is no longer needed

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23896 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove the cache store and check for non-forwardable constrained
Greg Hudson [Wed, 14 Apr 2010 03:36:42 +0000 (03:36 +0000)] 
Move the cache store and check for non-forwardable constrained
delegation creds from krb5_get_credentials into krb5_tkt_creds.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23895 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoSmall code reorg in gc_frm_kdc.c
Greg Hudson [Wed, 14 Apr 2010 03:16:18 +0000 (03:16 +0000)] 
Small code reorg in gc_frm_kdc.c

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23894 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove the cache check from krb5_get_credentials() into the
Greg Hudson [Wed, 14 Apr 2010 03:13:58 +0000 (03:13 +0000)] 
Move the cache check from krb5_get_credentials() into the
krb5_tkt_creds functions.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23893 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMake krb5_tkt_creds_init() take KRB5_GC_* options like
Greg Hudson [Wed, 14 Apr 2010 02:44:34 +0000 (02:44 +0000)] 
Make krb5_tkt_creds_init() take KRB5_GC_* options like
krb5_get_credentials() does.  Add doxygen documentation for some of the
krb5_tkt_creds APIs.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23892 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoSplit out the allocate-and-retrieve part of get_cached_tgt in
Greg Hudson [Mon, 12 Apr 2010 20:30:13 +0000 (20:30 +0000)] 
Split out the allocate-and-retrieve part of get_cached_tgt in
preparation for adding a cache check for the service creds.  Also add
a field to remember KRB5_CC_NOT_KTYPE errors for the local TGT (and
later for service creds).

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23886 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix a bug in make_request_for_service: use the caller-specified KCD
Greg Hudson [Mon, 12 Apr 2010 17:50:43 +0000 (17:50 +0000)] 
Fix a bug in make_request_for_service: use the caller-specified KCD
options as intended, not the field for options we remember between
request and response.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23885 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove validation/renewal APIs into a separate file. Make them use
Greg Hudson [Mon, 12 Apr 2010 15:40:08 +0000 (15:40 +0000)] 
Move validation/renewal APIs into a separate file.  Make them use
gc_via_tkt directly, which is more correct for non-TGT validation or
renewal.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23883 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUse krb5_cc_dup to make a copy of the ccache handle passed to
Greg Hudson [Thu, 8 Apr 2010 16:51:58 +0000 (16:51 +0000)] 
Use krb5_cc_dup to make a copy of the ccache handle passed to
krb5_tkt_creds_init(), so that ccache can be closed before the context
is freed.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23876 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge trunk changes from r23842 to r23874 to iakerb branch
Greg Hudson [Thu, 8 Apr 2010 16:41:17 +0000 (16:41 +0000)] 
Merge trunk changes from r23842 to r23874 to iakerb branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23875 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn int-proto.h, remove krb5int_tgt_mcred, which was added on this
Greg Hudson [Thu, 8 Apr 2010 14:54:20 +0000 (14:54 +0000)] 
In int-proto.h, remove krb5int_tgt_mcred, which was added on this
branch but no longer exists.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23873 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge changes from /users/lhoward/iakerb-refonly
Greg Hudson [Thu, 8 Apr 2010 03:36:58 +0000 (03:36 +0000)] 
Merge changes from /users/lhoward/iakerb-refonly

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23872 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUse krb5_get_credentials in ksu instead of krb5_get_cred_from_kdc, so
Greg Hudson [Thu, 8 Apr 2010 03:27:08 +0000 (03:27 +0000)] 
Use krb5_get_credentials in ksu instead of krb5_get_cred_from_kdc, so
we can get rid of the latter.  (Also simplifies the code.)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23871 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn get_creds.c, rewrite validate_or_renew_creds() and
Greg Hudson [Wed, 7 Apr 2010 03:39:25 +0000 (03:39 +0000)] 
In get_creds.c, rewrite validate_or_renew_creds() and
get_credentials_val_renew_core() in terms of the new gc_frm_kdc_step.c
code.  For now, create a static helper get_tkt_creds() to run
krb5_tkt_creds_init/get/get_creds; probably move that into
gc_frm_kdc_step.c at some point.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23869 dc483132-0cff-0310-8789-dd5450dbe970

15 years agogc_frm_kdc_step.c was feeding the wrong in_creds to
Greg Hudson [Tue, 6 Apr 2010 20:15:44 +0000 (20:15 +0000)] 
gc_frm_kdc_step.c was feeding the wrong in_creds to
krb5int_process_tgs_reply when performing TGT requests.  Add
additional state to track what in_creds to use.

Also improve comments, and make the handling of ctx->realm_path a
little more obviously correct.  (It never gets initialized twice, but
proving that is non-trivial, so we now free it before initialization.)

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23868 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn gc_frm_kdc_step.c, remove a check from init_realm_path which was
Greg Hudson [Mon, 5 Apr 2010 21:49:56 +0000 (21:49 +0000)] 
In gc_frm_kdc_step.c, remove a check from init_realm_path which was
redundant with a check in krb5_walk_realm_tree.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23865 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix typo
Greg Hudson [Mon, 5 Apr 2010 16:32:12 +0000 (16:32 +0000)] 
Fix typo

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23863 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove a little bit of logic out of step_referrals into
Greg Hudson [Mon, 5 Apr 2010 15:54:48 +0000 (15:54 +0000)] 
Move a little bit of logic out of step_referrals into
try_fallback_realm.  If try_fallback_realm gives up because the
fallback realm is the same as the initial referral realm, return the
code from the TGS reply instead of KRB5_ERR_HOST_REALM_UNKNOWN.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23862 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn gc_frm_kdc_step.c, fix some typos and simplify some code here and
Greg Hudson [Mon, 5 Apr 2010 03:24:54 +0000 (03:24 +0000)] 
In gc_frm_kdc_step.c, fix some typos and simplify some code here and
there.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23861 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn spnego_mech.c, revert r23225 from Luke's branch. The logic errors
Greg Hudson [Sun, 4 Apr 2010 23:47:46 +0000 (23:47 +0000)] 
In spnego_mech.c, revert r23225 from Luke's branch.  The logic errors
were fixed independently on the trunk in r23742 (#6603) and the first
hunk would cause spnego_gss_init_sec_context to seg fault when passed
GSS_C_NO_BUFFER as input_token.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23860 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMake krb5_get_credentials use the krb5_tkt_creds interface instead of
Greg Hudson [Sun, 4 Apr 2010 20:54:42 +0000 (20:54 +0000)] 
Make krb5_get_credentials use the krb5_tkt_creds interface instead of
krb5_get_cred_from_kdc_opt.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23859 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd krb5_tkt_creds_get(). Still untested
Greg Hudson [Sun, 4 Apr 2010 20:18:12 +0000 (20:18 +0000)] 
Add krb5_tkt_creds_get().  Still untested

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23857 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn the GSSAPI IAKERB code, fix the sense of the flags expected from
Greg Hudson [Sun, 4 Apr 2010 17:52:03 +0000 (17:52 +0000)] 
In the GSSAPI IAKERB code, fix the sense of the flags expected from
krb5_init_creds_step and krb5_tkt_creds_step.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23856 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoPull up r23844 (krb5_init_creds_step flags fix) from trunk
Greg Hudson [Sun, 4 Apr 2010 17:20:50 +0000 (17:20 +0000)] 
Pull up r23844 (krb5_init_creds_step flags fix) from trunk

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23855 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRewrite gc_frm_kdc_step.c to handle the full functionality of
Greg Hudson [Sun, 4 Apr 2010 17:17:17 +0000 (17:17 +0000)] 
Rewrite gc_frm_kdc_step.c to handle the full functionality of
gc_frm_krb.c.  Not tested yet.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23854 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge changes from /users/lhoward/iakerb-refonly
Greg Hudson [Mon, 29 Mar 2010 16:18:20 +0000 (16:18 +0000)] 
Merge changes from /users/lhoward/iakerb-refonly

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23843 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoCreate a branch for iakerb work
Greg Hudson [Mon, 29 Mar 2010 15:34:58 +0000 (15:34 +0000)] 
Create a branch for iakerb work

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23842 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAlways pass -W option to kdb5_util create in testing
Ken Raeburn [Sat, 27 Mar 2010 21:30:43 +0000 (21:30 +0000)] 
Always pass -W option to kdb5_util create in testing

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23838 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn gc_frm_kdc.c, rename cur_kdc to cur_realm and nxt_kdc to nxt_realm,
Greg Hudson [Fri, 26 Mar 2010 22:43:11 +0000 (22:43 +0000)] 
In gc_frm_kdc.c, rename cur_kdc to cur_realm and nxt_kdc to nxt_realm,
to make it easier to distinguish them from cur_tgt and nxt_tgt.  Make
similar name changes to lst_kdc and kdc_list, as well as the function
find_nxt_kdc().

No functional changes.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23837 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoStraighten the if-ladder in encrypted challenge's process_preauth,
Greg Hudson [Thu, 25 Mar 2010 03:08:12 +0000 (03:08 +0000)] 
Straighten the if-ladder in encrypted challenge's process_preauth,
making it clearer that control drops through if one of the first
couple of steps fails.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23836 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoApply patch from Arlene Berry to not use freed memory in
Tom Yu [Tue, 23 Mar 2010 22:00:13 +0000 (22:00 +0000)] 
Apply patch from Arlene Berry to not use freed memory in
gss_import_sec_context in some error paths.

ticket: 6678
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23834 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMITKRB5-SA-2010-002 CVE-2010-0628 denial of service in SPNEGO
Tom Yu [Tue, 23 Mar 2010 18:53:52 +0000 (18:53 +0000)] 
MITKRB5-SA-2010-002 CVE-2010-0628 denial of service in SPNEGO

The SPNEGO implementation in krb5-1.7 and later could crash due to
assertion failure when receiving some sorts of invalid GSS-API tokens.

ticket: 6690
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23832 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoInclude t_spengno.o in list of OBJS so make clean will remove
Ezra Peisach [Tue, 23 Mar 2010 14:08:23 +0000 (14:08 +0000)] 
Include t_spengno.o in list of OBJS so make clean will remove

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23831 dc483132-0cff-0310-8789-dd5450dbe970

15 years agokrb5_typed_data not castable to krb5_pa_data on 64-bit MacOSX
Tom Yu [Tue, 23 Mar 2010 06:09:02 +0000 (06:09 +0000)] 
krb5_typed_data not castable to krb5_pa_data on 64-bit MacOSX

Move krb5_typed_data to krb5.hin from k5-int-pkinit.h because
krb5int_fast_process_error was assuming that it was safe to cast it to
krb5_pa_data.  It's not safe to do the cast on 64-bit MacOSX because
krb5.hin uses #pragma pack on that platform.

ticket: 6689
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23829 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoChange KRB5_AUTHDATA_SIGNTICKET from 142 to 512
Greg Hudson [Sat, 20 Mar 2010 03:50:06 +0000 (03:50 +0000)] 
Change KRB5_AUTHDATA_SIGNTICKET from 142 to 512

KRB5_AUTHDATA_SIGNTICKET, originally a Heimdal authorization data
type, was used to implement PAC-less constrained delegation in krb5
1.8.  Unfortunately, it was found that Microsoft was using 142 for
other purposes, which could result in a ticket issued by an MIT or
Heimdal KDC being rejected by a Windows Server 2008 R2 application
server.  Because KRB5_AUTHDATA_SIGNTICKET is only used to communicate
among a realm's KDCs, it is relatively easy to change the number, so
MIT and Heimdal are both migrating to a new number.  This change will
cause a transitional interoperability issue when a realm mixes MIT
krb5 1.8 (or Heimdal 1.3.1) KDCs with MIT krb5 1.8.1 (or Heimdal
1.3.2) KDCs, but only for constrained delegation evidence tickets.

ticket: 6687
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23821 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoDocument the ticket_lifetime libdefaults setting (which was added in
Greg Hudson [Fri, 19 Mar 2010 16:17:05 +0000 (16:17 +0000)] 
Document the ticket_lifetime libdefaults setting (which was added in
r16656, #2656).  Based on a patch from nalin@redhat.com.

ticket: 6680
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23820 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix the kpasswd fallback from the ccache principal name to the
Greg Hudson [Thu, 18 Mar 2010 17:37:31 +0000 (17:37 +0000)] 
Fix the kpasswd fallback from the ccache principal name to the
username in the case where the ccache doesn't exist.

ticket: 6683
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23819 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoInclude int-proto.h in mk_req_ext.c for krb5int_validate_times
Greg Hudson [Thu, 18 Mar 2010 17:17:31 +0000 (17:17 +0000)] 
Include int-proto.h in mk_req_ext.c for krb5int_validate_times
declaration.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23818 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUntabify
Ken Raeburn [Thu, 18 Mar 2010 02:45:57 +0000 (02:45 +0000)] 
Untabify

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23817 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoCopyright notice
Ken Raeburn [Thu, 18 Mar 2010 02:44:41 +0000 (02:44 +0000)] 
Copyright notice

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23816 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoWhen checking for KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT, don't
Greg Hudson [Wed, 17 Mar 2010 21:10:10 +0000 (21:10 +0000)] 
When checking for KRB5_GET_INIT_CREDS_OPT_CHG_PWD_PRMPT, don't
dereference options if it's NULL.

ticket: 6681
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23815 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd more verbosity when the -V option to kinit is specified. Based on
Greg Hudson [Wed, 17 Mar 2010 20:16:32 +0000 (20:16 +0000)] 
Add more verbosity when the -V option to kinit is specified.  Based on
a patch from Jeff Blaine <jblaine@kickflop.net>.

ticket: 6684

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23814 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix the Python version check to use constructs available in older
Greg Hudson [Wed, 17 Mar 2010 19:34:48 +0000 (19:34 +0000)] 
Fix the Python version check to use constructs available in older
versions of Python.  (python --version was added in 2.5.)

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23813 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd a version check to the Python test, so that we don't try to run
Greg Hudson [Wed, 17 Mar 2010 19:11:09 +0000 (19:11 +0000)] 
Add a version check to the Python test, so that we don't try to run
k5test in Python 2.3 or below.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23812 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMerge users/raeburn/branches/network-merge
Ken Raeburn [Wed, 17 Mar 2010 06:00:56 +0000 (06:00 +0000)] 
Merge users/raeburn/branches/network-merge

Re-integrates the forked versions of network.c in kdc and
kadmin/server.  Server-specific initialization and SIGHUP-reset code
is moved into other source files; the more generic network-servicing
code is merged and moved into apputils library already used by both
programs.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23811 dc483132-0cff-0310-8789-dd5450dbe970

15 years agohandle NT_SRV_INST in service principal referrals
Tom Yu [Tue, 16 Mar 2010 19:14:33 +0000 (19:14 +0000)] 
handle NT_SRV_INST in service principal referrals

Handle NT_SRV_INST in service principal cross-realm referrals, as
Windows apparently uses that instead of NT_SRV_HST for at least some
service principals.

ticket: 6685
target_version: 1.8.1

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23810 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoSet up KRB5_RUN_ENV for pytests, so that Python-based tests can run
Tom Yu [Mon, 15 Mar 2010 18:53:02 +0000 (18:53 +0000)] 
Set up KRB5_RUN_ENV for pytests, so that Python-based tests can run
without first running "make install".

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23805 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoLazy history key creation
Greg Hudson [Thu, 11 Mar 2010 17:05:24 +0000 (17:05 +0000)] 
Lazy history key creation

Create kadmin/history lazily when we need it (i.e. when a password is
changed on a principal with a policy) instead of whenever we open the
database.  Allows kadmin.local to be used as a read-only tool on non-
kadmin-conformant database back ends such as the Samba bridge.

ticket: 6679

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23799 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUse KRB5_CONF_ macros instead of strings in the source file for profile config attrib...
Zhanna Tsitkov [Wed, 10 Mar 2010 20:45:12 +0000 (20:45 +0000)] 
Use KRB5_CONF_ macros instead of strings in the source file for profile config attributes "default" and "logging"

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23798 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRemove vestigial include/spnego-asn1.h
Greg Hudson [Wed, 10 Mar 2010 19:30:58 +0000 (19:30 +0000)] 
Remove vestigial include/spnego-asn1.h

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23796 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd a "make testrealm" target using the Python test framework. As
Greg Hudson [Mon, 8 Mar 2010 04:39:08 +0000 (04:39 +0000)] 
Add a "make testrealm" target using the Python test framework.  As
part of this, expose the environments in K5Realm as attributes so
that test scripts can modify them.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23794 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMake python test start_in_inetd function
Ezra Peisach [Sun, 7 Mar 2010 20:01:36 +0000 (20:01 +0000)] 
Make python test start_in_inetd function

util/k5test.py: Fix incorrect variable used
tests/dejagnu/t_inetd.c: Flush stdout after outputting "Ready!"
tests/dejagnu/Makefile.in: Always compile t_inetd - even in runtest is not
    present

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23773 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRelease the internal_name field of a SPNEGO context if it has not been
Greg Hudson [Fri, 5 Mar 2010 20:35:26 +0000 (20:35 +0000)] 
Release the internal_name field of a SPNEGO context if it has not been
claimed for a caller argument.

ticket: 6674
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23772 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd a Python test to run t_spnego
Greg Hudson [Fri, 5 Mar 2010 20:33:37 +0000 (20:33 +0000)] 
Add a Python test to run t_spnego

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23771 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIn post.in, add a check-pytests intermediate target for Makefile.in to
Greg Hudson [Fri, 5 Mar 2010 20:32:40 +0000 (20:32 +0000)] 
In post.in, add a check-pytests intermediate target for Makefile.in to
add dependencies to, for test scripts which run C test programs.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23770 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix a double-free in the t_spnego test program resulting from overly
Greg Hudson [Fri, 5 Mar 2010 20:31:13 +0000 (20:31 +0000)] 
Fix a double-free in the t_spnego test program resulting from overly
careless cutting and pasting.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23769 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd a message parameter to k5test's success(), to briefly indicate the
Greg Hudson [Fri, 5 Mar 2010 19:30:32 +0000 (19:30 +0000)] 
Add a message parameter to k5test's success(), to briefly indicate the
scope of test scripts.  Only displayed when verbose is set.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23768 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd IPv6 support to changepw.c (reverting r21004 since it is no longer
Greg Hudson [Fri, 5 Mar 2010 19:19:42 +0000 (19:19 +0000)] 
Add IPv6 support to changepw.c (reverting r21004 since it is no longer
necessary).  Patch from Submit Bose <sbose@redhat.com>.

ticket: 6661
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23767 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoIgnore improperly encoded signedpath AD elements
Greg Hudson [Fri, 5 Mar 2010 17:45:46 +0000 (17:45 +0000)] 
Ignore improperly encoded signedpath AD elements

We have some reason to believe Microsoft and Heimdal are both using
the authdata value 142 for different purposes, leading to failures in
verify_ad_signedpath().  For better interoperability, treat such
tickets as unsigned, rather than invalid.

ticket: 6676
target_version: 1.8.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23766 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoError out if a Python test program fails
Greg Hudson [Fri, 5 Mar 2010 04:18:51 +0000 (04:18 +0000)] 
Error out if a Python test program fails

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23765 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoClean up a help string in k5test
Greg Hudson [Thu, 4 Mar 2010 21:37:20 +0000 (21:37 +0000)] 
Clean up a help string in k5test

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23764 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoPython test framework
Greg Hudson [Thu, 4 Mar 2010 21:24:54 +0000 (21:24 +0000)] 
Python test framework

Add a framework for writing tests in Python.  Documentation is in the
initial docstring of util/k5test.py.  Inaugurate the framework with
two test scripts, t_general.py and t_anonypkinit.py, which together
test the same operations as standalone.exp from the dejagnu test
suite.

ticket: 6672

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23763 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRemove some more test suite cruft:
Greg Hudson [Sun, 28 Feb 2010 20:32:00 +0000 (20:32 +0000)] 
Remove some more test suite cruft:
* localhostname from get_hostname was unused.
* database_name is no longer used except (misleadingly) in kdb5_util
  output.
* admin_database_name and admin_database_lockfile are no longer used.
* default_domain is only used for v4->v5 principal conversion, which
  isn't tested.
* libkadm5's init-v2.exp had a copy of get_hostname; domain and
  localhostname from it were unused.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23759 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoOn Linux platforms, use -Wl,--enable-new-dtags when linking shared
Greg Hudson [Sat, 27 Feb 2010 09:49:32 +0000 (09:49 +0000)] 
On Linux platforms, use -Wl,--enable-new-dtags when linking shared
libraries and programs using them.  The primary effect is to get ld to
set DT_RUNPATH in addition to DT_RPATH, which in turn allows the
LD_LIBRARY_PATH environment variable to override the compiled-in
runpath, which is friendlier to the test framework.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23758 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUpdated documentation with information about --with-crypto-impl=IMPL configuration...
Zhanna Tsitkov [Thu, 25 Feb 2010 21:16:16 +0000 (21:16 +0000)] 
Updated documentation  with information about --with-crypto-impl=IMPL configuration flag

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23752 dc483132-0cff-0310-8789-dd5450dbe970

15 years agodoc updates for allow_weak_crypto
Tom Yu [Thu, 25 Feb 2010 20:09:45 +0000 (20:09 +0000)] 
doc updates for allow_weak_crypto

Update documentation to be more helpful about allow_weak_crypto.

ticket: 6669
target_version: 1.8
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23750 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoTwo problems in kadm5_get_principal mask handling
Greg Hudson [Wed, 24 Feb 2010 18:57:08 +0000 (18:57 +0000)] 
Two problems in kadm5_get_principal mask handling

KADM5_MOD_NAME was being applied to entry->principal instead of
entry->mod_name.  KADM5_MKVNO was not being applied to entry->mkvno.
Patch from Marcus Watts <mdw@umich.edu>.

ticket: 6668
target_version: 1.8
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23749 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRemove some more dejagnu test suite cruft:
Greg Hudson [Mon, 22 Feb 2010 18:27:55 +0000 (18:27 +0000)] 
Remove some more dejagnu test suite cruft:
  * check_date was only used by the application tests.
  * touch was never used.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23745 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoRemove some unused cruft in the dejagnu test suite's default.exp:
Greg Hudson [Mon, 22 Feb 2010 18:12:51 +0000 (18:12 +0000)] 
Remove some unused cruft in the dejagnu test suite's default.exp:
  * RLOGIN, RLOGIN_FLAGS, ROOT_PROMPT, ROOT_SHELL, check_k5login,
    restore_kerberos_env, setup_root_shell, setup_root_shell_noremote,
    setup_wrapper: No longer used now that the applications are in a
    separate tree.
  * v4_compatible_enctype: No longer used with krb4 support gone.
  * tail1, krb_exit: Apparently never used.
  * KERBEROS_SERVER: Added long ago in r5686 and removed shortly after
    in r5695, but the test suite support for it never got excised.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23744 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoExplain the current SPNEGO initiator/acceptor design in comments. No
Greg Hudson [Mon, 22 Feb 2010 16:10:05 +0000 (16:10 +0000)] 
Explain the current SPNEGO initiator/acceptor design in comments.  No
code changes.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23743 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix two unrelated problems in SPNEGO which don't crop up with the krb5
Greg Hudson [Mon, 22 Feb 2010 04:52:30 +0000 (04:52 +0000)] 
Fix two unrelated problems in SPNEGO which don't crop up with the krb5
mechanism.

1. The third call to spnego_init_accept_context uses faulty logic to
determine if the exchange is complete, preventing a third mech token
from being sent to the acceptor if no MIC exchange is required.
Follow the logic used in the second call (in init_ctx_nego), which is
correct.

2. If the acceptor selects a mech other than the optimistic mech, it
sets sc->mic_reqd to 1 whether or not the selected mech supports MICs
(which isn't known until the mech completes).  Most code outside of
handle_mic checks sc->mic_reqd along with (sc->ctx_flags &
GSS_C_INTEG_FLAG), but the code in acc_ctx_call_acc neglected to do
so, so it could improperly delegate responsibility for deciding when
the negotiation was finished to handle_mic--which never gets called if
(sc->ctx_flags & GSS_C_INTEG_FLAG) is false.  Fix acc_ctx_call_acc to
check sc->ctx_flags so that mechs which don't support integrity
protection can complete if they are selected non-optimistically.

ticket: 6603
target_version: 1.8
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23742 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUse bswap16 and bswap32 on NetBSD
Ken Raeburn [Sat, 20 Feb 2010 07:37:13 +0000 (07:37 +0000)] 
Use bswap16 and bswap32 on NetBSD

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23741 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUpdate dependencies
Ken Raeburn [Sat, 20 Feb 2010 04:26:53 +0000 (04:26 +0000)] 
Update dependencies

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23740 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove array decl from mixed within code down into the block where it's
Ken Raeburn [Sat, 20 Feb 2010 04:26:50 +0000 (04:26 +0000)] 
Move array decl from mixed within code down into the block where it's
actually used, for C90 compliance.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23739 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoUpdate export list for 2007 plugin interface change
Ken Raeburn [Sat, 20 Feb 2010 04:26:47 +0000 (04:26 +0000)] 
Update export list for 2007 plugin interface change

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23738 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMove array decl from mixed within code down into the block where it's
Ken Raeburn [Sat, 20 Feb 2010 04:26:43 +0000 (04:26 +0000)] 
Move array decl from mixed within code down into the block where it's
actually used, for C90 compliance.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23737 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoMake plugins/cksum_body more likely to build, and remove the empty src
Greg Hudson [Fri, 19 Feb 2010 17:06:58 +0000 (17:06 +0000)] 
Make plugins/cksum_body more likely to build, and remove the empty src
directory within.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23736 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoThe TGS code was not freeing authdata. This is an old leak which was
Greg Hudson [Thu, 18 Feb 2010 18:49:11 +0000 (18:49 +0000)] 
The TGS code was not freeing authdata.  This is an old leak which was
made more evident in 1.8 by the addition of ad-signedpath authdata
appearing in most tickets issued through the TGS path.

ticket: 6659
target_version: 1.8
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23735 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoFix cipher state chaining in OpenSSL back end
Greg Hudson [Thu, 18 Feb 2010 18:04:47 +0000 (18:04 +0000)] 
Fix cipher state chaining in OpenSSL back end

Make cipher state chaining work in the OpenSSL back end for des, des3,
and arcfour enc providers.  Subtleties:

* DES and DES3 have checks to avoid clobbering ivec with uninitialized
  data if there is no data to encrypt.
* Arcfour saves the OpenSSL cipher context across calls.  To protect
  against a caller improperly copying the state (which happens to work
  with other enc providers), a loopback pointer is used, as in GSSAPI.
* EVP_EncryptFinal_ex is unnecessary with stream ciphers and would
  interfere with cipher state chaining if it did anything, so just
  remove it.

ticket: 6665
target_version: 1.8
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23734 dc483132-0cff-0310-8789-dd5450dbe970

15 years agoAdd display statements for the encrypted tokens generated by t_encrypt
Greg Hudson [Wed, 17 Feb 2010 20:27:22 +0000 (20:27 +0000)] 
Add display statements for the encrypted tokens generated by t_encrypt
so that its output can be compared between different back ends.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23733 dc483132-0cff-0310-8789-dd5450dbe970

15 years agovalidator.py is a tool to validate kerb configuration files.
Zhanna Tsitkov [Wed, 17 Feb 2010 16:09:43 +0000 (16:09 +0000)] 
validator.py is a tool to validate kerb configuration files.
First, the configuration file is parsed (confparser.py) and validated against formating errors (such as mismatching brackets)
Then the list of the allowed configuration attributes is compiled from k5-int.h and rules.yml
Finally, the kerb configuration file is validated against the list of the allowed strings.
If the error, or something that validator does not understand, is found the warning is issued in the tree-like form indicating the layer where the problem has occurred.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23732 dc483132-0cff-0310-8789-dd5450dbe970