krb5.git
14 years agoEliminate some unused variable warnings
Greg Hudson [Mon, 20 Dec 2010 17:48:06 +0000 (17:48 +0000)]
Eliminate some unused variable warnings

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

14 years agoRemove an unnecessary clause from safe_cksumtype() which served only
Greg Hudson [Thu, 16 Dec 2010 05:07:24 +0000 (05:07 +0000)]
Remove an unnecessary clause from safe_cksumtype() which served only
to create a theoretical (but impossible in practice) memory leak.

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

14 years agoupdate acknowledgments
Tom Yu [Wed, 15 Dec 2010 19:14:37 +0000 (19:14 +0000)]
update acknowledgments

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

14 years agoEnsure time() is prototyped in g_accept_sec_context.c
Greg Hudson [Tue, 14 Dec 2010 18:46:46 +0000 (18:46 +0000)]
Ensure time() is prototyped in g_accept_sec_context.c

r22736 added a call to time() in g_accept_sec_context.c.  Include
<time.h> to ensure that this call is correctly prototyped.  Previously
<time.h> was only included implicitly through <pthread.h>, which
doesn't apply when thread support is disabled.

ticket: 6842
tags: pullup
target_version: 1.9

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

14 years agomemory leak in changepw.c
Tom Yu [Tue, 14 Dec 2010 17:34:48 +0000 (17:34 +0000)]
memory leak in changepw.c

Apply patch from Marcus Watts to avoid a memory leak in changepw.c.

ticket: 6841
tags: pullup
target_version: 1.9

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

14 years agoFix a regression in the client-side ticket renewal code where KDC
Greg Hudson [Tue, 14 Dec 2010 17:28:38 +0000 (17:28 +0000)]
Fix a regression in the client-side ticket renewal code where KDC
options were not folded into the renewal request (most notably, the
KDC_OPT_RENEWABLE flag), so we didn't request renewable renewed
tickets.  Add a simple test case for ticket renewal.

ticket: 6838
tags: pullups
target_version: 1.9

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

14 years agotypo in plugin-related error message
Tom Yu [Tue, 14 Dec 2010 17:24:21 +0000 (17:24 +0000)]
typo in plugin-related error message

Apply patch from Marcus Watts to fix error message typo.

ticket: 6840
tags: pullup
target_version: 1.9

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

14 years agohandle MS PACs that lack server checksum
Tom Yu [Fri, 10 Dec 2010 01:06:26 +0000 (01:06 +0000)]
handle MS PACs that lack server checksum

target_version 1.9
tags: pullup

Apple Mac OS X Server's Open Directory KDC issues MS PAC like
authorization data that lacks a server checksum.  If this checksum is
missing, mark the PAC as unverfied, but allow
krb5int_authdata_verify() to succeed.  Filter out the unverified PAC
in subsequent calls to krb5_authdata_get_attribute().  Add trace
points to indicate where this behavior occurs.

Thanks to Helmut Grohne for help with analysis.  This bug is also
Debian Bug #604925:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=604925

This change should also get backported to krb5-1.8.x.

ticket: 6839

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

14 years agoAdd comment noting that RFC 4121 appears to omit RC4-HMAC from the
Tom Yu [Tue, 7 Dec 2010 23:45:15 +0000 (23:45 +0000)]
Add comment noting that RFC 4121 appears to omit RC4-HMAC from the
list of "not-newer" enctypes, even though RFC 4757 effectively treats
it as one.  Suggested by Derrick Brashear.

ticket: 6835

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

14 years agoupdate dependencies
Ken Raeburn [Sun, 5 Dec 2010 20:16:17 +0000 (20:16 +0000)]
update dependencies

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

14 years agoTest for key rollover for TGT, including purging old keys
Tom Yu [Fri, 3 Dec 2010 12:34:53 +0000 (12:34 +0000)]
Test for key rollover for TGT, including purging old keys

ticket: 1219
target_version: 1.9
tags: pullup

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

