idra/krb5.git
13 years agoFILE keytabs have been able to handle write operations since krb5 1.7,
ghudson [Tue, 26 Oct 2010 19:36:58 +0000 (19:36 +0000)]
FILE keytabs have been able to handle write operations since krb5 1.7,
as an apparently unintended side effect of r20594.  Clean up the code
by combining the identical resolve functions for FILE and WRFILE, and
removing the code to set up a WRFILE default keytab name in kadmin.c.
Also fixes a slight display bug; k5test.py needs to be adjusted to
expect the correct output.

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

13 years agoticket: 6811
ghudson [Tue, 26 Oct 2010 17:34:41 +0000 (17:34 +0000)]
ticket: 6811
subject: Mark Camellia-CCM code as experimental
target_version: 1.9
tags: pullup

Add a comment noting that the Camellia-CCM code in 1.9 is
experimental.

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

13 years agoticket: 6770
ghudson [Tue, 26 Oct 2010 17:18:22 +0000 (17:18 +0000)]
ticket: 6770

Add a kg_encrypt_inplace() utility function to the krb5 GSS mech, and
use it where we do in-place encryption of checksums in the non-CFX
seal tokens with raw DES enctypes.  Avoids a harmless but incorrect
in-place memcpy().

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

13 years agoMake k5-buf.h comments consistent with coding style.
ghudson [Tue, 26 Oct 2010 16:41:38 +0000 (16:41 +0000)]
Make k5-buf.h comments consistent with coding style.

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

13 years agoticket: 6809
ghudson [Tue, 26 Oct 2010 14:17:38 +0000 (14:17 +0000)]
ticket: 6809
target_version: 1.9
tags: pullup

Set *conf_state on successful return from
gss_krb5int_make_seal_token_v3_iov, fixing a case where it wasn't
always set by gss_wrap_iov.  Patch from aberry@likewise.com.

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

13 years agoticket: 6787
ghudson [Mon, 25 Oct 2010 21:55:54 +0000 (21:55 +0000)]
ticket: 6787
target_version: 1.9
tags: pullup

When we create a temporary memory ccache for use within a
krb5_gss_cred_id_rec, set a flag to indicate that the ccache should be
destroyed rather than closed.  Patch from aberry@likewise.com.

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

13 years agoticket: 6796
ghudson [Mon, 25 Oct 2010 20:17:54 +0000 (20:17 +0000)]
ticket: 6796
target_version: 1.9
tags: pullup

Use safer output parameter handling in
krb5_gss_acquire_cred_impersonate_name and its subsidiary helpers.

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

13 years agoticket: 6793
ghudson [Mon, 25 Oct 2010 19:37:03 +0000 (19:37 +0000)]
ticket: 6793
target_version: 1.9
tags: pullup

In acquire_init_cred in the GSS krb5 mech, don't intern cred->name,
since it's not used as an output parameter.  Fixes a memory leak.
Reported by aberry@likewise.com.

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

13 years agoWhitespace.
ghudson [Sun, 24 Oct 2010 14:39:41 +0000 (14:39 +0000)]
Whitespace.

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

13 years agoWhitespace.
ghudson [Sun, 24 Oct 2010 14:25:07 +0000 (14:25 +0000)]
Whitespace.

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

13 years agoFix adjustment of counter.
raeburn [Sat, 23 Oct 2010 22:26:10 +0000 (22:26 +0000)]
Fix adjustment of counter.

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

13 years agoDeclare xdr_purgekeys_arg.
raeburn [Sat, 23 Oct 2010 22:26:07 +0000 (22:26 +0000)]
Declare xdr_purgekeys_arg.

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

13 years agoDeclare kadmin_purgekeys.
raeburn [Sat, 23 Oct 2010 22:26:04 +0000 (22:26 +0000)]
Declare kadmin_purgekeys.

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

13 years agoDeclare krb5_set_error_message_fl.
raeburn [Sat, 23 Oct 2010 22:26:01 +0000 (22:26 +0000)]
Declare krb5_set_error_message_fl.

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

