krb5.git
14 years agoSecurID build support
Sam Hartman [Tue, 19 Oct 2010 19:50:48 +0000 (19:50 +0000)]
SecurID build support

Integrate SecurID into the build if libaceclnt is found.
Add a README file with an example of how to build it.

ticket: 6807
target_version: 1.9
tags: pullup

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

14 years agosecurID error handling fix
Sam Hartman [Tue, 19 Oct 2010 19:50:42 +0000 (19:50 +0000)]
securID error handling fix

In porting forward, I incorrectly used krb5_set_error_message instead of com_err.
This commit reverts that change.

ticket: 6806
target_version: 1.9
tags: pullup

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

14 years agosecurID code fixes
Sam Hartman [Tue, 19 Oct 2010 19:50:37 +0000 (19:50 +0000)]
securID code fixes

Fixes to get securID preauth plugin working. A separate patch will
address error handling and build issues.

* Permit a preauth plugin to return KRB5KDC_ERR_PREAUTH_REQUIRED from
  the verify entry point.

* If verify_securid2 fails, save the return value and return that
  rather than success after dealing with encoding the out_edata

* Use the client key not the securid principal key for the sam
  checksum

* indicate that securID is hardware authentication

ticket: 6805
target_version: 1.9
tags: pullup

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

14 years agoRemove KDC replay cache
Greg Hudson [Tue, 19 Oct 2010 19:08:38 +0000 (19:08 +0000)]
Remove KDC replay cache

Now that SAM1 support has been removed, the KDC does not need a replay
replay cache.  Remove all code within USE_RCACHE and associated support.
Rename --disable-kdc-replay-cache to --disable-kdc-lookaside-cache.

ticket: 6804
target_version: 1.9
tags: pullup

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

14 years agoAdjust copyright.texinfo to fix some TeX output issues. Also do minor
Tom Yu [Mon, 18 Oct 2010 22:52:28 +0000 (22:52 +0000)]
Adjust copyright.texinfo to fix some TeX output issues.  Also do minor
cleanup.

ticket: 6802

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

14 years agocopyright notice updates
Tom Yu [Thu, 14 Oct 2010 22:49:11 +0000 (22:49 +0000)]
copyright notice updates

Update copyright.texinfo.  Move full copyright notices to appendices
of documentation.  New rules to generate top-level NOTICE file from
copyright.texinfo.  Regenerate NOTICE file.

ticket: 6802
tags: pullup
target_version: 1.9

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

14 years agoWhitespace
Greg Hudson [Wed, 13 Oct 2010 17:20:36 +0000 (17:20 +0000)]
Whitespace

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

14 years agoAdjust valgrind support to assume a modern valgrind that requires %p in log files
Sam Hartman [Wed, 13 Oct 2010 01:19:20 +0000 (01:19 +0000)]
Adjust valgrind support to assume a modern valgrind that requires %p in log files

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

14 years agoFix leaks in get_init_creds interface
Sam Hartman [Wed, 13 Oct 2010 01:19:14 +0000 (01:19 +0000)]
Fix leaks in get_init_creds interface

In Debian Bug 598032, Bastian Blank points out that there are two
leaks in the get_init_creds interface:

* Free ctx->request->padata after sending the KDC request so it is not
overwritten the next time around the loop.

* If options is NULL passed into krb5_get_init_creds_init, then set up
a non-extended options structure so that krb5_get_init_creds_free will
free the options.

ticket: 6801
target_version: 1.9

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

14 years agoREADME and patchlevel to 1.10-prerelease
Tom Yu [Mon, 11 Oct 2010 21:48:13 +0000 (21:48 +0000)]
README and patchlevel to 1.10-prerelease

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

14 years agoInterim update of README and NOTICE
Tom Yu [Mon, 11 Oct 2010 21:37:16 +0000 (21:37 +0000)]
Interim update of README and NOTICE

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

14 years agoWhen returning KRB5_KT_NOTFOUND from krb5_ktfile_get_entry, set an
Greg Hudson [Mon, 11 Oct 2010 16:43:42 +0000 (16:43 +0000)]
When returning KRB5_KT_NOTFOUND from krb5_ktfile_get_entry, set an
extended error message indicating which principal was not found.

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