14 years agoCorrect typo in admin documentation for restrict_anonymous_to_tgt
Greg Hudson [Wed, 1 Dec 2010 22:36:38 +0000 (22:36 +0000)]
Correct typo in admin documentation for restrict_anonymous_to_tgt

ticket: 6829

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

14 years agoImplement restrict_anonymous_to_tgt realm flag
Greg Hudson [Wed, 1 Dec 2010 20:01:46 +0000 (20:01 +0000)]
Implement restrict_anonymous_to_tgt realm flag

Implement a new realm flag to reject ticket requests from anonymous
principals to any principal other than the local TGT.  Allows FAST to
be deployed using anonymous tickets as armor in realms where the set
of authenticatable users must be constrained.

ticket: 6829
target_version: 1.9
tags: pullup

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

14 years agoInstall kadm5_hook_plugin.h
Sam Hartman [Tue, 30 Nov 2010 22:46:54 +0000 (22:46 +0000)]
Install kadm5_hook_plugin.h

Install the kadm5 hook plugin header

ticket: 6828
target_version: 1.9
tags: pullup

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

14 years agoSA-2010-007 Checksum vulnerabilities (CVE-2010-1324 and others)
Greg Hudson [Tue, 30 Nov 2010 21:20:49 +0000 (21:20 +0000)]
SA-2010-007 Checksum vulnerabilities (CVE-2010-1324 and others)

Fix multiple checksum handling bugs, as described in:
  CVE-2010-1324
  CVE-2010-1323
  CVE-2010-4020
  CVE-2010-4021

* Return the correct (keyed) checksums as the mandatory checksum type
  for DES enctypes.
* Restrict simplified-profile checksums to their corresponding etypes.
* Add internal checks to reduce the risk of stream ciphers being used
  with simplified-profile key derivation or other algorithms relying
  on the block encryption primitive.
* Use the mandatory checksum type for the PKINIT KDC signature,
  instead of the first-listed keyed checksum.
* Use the mandatory checksum type when sending KRB-SAFE messages by
  default, instead of the first-listed keyed checksum.
* Use the mandatory checksum type for the t_kperf test program.
* Use the mandatory checksum type (without additional logic) for the
  FAST request checksum.
* Preserve the existing checksum choices (unkeyed checksums for DES
  enctypes) for the authenticator checksum, using explicit logic.
* Ensure that SAM checksums received from the KDC are keyed.
* Ensure that PAC checksums are keyed.

ticket: 6827

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

14 years agoInstall gssapi_ext.h on Windows. Include gssapi_ext.h in the header
Greg Hudson [Tue, 30 Nov 2010 17:46:10 +0000 (17:46 +0000)]
Install gssapi_ext.h on Windows.  Include gssapi_ext.h in the header
files considered by def-check.pl in verify-calling-conventions-gssapi.

ticket: 6826

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

14 years agoUse for loops for recursion in the Windows build, cutting down on the
Greg Hudson [Sun, 28 Nov 2010 01:36:42 +0000 (01:36 +0000)]
Use for loops for recursion in the Windows build, cutting down on the
verbiage in Makefile.in files.  For correctness of output, every
Makefile.in mydir= definition is changed to use $(S) instead of /.

ticket: 6826

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

14 years agoSupply static ordinals for new symbols in gssapi32.def and krb5_32.def,
Greg Hudson [Fri, 26 Nov 2010 16:37:14 +0000 (16:37 +0000)]
Supply static ordinals for new symbols in gssapi32.def and krb5_32.def,
for consistency with KFW 3.x.

ticket: 6826

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

14 years agoFix how gssapi.h is rebuilt on Windows; accidentally omitted from
Greg Hudson [Thu, 25 Nov 2010 20:34:06 +0000 (20:34 +0000)]
Fix how gssapi.h is rebuilt on Windows; accidentally omitted from
r24533.

ticket: 6826

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