13 years agoInclude k5-int.h for function declarations.
raeburn [Sat, 23 Oct 2010 22:25:58 +0000 (22:25 +0000)]
Include k5-int.h for function declarations.

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

13 years agoIn profile-reading performance test, print microseconds not milliseconds.
raeburn [Sat, 23 Oct 2010 22:25:55 +0000 (22:25 +0000)]
In profile-reading performance test, print microseconds not milliseconds.

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

13 years agoTry harder to retain the "brand" string in the shared library.
raeburn [Sat, 23 Oct 2010 22:25:51 +0000 (22:25 +0000)]
Try harder to retain the "brand" string in the shared library.

Make the brand array non-static, and actually use the value in (the
infrequently-called) krb5_init_secure_context.

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

13 years agoticket: 6810
ghudson [Sat, 23 Oct 2010 00:38:17 +0000 (00:38 +0000)]
ticket: 6810
subject: Better libk5crypto NSS fork safety
target_version: 1.9
tags: pullup

Use SECMOD_RestartModules() from the forthcoming NSS 3.12.9 release to
make the libk5crypto back end work after a fork.  Add a test program
to exercise fork detection in the NSS back end.  Add a configure-time
version check to ensure that we're using NSS 3.12.9 or later.

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

13 years agoMake it possible to override CRYPTO_IMPL_CFLAGS and CRYPTO_IMPL_LIBS at
ghudson [Fri, 22 Oct 2010 00:01:56 +0000 (00:01 +0000)]
Make it possible to override CRYPTO_IMPL_CFLAGS and CRYPTO_IMPL_LIBS at
make time.

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

13 years agoconfigure.in: don't force use of cache
hartmans [Tue, 19 Oct 2010 19:57:56 +0000 (19:57 +0000)]
configure.in: don't force use of cache

Back when hardware was slower and we had lots and lots of
imakefile-like configure scripts, forcing the use of config.cache made
sense for performance reasons. Now that we have one configure script
and we build on modern hardware, config.cache just introduces errors
as you are debugging changes to the configure script.

This commit stops second guessing autoconf's cache handling.

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

13 years agoticket: 6807
hartmans [Tue, 19 Oct 2010 19:50:48 +0000 (19:50 +0000)]
ticket: 6807
subject: SecurID build support
target_version: 1.9
tags: pullup

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

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

13 years agoticket: 6806
hartmans [Tue, 19 Oct 2010 19:50:42 +0000 (19:50 +0000)]
ticket: 6806
subject: securID error handling fix
target_version: 1.9
tags: pullup

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

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

13 years agoticket: 6805
hartmans [Tue, 19 Oct 2010 19:50:37 +0000 (19:50 +0000)]
ticket: 6805
subject: securID code fixes
target_version: 1.9
tags: pullup

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

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

13 years agoticket: 6804
ghudson [Tue, 19 Oct 2010 19:08:38 +0000 (19:08 +0000)]
ticket: 6804
subject: Remove KDC replay cache
target_version: 1.9
tags: pullup

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.

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

13 years agoticket: 6802
tlyu [Mon, 18 Oct 2010 22:52:28 +0000 (22:52 +0000)]
ticket: 6802

Adjust copyright.texinfo to fix some TeX output issues.  Also do minor
cleanup.

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

13 years agoticket: 6802
tlyu [Thu, 14 Oct 2010 22:49:11 +0000 (22:49 +0000)]
ticket: 6802
tags: pullup
subject: copyright notice updates
target_version: 1.9

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.

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