14 years agoPlug a memory leak in gss_indicate_mechs
Greg Hudson [Sat, 9 Oct 2010 11:46:53 +0000 (11:46 +0000)]
Plug a memory leak in gss_indicate_mechs

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

14 years agoEncoding cleanup: curly quotes to ASCII quotes, and some ISO-8859-1
Tom Yu [Fri, 8 Oct 2010 18:40:13 +0000 (18:40 +0000)]
Encoding cleanup: curly quotes to ASCII quotes, and some ISO-8859-1
files to UTF-8.

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

14 years agoIn gss_indicate_mechs, avoid setting the output pointer until success
Greg Hudson [Fri, 8 Oct 2010 15:25:13 +0000 (15:25 +0000)]
In gss_indicate_mechs, avoid setting the output pointer until success
is guaranteed.

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

14 years agoIn gss_inquire_attrs_for_mech, remove the assumption that mech_attrs
Greg Hudson [Fri, 8 Oct 2010 14:57:58 +0000 (14:57 +0000)]
In gss_inquire_attrs_for_mech, remove the assumption that mech_attrs
!= NULL in a particular error case.

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

14 years agoRemove duplicate code block in spnego_gss_set_cred_option()
Greg Hudson [Fri, 8 Oct 2010 14:55:06 +0000 (14:55 +0000)]
Remove duplicate code block in spnego_gss_set_cred_option()

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