14 years agoFix Windows build
Greg Hudson [Thu, 25 Nov 2010 20:28:30 +0000 (20:28 +0000)]
Fix Windows build

Repair the Windows build.  Tested with the prepare-on-Unix method.
Some specific changes include:

* Removed the IPC finalizer (no longer used after r20787) from
  ccapi/lib/ccapi_ipc.c, as it was creating a difficult dependency
  chain for the pingtest build in ccapi/test.  Also updated pingtest
  to use the k5_ipc_stream interfaces since cci_stream is gone.

* Reverted the apparently non-functional r20277.

* klist -V prints just "Kerberos for Windows", since it has no access
  to PACKAGE_NAME and PACKAGE_VERSION from autoconf.  This should be
  addressed correctly.

* krb5, telnet, gssftp, and NIM are removed from the build.

* Some files had CRLFs; these were replaced with LFs and the
  svn:eol-style property set on the files.  Otherwise the CRLFs became
  CRCRLFs after the zip transfer.

* Windows does not have opendir/readdir, so added Windows code to
  prof_parse.c for includedir.  Probable fodder for a libkrb5support
  portability shim.

ticket: 6826
target_version: 1.9
tags: pullup

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

14 years agoUpdate krb5_gic_opt_private and related code to reflect the change of
Tom Yu [Tue, 23 Nov 2010 23:51:50 +0000 (23:51 +0000)]
Update krb5_gic_opt_private and related code to reflect the change of
krb5_expire_callback_func from a function typedef to a function
pointer typedef.  This was causing segfaults.

ticket: 6825

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

14 years agoupdate acknowledgments
Tom Yu [Tue, 23 Nov 2010 23:51:45 +0000 (23:51 +0000)]
update acknowledgments

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

14 years agoSet svn:eol-style on some Windows files and remove the CRs from their
Greg Hudson [Tue, 23 Nov 2010 18:50:12 +0000 (18:50 +0000)]
Set svn:eol-style on some Windows files and remove the CRs from their
repository representations.

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

14 years agoAdd missing KRB5_CALLCONV in callback declaration
Greg Hudson [Tue, 23 Nov 2010 04:50:40 +0000 (04:50 +0000)]
Add missing KRB5_CALLCONV in callback declaration

krb5_get_init_creds_opt_set_expire_callback was correctly tagged with
KRB5_CALLCONV but the corresponding callback type was not.  Add that
in.

ticket: 6825
target_version: 1.9
tags: pullup

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

14 years agoExport krb5_tkt_creds_get
Greg Hudson [Tue, 23 Nov 2010 04:41:08 +0000 (04:41 +0000)]
Export krb5_tkt_creds_get

krb5_tkt_creds_get was overlooked in the export list; add it.

ticket: 6824
target_version: 1.9
tags: pullup

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

14 years agoCorrect typo in r24526
Greg Hudson [Mon, 22 Nov 2010 03:58:15 +0000 (03:58 +0000)]
Correct typo in r24526

ticket: 6823

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

14 years agogetdate.y: declare yyparse
Sam Hartman [Mon, 22 Nov 2010 03:33:22 +0000 (03:33 +0000)]
getdate.y: declare yyparse

At least on lucid, byacc doesn't declare yyparse, which creates
problems because lucid treats calls to unprototyped functions as
errors.

ticket: 6823
target_version: 1.9
tags: pullup

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