13 years agoWhitespace.
ghudson [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

13 years agoAdjust valgrind support to assume a modern valgrind that requires %p in log files.
hartmans [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

13 years agoticket: 6801
hartmans [Wed, 13 Oct 2010 01:19:14 +0000 (01:19 +0000)]
ticket: 6801
target_version: 1.9
Subject: 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.

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

13 years agoREADME and patchlevel to 1.10-prerelease
tlyu [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

13 years agoInterim update of README and NOTICE.
tlyu [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

13 years agoWhen returning KRB5_KT_NOTFOUND from krb5_ktfile_get_entry, set an
ghudson [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

13 years agoPlug a memory leak in gss_indicate_mechs.
ghudson [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

13 years agoEncoding cleanup: curly quotes to ASCII quotes, and some ISO-8859-1
tlyu [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

13 years agoIn gss_indicate_mechs, avoid setting the output pointer until success
ghudson [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

13 years agoIn gss_inquire_attrs_for_mech, remove the assumption that mech_attrs
ghudson [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

13 years agoRemove duplicate code block in spnego_gss_set_cred_option().
ghudson [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

13 years agoticket: 1219
tlyu [Fri, 8 Oct 2010 03:57:28 +0000 (03:57 +0000)]
ticket: 1219
status: open
target_version: 1.9

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.

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

13 years agoticket: 6701
ghudson [Thu, 7 Oct 2010 17:50:06 +0000 (17:50 +0000)]
ticket: 6701
target_version: 1.8.4
tags: pullup

Fix a typo in kerberos.ldif.  Reported by nalin@redhat.com.

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

13 years agoticket: 6799
ghudson [Thu, 7 Oct 2010 17:49:44 +0000 (17:49 +0000)]
ticket: 6799
subject: 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.

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

13 years agoticket: 6798
tlyu [Wed, 6 Oct 2010 23:57:37 +0000 (23:57 +0000)]
ticket: 6798
subject: set NT-SRV-INST on TGS principal names
tags: pullup
target_version: 1.8.4

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.

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

13 years agoCorrect a miscarriage of justice committed by the style police.
ghudson [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

13 years agoMerge users/lhoward/sasl-gs2 to trunk.
ghudson [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

13 years agoMinor comments related changed.
tsitkova [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

13 years agoAdjust prototype files for easier extraction of copyright/license
ghudson [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

13 years agoDocument that krb5_get_error_message() never returns NULL.
ghudson [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

13 years agoticket: 6797
tlyu [Tue, 5 Oct 2010 21:05:19 +0000 (21:05 +0000)]
ticket: 6797
subject: CVE-2010-1322 KDC uninitialized pointer crash in authorization data handling (MITKRB5-SA-2010-006)
tags: pullup
target_version: 1.8.4

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.

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

13 years agoAdd RUN_SETUP so make check works by setting the proper LD_LIBRARY_PATH
epeisach [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

13 years agoFix the NSS PRNG build. Fix the build for non-gmake make. Revert a
ghudson [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

13 years agoConstify the name field of a kadm5_hook vtable, since it holds a
ghudson [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

13 years agoAdd a name field to the pwqual plugin vtable and log pwqual module
ghudson [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

13 years agoticket: 6795
ghudson [Tue, 5 Oct 2010 14:53:09 +0000 (14:53 +0000)]
ticket: 6795
subject: 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.

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

13 years agoAdd additional NRL copyright
hartmans [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

13 years agoDocument kadm5_hook interface
hartmans [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

13 years agoSome missed files needed for rev #24420.
tsitkova [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

13 years agoImproves prng code modularity. Introduces fortuna-like prng that can be used in lieu...
tsitkova [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

13 years agoAdd mit_afs_string_to_key declaration
tsitkova [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

13 years agoAdd a missing protototype which was breaking the crypto build with the
ghudson [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

13 years agoProtoize old-style function definitions in kdb5.c and normalize
ghudson [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

13 years agoMerge branches/nss to trunk.
ghudson [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

13 years agoCopyright statements, whitespace, and other code formatting.
ghudson [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

13 years agoticket: 6792
ghudson [Sat, 2 Oct 2010 11:48:06 +0000 (11:48 +0000)]
ticket: 6792

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.

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

13 years agoFix type errors in t_gssexts.
ghudson [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

13 years agoEliminate K&R-style function definition headers in t_gssexts.c, and
ghudson [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

13 years agoUse gss_set_cred_option instead of (undeclared) gssspi_set_cred_option.
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

13 years agoTry to require function declarations for GCC, as we already do for the
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

13 years agoAdd empty src/plugins/preauth/securid_sam2/deps to allow build to work again.
tlyu [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

13 years agokdc: add KRB5KDC_ERR_DISCARD
hartmans [Fri, 1 Oct 2010 17:12:41 +0000 (17:12 +0000)]
kdc: add KRB5KDC_ERR_DISCARD

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.

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

13 years agoInitial securid2 support.
hartmans [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

13 years agoEnable sam_challenge_2 encoders
hartmans [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

13 years agopreauth: remove pa-sam-challenge
hartmans [Fri, 1 Oct 2010 17:12:26 +0000 (17:12 +0000)]
preauth: remove pa-sam-challenge

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.

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

13 years agoticket: 6792
ghudson [Fri, 1 Oct 2010 15:56:30 +0000 (15:56 +0000)]
ticket: 6792
subject: Implement k5login_directory and k5login_authoritative options

Add and document two new options for controlling k5login behavior.

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

13 years agoAdd a simple test harness for kuserok. Build it during make check but
ghudson [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

13 years agoticket: 6768
ghudson [Fri, 1 Oct 2010 03:47:38 +0000 (03:47 +0000)]
ticket: 6768

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.

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

13 years agoticket: 6768
ghudson [Fri, 1 Oct 2010 03:45:43 +0000 (03:45 +0000)]
ticket: 6768
subject: GSSAPI forwarded credentials must be encrypted in session key
target_version: 1.8.4
tags: pullup

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.

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

13 years agoWhitespace.
ghudson [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

13 years agoWhitespace.
ghudson [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

13 years agoUse a different construction for defaulting ks_tuple and n_ks_tuple in
ghudson [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

13 years agoWhitespace and minor style changes.
ghudson [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

13 years agoCorrect the admin documentation for auth_to_local.
ghudson [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

13 years agoFollow-on to r24258: initialize the new k5e1 error table where we
ghudson [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

13 years agomake depend
hartmans [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

13 years agoAutomated tests for kadm5_hook plugin
hartmans [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

13 years agoticket: 6791
hartmans [Wed, 29 Sep 2010 21:29:14 +0000 (21:29 +0000)]
ticket: 6791
subject: 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.

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

13 years agoticket: 6790
ghudson [Tue, 28 Sep 2010 19:09:11 +0000 (19:09 +0000)]
ticket: 6790
target_version: 1.8.4
tags: pullup

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.

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

13 years agoUse IAKERB OID header for all IAKERB messages including AP-REQ
lhoward [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

13 years agoDoxygen for k5-buf.h
hartmans [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

13 years agoticket: 6786
hartmans [Mon, 27 Sep 2010 17:16:41 +0000 (17:16 +0000)]
ticket: 6786
subject: 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

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

13 years agoSimplify acquire_accept_cred very slightly, avoiding some long lines
ghudson [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

13 years agoticket: 6785
ghudson [Mon, 27 Sep 2010 03:39:22 +0000 (03:39 +0000)]
ticket: 6785
subject: 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.

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

13 years agoInitialize kdb5_ldap_util's context with kadm5_init_krb5_context, like
ghudson [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

13 years agoticket: 6784
tlyu [Wed, 22 Sep 2010 21:50:48 +0000 (21:50 +0000)]
ticket: 6784
subject: 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.

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

13 years agoAdjust the k5login man page to have a slightly more neutral tone.
ghudson [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

13 years agoSlight revisions to create_workers() in the KDC:
ghudson [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

13 years agoticket: 6783
ghudson [Fri, 17 Sep 2010 17:42:31 +0000 (17:42 +0000)]
ticket: 6783
subject: 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

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

13 years agoAdd an extra arguments parameter to k5test's realm.start_kdc().
ghudson [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

13 years agoIn kinit_kdb_init(), ensure that we don't return an error with the
ghudson [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

13 years agoFollow-on to r24315: remove get/set_mkey_list from export list of
ghudson [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

13 years agoticket: 6774
ghudson [Wed, 15 Sep 2010 22:43:00 +0000 (22:43 +0000)]
ticket: 6774

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.

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

13 years agoWhitespace.
ghudson [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