14 years agoAdd a kadm5 RPC for purging old keys from the KDB (e.g., from
Tom Yu [Fri, 8 Oct 2010 03:57:28 +0000 (03:57 +0000)]
Add a kadm5 RPC for purging old keys from the KDB (e.g., from
change_password -keepold), and add a kadmin CLI command for it.

Keeping ticket open because an automated test needs to be added.

Long-term future work includes start/expire dates on keys, or
not-yet-valid flags.

ticket: 1219
status: open
target_version: 1.9

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

14 years agoFix a typo in kerberos.ldif. Reported by nalin@redhat.com
Greg Hudson [Thu, 7 Oct 2010 17:50:06 +0000 (17:50 +0000)]
Fix a typo in kerberos.ldif.  Reported by nalin@redhat.com

ticket: 6701
target_version: 1.8.4
tags: pullup

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

14 years agoPerformance issue in LDAP policy fetch
Greg Hudson [Thu, 7 Oct 2010 17:49:44 +0000 (17:49 +0000)]
Performance issue in LDAP policy fetch

Instead of performing a tree search to fill in the refcnt field of a
policy object whenever a policy is fetched, set the refcnt to 0 and
perform a check when policies are deleted.

ticket: 6799

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

14 years agoset NT-SRV-INST on TGS principal names
Tom Yu [Wed, 6 Oct 2010 23:57:37 +0000 (23:57 +0000)]
set NT-SRV-INST on TGS principal names

Set NT-SRV-INST on TGS principal names in
get_in_tkt.c:build_in_tkt_name because Windows Server 2008 R2 RODC
insists on it.

Thanks to Bill Fellows for reporting this problem.

ticket: 6798
tags: pullup
target_version: 1.8.4

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

14 years agoCorrect a miscarriage of justice committed by the style police
Greg Hudson [Wed, 6 Oct 2010 22:20:34 +0000 (22:20 +0000)]
Correct a miscarriage of justice committed by the style police

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

14 years agoMerge users/lhoward/sasl-gs2 to trunk
Greg Hudson [Wed, 6 Oct 2010 18:25:04 +0000 (18:25 +0000)]
Merge users/lhoward/sasl-gs2 to trunk

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

14 years agoMinor comments related changed.
Zhanna Tsitkov [Wed, 6 Oct 2010 03:00:03 +0000 (03:00 +0000)]
Minor comments related changed.

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

14 years agoAdjust prototype files for easier extraction of copyright/license
Greg Hudson [Wed, 6 Oct 2010 01:37:24 +0000 (01:37 +0000)]
Adjust prototype files for easier extraction of copyright/license
statements, per mailing list discussion.

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

14 years agoDocument that krb5_get_error_message() never returns NULL
Greg Hudson [Tue, 5 Oct 2010 21:44:14 +0000 (21:44 +0000)]
Document that krb5_get_error_message() never returns NULL

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

14 years agoCVE-2010-1322 KDC uninitialized pointer crash in authorization data handling (MITKRB5...
Tom Yu [Tue, 5 Oct 2010 21:05:19 +0000 (21:05 +0000)]
CVE-2010-1322 KDC uninitialized pointer crash in authorization data handling (MITKRB5-SA-2010-006)

When the KDC receives certain TGS-REQ messages, it may dereference an
uninitialized pointer while processing authorization data, causing a
crash, or in rare cases, unauthorized information disclosure, ticket
modification, or execution of arbitrary code.  The crash may be
triggered by legitimate requests.

Correctly implement the filtering of authorization data items to avoid
leaving uninitialized pointers when omitting items.

ticket: 6797
tags: pullup
target_version: 1.8.4

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

14 years agoAdd RUN_SETUP so make check works by setting the proper LD_LIBRARY_PATH
Ezra Peisach [Tue, 5 Oct 2010 19:59:49 +0000 (19:59 +0000)]
Add RUN_SETUP so make check works by setting the proper LD_LIBRARY_PATH

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

14 years agoFix the NSS PRNG build. Fix the build for non-gmake make. Revert a
Greg Hudson [Tue, 5 Oct 2010 19:44:26 +0000 (19:44 +0000)]
Fix the NSS PRNG build.  Fix the build for non-gmake make.  Revert a
no longer necessary change to lib/crypto/krb/Makefile.in.

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

14 years agoConstify the name field of a kadm5_hook vtable, since it holds a
Greg Hudson [Tue, 5 Oct 2010 16:39:59 +0000 (16:39 +0000)]
Constify the name field of a kadm5_hook vtable, since it holds a
string literal.

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

14 years agoAdd a name field to the pwqual plugin vtable and log pwqual module
Greg Hudson [Tue, 5 Oct 2010 16:00:23 +0000 (16:00 +0000)]
Add a name field to the pwqual plugin vtable and log pwqual module
rejections.

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

14 years agoPropagate modprinc -unlock from master to slave KDCs
Greg Hudson [Tue, 5 Oct 2010 14:53:09 +0000 (14:53 +0000)]
Propagate modprinc -unlock from master to slave KDCs

Create a new tl-data type to hold the time of the last administrative
unlock, and factor it into decisions about account lockout.  Since
tl-data values are propagated from master to slave, this will cause
modprinc -unlock operations to reach slave KDCs on the next
propagation.

ticket: 6795

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

14 years agoAdd additional NRL copyright
Sam Hartman [Tue, 5 Oct 2010 13:57:27 +0000 (13:57 +0000)]
Add additional NRL copyright

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

14 years agoDocument kadm5_hook interface
Sam Hartman [Tue, 5 Oct 2010 13:57:23 +0000 (13:57 +0000)]
Document kadm5_hook interface

* krb5.conf
* admin.texinfo
* kadm5_hook_plugin.h: document initvt requirement

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

14 years agoSome missed files needed for rev #24420
Zhanna Tsitkov [Tue, 5 Oct 2010 03:29:35 +0000 (03:29 +0000)]
Some missed files needed for rev #24420

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

14 years agoImproves prng code modularity. Introduces fortuna-like prng that can be used in lieu...
Zhanna Tsitkov [Tue, 5 Oct 2010 03:18:22 +0000 (03:18 +0000)]
Improves prng code modularity. Introduces fortuna-like prng that can be used in lieu of yarrow.
Yarrow stays the default prng while fortuna may be engaged during configuration by using "--with-prng-alg=fortuna" flag.
Also, nss crypto backend continues to use its own prng.

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

14 years agoAdd mit_afs_string_to_key declaration
Zhanna Tsitkov [Tue, 5 Oct 2010 03:01:01 +0000 (03:01 +0000)]
Add mit_afs_string_to_key declaration

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

14 years agoAdd a missing protototype which was breaking the crypto build with the
Greg Hudson [Tue, 5 Oct 2010 00:16:10 +0000 (00:16 +0000)]
Add a missing protototype which was breaking the crypto build with the
NSS back end after r24409.

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

14 years agoProtoize old-style function definitions in kdb5.c and normalize
Greg Hudson [Mon, 4 Oct 2010 18:23:00 +0000 (18:23 +0000)]
Protoize old-style function definitions in kdb5.c and normalize
formatting of definition headers.  No functional changes.

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

14 years agoMerge branches/nss to trunk
Greg Hudson [Sat, 2 Oct 2010 17:21:54 +0000 (17:21 +0000)]
Merge branches/nss to trunk

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

14 years agoCopyright statements, whitespace, and other code formatting
Greg Hudson [Sat, 2 Oct 2010 17:17:35 +0000 (17:17 +0000)]
Copyright statements, whitespace, and other code formatting

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

14 years agoIn the krb5_kuserok implementation, fix an unintentional type change
Greg Hudson [Sat, 2 Oct 2010 11:48:06 +0000 (11:48 +0000)]
In the krb5_kuserok implementation, fix an unintentional type change
to "gobble" (was an int, was accidentally changed to a char) which
could result in an infinite loop.

ticket: 6792

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

14 years agoFix type errors in t_gssexts
Greg Hudson [Sat, 2 Oct 2010 11:34:27 +0000 (11:34 +0000)]
Fix type errors in t_gssexts

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

14 years agoEliminate K&R-style function definition headers in t_gssexts.c, and
Greg Hudson [Sat, 2 Oct 2010 11:30:50 +0000 (11:30 +0000)]
Eliminate K&R-style function definition headers in t_gssexts.c, and
reformat other definitions according to coding practices.

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

14 years agoUse gss_set_cred_option instead of (undeclared) gssspi_set_cred_option
Ken Raeburn [Sat, 2 Oct 2010 03:29:37 +0000 (03:29 +0000)]
Use gss_set_cred_option instead of (undeclared) gssspi_set_cred_option

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

14 years agoTry to require function declarations for GCC, as we already do for the
Ken Raeburn [Sat, 2 Oct 2010 03:29:34 +0000 (03:29 +0000)]
Try to require function declarations for GCC, as we already do for the
Sun compiler.

Change the cache variable name construction to distinguish "=" from
"-" in option names.  Prefer -Werror-implicit-function-declaration
over -Werror=implicit-function-declaration since in some versions of
GCC only the former works properly.

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

14 years agoAdd empty src/plugins/preauth/securid_sam2/deps to allow build to work again
Tom Yu [Fri, 1 Oct 2010 20:15:00 +0000 (20:15 +0000)]
Add empty src/plugins/preauth/securid_sam2/deps to allow build to work again

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

14 years agoAdd an error to be returned by a preauth mechanism indicating that the KDC should...
Sam Hartman [Fri, 1 Oct 2010 17:12:41 +0000 (17:12 +0000)]
Add an error to be returned by a preauth mechanism indicating that the KDC should not respond to a packet

* Do not generate an error response in this case
* Drop a TCP connection if we are not going to respond to it.

kdc: add KRB5KDC_ERR_DISCARD

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

14 years agoInitial securid2 support.
Sam Hartman [Fri, 1 Oct 2010 17:12:37 +0000 (17:12 +0000)]
Initial securid2 support.
builds but untested

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

14 years agoEnable sam_challenge_2 encoders
Sam Hartman [Fri, 1 Oct 2010 17:12:30 +0000 (17:12 +0000)]
Enable sam_challenge_2 encoders

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

14 years agoRemove support for the old pa-sam-challenge and pa-sam-response
Sam Hartman [Fri, 1 Oct 2010 17:12:26 +0000 (17:12 +0000)]
Remove support for the old pa-sam-challenge and pa-sam-response
preauth type per discussion on krbdev.  The pa-sam-challenge-2 code
remains in the client.

preauth: remove pa-sam-challenge

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

14 years agoImplement k5login_directory and k5login_authoritative options
Greg Hudson [Fri, 1 Oct 2010 15:56:30 +0000 (15:56 +0000)]
Implement k5login_directory and k5login_authoritative options

Add and document two new options for controlling k5login behavior.

ticket: 6792

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

14 years agoAdd a simple test harness for kuserok. Build it during make check but
Greg Hudson [Fri, 1 Oct 2010 13:44:12 +0000 (13:44 +0000)]
Add a simple test harness for kuserok.  Build it during make check but
don't run any automated tests for the moment.

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

14 years agoA cleaner impleentation of r24399 which adds two new auth context APIs
Greg Hudson [Fri, 1 Oct 2010 03:47:38 +0000 (03:47 +0000)]
A cleaner impleentation of r24399 which adds two new auth context APIs
(and is therefore less suitable for backporting to 1.8) but doesn't
reach inside the auth context structure in the krb5 mechanism code.

ticket: 6768

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

14 years agoGSSAPI forwarded credentials must be encrypted in session key
Greg Hudson [Fri, 1 Oct 2010 03:45:43 +0000 (03:45 +0000)]
GSSAPI forwarded credentials must be encrypted in session key

When IAKERB support was added, the krb5_mk_req checksum function
gained access to the send subkey.  This caused GSSAPI forwarded
credentials to be encrypted in the subkey, which violates RFC 4121
section 4.1.1 and is not accepted by Microsoft's implementation.
Temporarily null out the send subkey in the auth context so that
krb5_mk_ncred uses the session key instead.

ticket: 6768
target_version: 1.8.4
tags: pullup

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

14 years agoWhitespace
Greg Hudson [Thu, 30 Sep 2010 17:16:46 +0000 (17:16 +0000)]
Whitespace

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

14 years agoWhitespace
Greg Hudson [Thu, 30 Sep 2010 17:02:29 +0000 (17:02 +0000)]
Whitespace

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

14 years agoUse a different construction for defaulting ks_tuple and n_ks_tuple in
Greg Hudson [Thu, 30 Sep 2010 17:01:30 +0000 (17:01 +0000)]
Use a different construction for defaulting ks_tuple and n_ks_tuple in
the libkadm5 server principal routines, to avoid repeated conditional
expressions.

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

14 years agoWhitespace and minor style changes
Greg Hudson [Thu, 30 Sep 2010 15:53:44 +0000 (15:53 +0000)]
Whitespace and minor style changes

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

14 years agoCorrect the admin documentation for auth_to_local
Greg Hudson [Thu, 30 Sep 2010 13:13:41 +0000 (13:13 +0000)]
Correct the admin documentation for auth_to_local

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

14 years agoFollow-on to r24258: initialize the new k5e1 error table where we
Greg Hudson [Wed, 29 Sep 2010 21:38:26 +0000 (21:38 +0000)]
Follow-on to r24258: initialize the new k5e1 error table where we
initialize the krb5 error table, and add initialize_k5e1_error_table
to the libkrb5 exports list for consistency with the other error
tables.

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

14 years agomake depend
Sam Hartman [Wed, 29 Sep 2010 21:29:25 +0000 (21:29 +0000)]
make depend
Add kadm5_hook test plugin to toplevel Makefile.in

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

14 years agoAutomated tests for kadm5_hook plugin
Sam Hartman [Wed, 29 Sep 2010 21:29:20 +0000 (21:29 +0000)]
Automated tests for kadm5_hook plugin

Include a k5test Python test and test plugin for the kadm5_hook interface.

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

14 years agokadm5_hook: new plugin interface
Sam Hartman [Wed, 29 Sep 2010 21:29:14 +0000 (21:29 +0000)]
kadm5_hook: new plugin interface

Implement http://k5wiki.kerberos.org/wiki/Projects/Kadmin_hook_interface

This provides an interface that allows a plugin to track kadmin
operations. This can be used for projects like the krb5-sync project.

ticket: 6791

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

14 years agoMake krb5_dbe_def_search_enctype skip key data entries with invalid
Greg Hudson [Tue, 28 Sep 2010 19:09:11 +0000 (19:09 +0000)]
Make krb5_dbe_def_search_enctype skip key data entries with invalid
enctypes instead of erroring out on them.  We had this behavior prior
to 1.8 (more by accident than by design), but it changed as a
side-effect of r23599.

ticket: 6790
target_version: 1.8.4
tags: pullup

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

14 years agoUse IAKERB OID header for all IAKERB messages including AP-REQ
Luke Howard [Mon, 27 Sep 2010 18:51:55 +0000 (18:51 +0000)]
Use IAKERB OID header for all IAKERB messages including AP-REQ

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

14 years agoDoxygen for k5-buf.h
Sam Hartman [Mon, 27 Sep 2010 17:16:47 +0000 (17:16 +0000)]
Doxygen for k5-buf.h

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

14 years agokpasswd: if a credential cache is present, use FAST
Sam Hartman [Mon, 27 Sep 2010 17:16:41 +0000 (17:16 +0000)]
kpasswd: if a credential cache is present, use FAST

If a credentials cache is available, use it as an armor cache to enable FAST negotiation for kpasswd. This requires an attacker to attack both the user's long-term key for the old password as well as the ticket used for the armor cache in order to attack the password change. Depending on how the armor ticket is obtained, this may provide limited value. However, it provides users an easy option if they are concerned about their current password. Users can kinit with one principal to help protect changing the password of another principal.

* krb5_get_init_creds_opt_set_fast_ccache: new API to set fast ccache based on a krb5_ccache object rather than a resolvable string

* kpasswd: always open the current credential cache even if not needed
  for determining the principal. If the cache has tickets, use it as
  an armor cache.

* tests/dejagnu/krb-standalone/kadmin.exp: Arrange to test new code path

ticket: 6786

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

14 years agoSimplify acquire_accept_cred very slightly, avoiding some long lines
Greg Hudson [Mon, 27 Sep 2010 03:46:57 +0000 (03:46 +0000)]
Simplify acquire_accept_cred very slightly, avoiding some long lines
and repeated macro calls.

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

14 years agoAdd gss_krb5_import_cred
Greg Hudson [Mon, 27 Sep 2010 03:39:22 +0000 (03:39 +0000)]
Add gss_krb5_import_cred

Add gss_krb5_import_cred from Heimdal; allows krb5 creds to be
acquired from a keytab or ccache into a GSSAPI credential without
using global process or thread variables.

Merged from the users/lhoward/import-cred branch.

ticket: 6785

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

14 years agoInitialize kdb5_ldap_util's context with kadm5_init_krb5_context, like
Greg Hudson [Wed, 22 Sep 2010 22:09:24 +0000 (22:09 +0000)]
Initialize kdb5_ldap_util's context with kadm5_init_krb5_context, like
kdb5_util does, in order to get the KDC profile settings as well as
the regular krb5 profile settings.

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

14 years agorelicense Sun RPC to 3-clause BSD-style
Tom Yu [Wed, 22 Sep 2010 21:50:48 +0000 (21:50 +0000)]
relicense Sun RPC to 3-clause BSD-style

Per e-mail from Wim Coekaerts, Oracle America authorizes the
relicensing of Sun RPC to 3-clause BSD-style.

ticket: 6784

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

14 years agoAdjust the k5login man page to have a slightly more neutral tone
Greg Hudson [Mon, 20 Sep 2010 18:25:18 +0000 (18:25 +0000)]
Adjust the k5login man page to have a slightly more neutral tone

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

14 years agoSlight revisions to create_workers() in the KDC:
Greg Hudson [Sun, 19 Sep 2010 12:03:18 +0000 (12:03 +0000)]
Slight revisions to create_workers() in the KDC:
* Use calloc() to allocate the pids array; squashes a Coverity false
  positive.
* Don't leak the pids array in worker processes.
* Use consistent terminology in comments.

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

14 years agoKDC worker processes feature
Greg Hudson [Fri, 17 Sep 2010 17:42:31 +0000 (17:42 +0000)]
KDC worker processes feature

Add support for a krb5kdc -w option which causes the KDC to spawn
worker processes which can process requests in parallel.  See also:
http://k5wiki.kerberos.org/wiki/Projects/Parallel_KDC

ticket: 6783

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

14 years agoAdd an extra arguments parameter to k5test's realm.start_kdc()
Greg Hudson [Fri, 17 Sep 2010 16:06:34 +0000 (16:06 +0000)]
Add an extra arguments parameter to k5test's realm.start_kdc()

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

14 years agoIn kinit_kdb_init(), ensure that we don't return an error with the
Greg Hudson [Fri, 17 Sep 2010 15:52:23 +0000 (15:52 +0000)]
In kinit_kdb_init(), ensure that we don't return an error with the
old, freed value of *pcontext still there--that would result in a
double free.

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

14 years agoFollow-on to r24315: remove get/set_mkey_list from export list of
Greg Hudson [Thu, 16 Sep 2010 17:38:30 +0000 (17:38 +0000)]
Follow-on to r24315: remove get/set_mkey_list from export list of
libkdb_ldap.

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

14 years agoIn the PKINIT OpenSSL crypto code, use a signed int to hold the result
Greg Hudson [Wed, 15 Sep 2010 22:43:00 +0000 (22:43 +0000)]
In the PKINIT OpenSSL crypto code, use a signed int to hold the result
of X509_get_ext_by_NID so we can detect negative return values.
Reported by nalin@redhat.com.

ticket: 6774

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

14 years agoWhitespace
Greg Hudson [Wed, 15 Sep 2010 20:07:39 +0000 (20:07 +0000)]
Whitespace

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

14 years agoAdd a license statement to the new extern.h in kinit, use an include
Greg Hudson [Wed, 15 Sep 2010 17:45:31 +0000 (17:45 +0000)]
Add a license statement to the new extern.h in kinit, use an include
blocker which does not impinge on the system's symbol namespace, and
use the recommended formatting for function prototypes.

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

14 years agoWhitespace
Greg Hudson [Wed, 15 Sep 2010 17:30:17 +0000 (17:30 +0000)]
Whitespace

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

14 years agoFormatting fix
Greg Hudson [Wed, 15 Sep 2010 17:22:57 +0000 (17:22 +0000)]
Formatting fix

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

14 years agokinit: add KDB keytab support
Sam Hartman [Wed, 15 Sep 2010 17:13:41 +0000 (17:13 +0000)]
kinit: add KDB keytab support

This implements
http://k5wiki.kerberos.org/Projects/What_does_God_need_with_a_password.
If the KDB keytab is selected by command line options, then kinit will
register the KDB keytab and open the database.  This permits an
administrator to obtain tickets as a user without knowing that user's
password.

As a result kinit links against libkadm5srv and libkdb5. Discussion is
ongoing about whether this is desirable or about whether two versions
of kinit are required.

ticket: 6779

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

14 years agoRemove dead code from DAL and kdb plugins
Sam Hartman [Wed, 15 Sep 2010 17:13:34 +0000 (17:13 +0000)]
Remove dead code from DAL and kdb plugins

kdb: remove get/set_mkey_list

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

14 years agokdb: store mkey list in context and permit NULL mkey for kdb_dbe_decrypt_key_data
Sam Hartman [Wed, 15 Sep 2010 17:13:23 +0000 (17:13 +0000)]
kdb: store mkey list in context and permit NULL mkey for kdb_dbe_decrypt_key_data

Previously, code needed to run a loop to find the current master key,
possibly fetch a new master key list and try finding the master key
again around each key decryption.  This was not universally done;
there are cases where only the current master key was used.  In
addition, the correct ideom for decrypting key data is too complicated
and is potentially unavailable to plugins that do not have access to
the master key.  Instead, store the master key list in the dal_handle
whenever it is fetched and permit a NULL master key for
krb5_dbe_decrypt_key_data.

* Remove APIs for krb5_db_{get|set}_mkey_list
* krb5_db_fetch_mkey_list: memoize master key list in dal_handle
* krb5_db_free_mkey_list: don't free the memoized list; arrange for it to be freed later
* krb5_dbe_decrypt_key_data: Search for correct master key on NULL argument
* change call sites to take advantage

ticket: 6778

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

14 years agoIn the PKINIT OpenSSL code, ensure that appropriate cerficiate fields
Greg Hudson [Wed, 15 Sep 2010 17:10:05 +0000 (17:10 +0000)]
In the PKINIT OpenSSL code, ensure that appropriate cerficiate fields
have been set before using ku_reject.  Patch from nalin@redhat.com.

ticket: 6775

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

14 years agoUse correct CRL stack macros in pkinit OpenSSL code. Patch from Olaf
Greg Hudson [Wed, 15 Sep 2010 17:06:43 +0000 (17:06 +0000)]
Use correct CRL stack macros in pkinit OpenSSL code.  Patch from Olaf
Flebbe.

ticket: 6776

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

14 years agoWhitespace
Greg Hudson [Wed, 15 Sep 2010 16:51:31 +0000 (16:51 +0000)]
Whitespace

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

14 years agoFix warnings in encrypt_key and decrypt_key. Avoid a segfault if NULL
Sam Hartman [Wed, 15 Sep 2010 16:40:32 +0000 (16:40 +0000)]
Fix warnings in encrypt_key and decrypt_key. Avoid a segfault if NULL
master key is passed into default decryption function.

kdb: fix warnings

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

14 years agoIn krb5_sname_to_principal, correctly handle failures from
Greg Hudson [Wed, 15 Sep 2010 15:50:15 +0000 (15:50 +0000)]
In krb5_sname_to_principal, correctly handle failures from
krb5_build_principal.

ticket: 6777

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

14 years agoAllow a zero checksum type to be passed into krb5_k_verify_checksum_iov;
Luke Howard [Thu, 9 Sep 2010 15:54:32 +0000 (15:54 +0000)]
Allow a zero checksum type to be passed into krb5_k_verify_checksum_iov;
this indicates that the mandatory checksum type for the key is to be used.
This interface is necessary because there is no public interface through
which the mandatory checksum type for an encryption type can be determined.

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

14 years agokrb5_k_make_checksum will use the mandatory checksum type if 0 is
Luke Howard [Thu, 9 Sep 2010 15:39:47 +0000 (15:39 +0000)]
krb5_k_make_checksum will use the mandatory checksum type if 0 is
passed in as the checksum type; however krb5_k_make_checksum_iov
does not support this. Add the same logic for the behaviour is
consistent.

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

14 years agoAdd dummy camellia subdir to openssl back end makefile
Greg Hudson [Wed, 8 Sep 2010 17:38:22 +0000 (17:38 +0000)]
Add dummy camellia subdir to openssl back end makefile

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

14 years agoMake depend
Greg Hudson [Wed, 8 Sep 2010 03:51:31 +0000 (03:51 +0000)]
Make depend

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

14 years agoDon't build the built-in Camellia block cipher code if Camellia-CCM
Greg Hudson [Wed, 8 Sep 2010 03:48:05 +0000 (03:48 +0000)]
Don't build the built-in Camellia block cipher code if Camellia-CCM
enctypes aren't enabled.

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

14 years agoX509_verify_cert can return without setting cert_ctx.current_cert. If
Greg Hudson [Wed, 8 Sep 2010 03:15:49 +0000 (03:15 +0000)]
X509_verify_cert can return without setting cert_ctx.current_cert.  If
it does, don't dereference a null pointer when creating the pkiDebug
message.

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

14 years agoMerge the camellia-ccm branch to trunk. Since there are no IANA
Greg Hudson [Tue, 7 Sep 2010 17:54:15 +0000 (17:54 +0000)]
Merge the camellia-ccm branch to trunk.  Since there are no IANA
assignments for Camellia-CCM enctypes or cksumtypes yet, they are
disabled in a default build.  They can be made available by defining
(via CPPFLAGS) local-use enctype numbers for the enctypes and
cksumtypes.

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

14 years agoEnsure valid key in krb5int_yarrow_cipher_encrypt_block
Ezra Peisach [Sat, 4 Sep 2010 21:46:53 +0000 (21:46 +0000)]
Ensure valid key in krb5int_yarrow_cipher_encrypt_block

Under low memory conditions (or when testing memory allocation failures),
the key pointer will be 0 - and not initialized. Test and return failure
before deref a NULL.

ticket: 6772

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

14 years agoFix memory leaks in kdb5_verify
Ezra Peisach [Sat, 4 Sep 2010 21:43:04 +0000 (21:43 +0000)]
Fix memory leaks in kdb5_verify

Minor leaks.  Just cleaning up code.

ticket: 6771

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