14 years agoSuppress building camellia-gen in "make check" for now (it has a build
Greg Hudson [Sun, 21 Nov 2010 17:35:49 +0000 (17:35 +0000)]
Suppress building camellia-gen in "make check" for now (it has a build
issue on Solaris which will go away when Camellia support becomes
unconditional).

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

14 years agoImplement Camellia-CTS-CMAC instead of Camellia-CCM
Greg Hudson [Sat, 20 Nov 2010 00:31:46 +0000 (00:31 +0000)]
Implement Camellia-CTS-CMAC instead of Camellia-CCM

Replace the Camellia-CCM enctypes with Camellia-CTS-CMAC.  Still not
compiled in by default since we don't have enctype assignments yet.

ticket: 6822
target_verion: 1.9
tags: pullup

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

14 years agoRead KDC profile settings in kpropd
Greg Hudson [Tue, 16 Nov 2010 02:54:26 +0000 (02:54 +0000)]
Read KDC profile settings in kpropd

kpropd can modify the KDB with ulog_replay(), so it should read the
KDC profile settings in case the KDB configuration is in there.

ticket: 6820
target_version: 1.9
tags: pullup

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

14 years agoHandle referral realm in kprop client principal
Greg Hudson [Tue, 16 Nov 2010 02:30:16 +0000 (02:30 +0000)]
Handle referral realm in kprop client principal

kprop uses krb5_sname_to_principal() to determine its client
principal.  If the local hostname cannot be mapped to a realm based on
the profile's domain_realm section, krb5_sname_to_principal() will (as
of 1.6) return a principal with the referral realm (""), which does
not work in a client principal.  Handle this by substituting the
default realm.

ticket: 6819
target_version: 1.9
tags: pullup

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

14 years agoFix a typo in install.texinfo
Greg Hudson [Tue, 16 Nov 2010 00:12:52 +0000 (00:12 +0000)]
Fix a typo in install.texinfo

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

14 years agoThe iprop dejagnu test had some deceptive commented-out debugging code
Greg Hudson [Tue, 16 Nov 2010 00:12:38 +0000 (00:12 +0000)]
The iprop dejagnu test had some deceptive commented-out debugging code
(it would set up the user to run kpropd in the master environment
instead of the slave environment).  Make it more useful.

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

14 years agoCorrect a minor error in the k5test documentation
Greg Hudson [Mon, 15 Nov 2010 15:24:37 +0000 (15:24 +0000)]
Correct a minor error in the k5test documentation

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

14 years agoInclude <openssl/des.h> in the OpenSSL back end's weak_key.c for the
Greg Hudson [Tue, 9 Nov 2010 23:24:31 +0000 (23:24 +0000)]
Include <openssl/des.h> in the OpenSSL back end's weak_key.c for the
DES_is_weak_key prototype.

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

14 years agoAfter a failed kdb5_util load, make a subsequent load operation work
Greg Hudson [Sat, 6 Nov 2010 00:02:13 +0000 (00:02 +0000)]
After a failed kdb5_util load, make a subsequent load operation work
by removing the remnant temporary files after obtaining a lock.  To
make this safe, the private contract for temporary DB creation and
promotion had to be altered, along with many of the DB2 internal
helper functions.

ticket: 6814

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

14 years agoFurther kdb_db2 code cleanup: make gen_dbsuffix return a
Greg Hudson [Thu, 4 Nov 2010 21:27:03 +0000 (21:27 +0000)]
Further kdb_db2 code cleanup: make gen_dbsuffix return a
krb5_error_code to simplify error handling in callers, and discard the
db_lf_time field which was set but never used.

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

14 years agoRemove a stray spawn_shell in the iprop dejagnu tests
Greg Hudson [Thu, 4 Nov 2010 17:20:30 +0000 (17:20 +0000)]
Remove a stray spawn_shell in the iprop dejagnu tests

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

14 years agoSimplify kdb_db2's open_db() a little further, avoiding a suspicious
Greg Hudson [Wed, 3 Nov 2010 17:32:11 +0000 (17:32 +0000)]
Simplify kdb_db2's open_db() a little further, avoiding a suspicious
switch fallthrough.

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

14 years agoAvoid running off the end of the spares array in db2's page_to_oaddr()
Greg Hudson [Wed, 3 Nov 2010 16:43:49 +0000 (16:43 +0000)]
Avoid running off the end of the spares array in db2's page_to_oaddr()
in unrealistically large databases.

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

14 years agoUse size_t to hold set counts in net-server.c
Greg Hudson [Wed, 3 Nov 2010 16:42:05 +0000 (16:42 +0000)]
Use size_t to hold set counts in net-server.c

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

