Sam Hartman [Tue, 24 Nov 2009 01:14:07 +0000 (01:14 +0000)]
Implement upgrade to FAST when the KDC supports FAST. Implement fall
back to no negotiation when the KDC doesn't appear to support it.
In order to do this control flow for get_init_creds is changed significantly.
A comment in the diff explains the logic.
* Move preauth_request_init into loop
* move preauth gic option handling into loop
* New function krb5int_upgrade_to_fast_p
* New fast state flag: KRB5INT_FAST_ARMOR_AVAIL
Sam Hartman [Tue, 24 Nov 2009 01:13:45 +0000 (01:13 +0000)]
Implement KDC side of protected negotiation:
* Move return_enc_padata so reply key is available
* Include checksum of reply if requested
* export encode_krb5_checksum so we can call it from the KDC
Sam Hartman [Tue, 24 Nov 2009 00:53:36 +0000 (00:53 +0000)]
KDC MUST NOT accept ap-request armor in FAST TGS
Per the latest preauth framework spec, the working group has decided
to forbid ap-request armor in the TGS request because of security
problems with that armor type.
This commit was tested against an implementation of FAST TGS client to
confirm that if explicit armor is sent, the request is rejected.
Sam Hartman [Tue, 24 Nov 2009 00:53:32 +0000 (00:53 +0000)]
Implement fast negotiation per discussion with Larry
This implementation is sloppy in that it always includes the padata
requesting reply checksum even though that will interact badly with some of our older KDCs.
Sam Hartman [Mon, 23 Nov 2009 23:10:39 +0000 (23:10 +0000)]
Integrate Apple APIs for storing configuration parameters in a ccache
* krb5_cc_get_config: get a config parameter from a ccache
* krb5_cc_set_config: set a configuration parameter in a ccache
* krb5_is_config_principal: should this principal be skipped during ccache iteration
* klist: skip config principals
Greg Hudson [Mon, 23 Nov 2009 20:52:16 +0000 (20:52 +0000)]
Simplify depfix.pl by assuming that all files outside of the source
and build directory (after substitutions) are external headers which
should not be tracked.
Greg Hudson [Sun, 22 Nov 2009 18:20:36 +0000 (18:20 +0000)]
Update the build system documentation:
* The test suite no longer requires root.
* appl no longer contains what it used to contain.
* Mention --disable-rpath as an alternative for make check.
Greg Hudson [Sun, 22 Nov 2009 18:13:29 +0000 (18:13 +0000)]
Consolidate Makefile variables now that we have only a single global
configure script:
$(SRCTOP) --> $(top_srcdir)
$(srcdir)/$(thisconfigdir) --> $(top_srcdir)
$(thisconfigdir) --> $(BUILDTOP)
$(myfulldir) --> $(mydir)
Greg Hudson [Sun, 22 Nov 2009 14:58:54 +0000 (14:58 +0000)]
Unbundle applications into separate repository
Remove libpty, gssftp, telnet, and the bsd applications from the
source tree, build system, and tests.
Docs still need to be updated to remove mentions of the applications.
The build system should be simplified now that we're down to one
configure script and don't need some of the functionality currently in
aclocal.m4.
Ezra Peisach [Fri, 20 Nov 2009 20:55:34 +0000 (20:55 +0000)]
Correct argument to kadm5_get_principal is a pointer to a struct - not
a pointer to a pointer.... Does not really matter as the field is not used -
this test program expects a failer.
Clean up memory leaks by freeing principal and releasing context.
Ezra Peisach [Fri, 20 Nov 2009 03:42:40 +0000 (03:42 +0000)]
The size of kadm5_server_handle_rec differs between the client and
server code. Valgrind picked up on access past end of allocated
structure. Include proper internal header in client/server test.
Greg Hudson [Sat, 14 Nov 2009 18:56:43 +0000 (18:56 +0000)]
Reindent include directory, reformatting prototypes as necessary.
Exclude include/gssrpc due to its Sun origin and k5-platform.h due to
macros too hairy for emacs c-mode to handle.
Greg Hudson [Sat, 14 Nov 2009 04:46:30 +0000 (04:46 +0000)]
Constrained delegation without PAC support
Merge Luke's users/lhoward/s4u2proxy branch to trunk. Implements a
Heimdal-compatible mechanism for allowing constrained delegation
without back-end support for PACs. Back-end support exists in LDAP
only (via a new krbAllowedToDelegateTo attribute), not DB2.
Greg Hudson [Tue, 10 Nov 2009 19:59:39 +0000 (19:59 +0000)]
In lib/krb5/keytab, ensure that function definition headers have
function names at the beginning of lines, and avoid putting open
parentheses at the beginning of lines in function prototypes.
Ken Raeburn [Mon, 9 Nov 2009 06:13:34 +0000 (06:13 +0000)]
quoting bug causes solaris pre-10 thread handling bugs
Quoting problems in pattern matching on the OS name cause Solaris
versions up through 9 to not be properly recognized in the
thread-system configuration setup. This causes our libraries to make
the erroneous assumption that valid thread support routines are
available on all Solaris systems, rather than just assuming it for
Solaris 10 and later.
The result is assertion failures like this one reported by Meraj
Mohammed and others:
Assertion failed: k5int_i->did_run != 0, file krb5_libinit.c, line 63
Thanks to Tom Shaw for noticing the cause of the problem.
The bug may be present in the 1.6.x series as well.
Ken Raeburn [Fri, 6 Nov 2009 20:17:00 +0000 (20:17 +0000)]
Change INIT_ONCE compile-time flag into a run-time option. Delete
DIRECT support; always create threads. Allow setting of test interval
and number of threads via run-time options.
Ken Raeburn [Fri, 6 Nov 2009 20:16:57 +0000 (20:16 +0000)]
Don't start by attempting to unlink replay caches by guessing
pathnames specific to my uid on MIT Athena systems. Instead, create a
replay cache object and then destroy it through the library. Tweak
the rcache-init-error messages to be specific to the instance that
failed.
Greg Hudson [Wed, 4 Nov 2009 20:16:13 +0000 (20:16 +0000)]
Remove cast-qual from the gcc warnings set; it is too common for us to
have to explicitly override const in order to implement strchr-like
functions or place pointers into read-only krb5_data objects.
Greg Hudson [Wed, 4 Nov 2009 16:31:41 +0000 (16:31 +0000)]
Restore the krb5 1.6 behavior of not retrying AS requests after
PREAUTH_FAILED errors. Among other things, this change causes
krb5_get_init_creds_opt_set_pa to act (mostly) as a constraint rather
than simply as an optimistic set of preauth types, which is the
behavior apps had been seeing prior to 1.7.
Tom Yu [Wed, 4 Nov 2009 00:21:35 +0000 (00:21 +0000)]
Correct regexps for matching emacs and cc-mode versions. In reindent
targets, chdir to SRCTOP to avoid excessive references to $(SRCTOP) in
the find script. Define new variables to avoid errors when creating
exception lists for find scripts.
Use a python script instead of elisp to mark files.
Tom Yu [Tue, 3 Nov 2009 03:14:41 +0000 (03:14 +0000)]
Monkey patch for the cc-mode that comes with emacs-23.x; that version
of cc-mode has a bug that causes incorrect indentation of case labels
containing character constants. Already fixed upstream in unreleased
cc-mode sources.
Greg Hudson [Sun, 1 Nov 2009 21:51:26 +0000 (21:51 +0000)]
Un-constify struct errinfo's msg field because it is the owner of that
memory (even though the memory is intended to be immutable during its
lifetime).
Greg Hudson [Sun, 1 Nov 2009 14:13:32 +0000 (14:13 +0000)]
Memory leak fix: in obtain_sam_padata, after claiming the contents of
the scratch data object, free the outer structure before nulling the
pointer to it.
Greg Hudson [Sun, 1 Nov 2009 02:47:58 +0000 (02:47 +0000)]
Move the implementations of four deprecated crypto functions to
old_api_glue.c. Move the prototypes of seven deprecated crypto
functions to old_api_glue.c instead of k5-int.h, since we don't use
those functions internally.
Greg Hudson [Sun, 1 Nov 2009 02:46:36 +0000 (02:46 +0000)]
Stop using deprecated krb5_encrypt_data in preauth code. Use
krb5_encrypt_helper instead. (encrypt_helper takes a key usage
instead of an ivec, but that's okay since the invocations were using
null ivecs anyway.)