14 years agoClean up the DB2 KDB module code a bit, making it more conformant with
Greg Hudson [Tue, 2 Nov 2010 17:21:28 +0000 (17:21 +0000)]
Clean up the DB2 KDB module code a bit, making it more conformant with
current coding practices.  Mostly namespace changes, but also simplify
krb5_db2_destroy().

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

14 years agokrb5_get_error_message cannot return NULL, and returns "Success" on
Greg Hudson [Mon, 1 Nov 2010 15:19:00 +0000 (15:19 +0000)]
krb5_get_error_message cannot return NULL, and returns "Success" on
error code 0.  Simplify some overly paranoid code accordingly.

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

14 years agoDon't fail out from krb5_get_credentials() if we can't store a ticket
Greg Hudson [Wed, 27 Oct 2010 17:05:05 +0000 (17:05 +0000)]
Don't fail out from krb5_get_credentials() if we can't store a ticket
into the ccache.

ticket: 6812

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

14 years agoFILE keytabs have been able to handle write operations since krb5 1.7,
Greg Hudson [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

14 years agoMark Camellia-CCM code as experimental
Greg Hudson [Tue, 26 Oct 2010 17:34:41 +0000 (17:34 +0000)]
Mark Camellia-CCM code as experimental

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

ticket: 6811
target_version: 1.9
tags: pullup

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

14 years agoAdd a kg_encrypt_inplace() utility function to the krb5 GSS mech, and
Greg Hudson [Tue, 26 Oct 2010 17:18:22 +0000 (17:18 +0000)]
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().

ticket: 6770

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

14 years agoMake k5-buf.h comments consistent with coding style
Greg Hudson [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

14 years agoSet *conf_state on successful return from
Greg Hudson [Tue, 26 Oct 2010 14:17:38 +0000 (14:17 +0000)]
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.

ticket: 6809
target_version: 1.9
tags: pullup

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

14 years agoWhen we create a temporary memory ccache for use within a
Greg Hudson [Mon, 25 Oct 2010 21:55:54 +0000 (21:55 +0000)]
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.

ticket: 6787
target_version: 1.9
tags: pullup

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

14 years agoUse safer output parameter handling in
Greg Hudson [Mon, 25 Oct 2010 20:17:54 +0000 (20:17 +0000)]
Use safer output parameter handling in
krb5_gss_acquire_cred_impersonate_name and its subsidiary helpers.

ticket: 6796
target_version: 1.9
tags: pullup

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

14 years agoIn acquire_init_cred in the GSS krb5 mech, don't intern cred->name,
Greg Hudson [Mon, 25 Oct 2010 19:37:03 +0000 (19:37 +0000)]
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.

ticket: 6793
target_version: 1.9
tags: pullup

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

14 years agoWhitespace
Greg Hudson [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

14 years agoWhitespace
Greg Hudson [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

14 years agoFix adjustment of counter
Ken 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

14 years agoDeclare xdr_purgekeys_arg
Ken 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

14 years agoDeclare kadmin_purgekeys
Ken 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

14 years agoDeclare krb5_set_error_message_fl
Ken 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

14 years agoInclude k5-int.h for function declarations
Ken 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

14 years agoIn profile-reading performance test, print microseconds not milliseconds
Ken 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

14 years agoTry harder to retain the "brand" string in the shared library
Ken 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

14 years agoBetter libk5crypto NSS fork safety
Greg Hudson [Sat, 23 Oct 2010 00:38:17 +0000 (00:38 +0000)]
Better libk5crypto NSS fork safety

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.

ticket: 6810
target_version: 1.9
tags: pullup

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

14 years agoMake it possible to override CRYPTO_IMPL_CFLAGS and CRYPTO_IMPL_LIBS at
Greg Hudson [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

14 years agoconfigure.in: don't force use of cache
Sam Hartman [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

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