krb5.git
12 years agoCreate tag krb5-1-10-alpha1 krb5-1.10-alpha1
Tom Yu [Fri, 21 Oct 2011 18:02:42 +0000 (18:02 +0000)]
Create tag krb5-1-10-alpha1

git-svn-id: svn://anonsvn.mit.edu/krb5/tags/krb5-1-10-alpha1@25401 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoREADME and patchlevel.h for krb5-1.10-alpha1
Tom Yu [Fri, 21 Oct 2011 18:02:10 +0000 (18:02 +0000)]
README and patchlevel.h for krb5-1.10-alpha1

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25400 dc483132-0cff-0310-8789-dd5450dbe970

12 years agopull up r25395 from trunk
Tom Yu [Fri, 21 Oct 2011 17:58:47 +0000 (17:58 +0000)]
pull up r25395 from trunk

 ------------------------------------------------------------------------
 r25395 | tlyu | 2011-10-21 13:35:49 -0400 (Fri, 21 Oct 2011) | 10 lines

 ticket: 6989
 subject: fix tar invocation in mkrel
 target_version: 1.10
 tags: pullup

 Fix the tar invocation in mkrel so that it defaults to using "tar" as
 the tar program rather than "gtar".

 This should probably be pulled up to at least 1.9 and 1.8 as well.

ticket: 6989
version_fixed: 1.10
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25399 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoFix patchlevel.h for krb5-1.10 branch
Tom Yu [Thu, 20 Oct 2011 22:19:39 +0000 (22:19 +0000)]
Fix patchlevel.h for krb5-1.10 branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25392 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoUpdate README for 1.10 branch
Tom Yu [Thu, 20 Oct 2011 22:13:09 +0000 (22:13 +0000)]
Update README for 1.10 branch

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25391 dc483132-0cff-0310-8789-dd5450dbe970

12 years agopull up r25385 from trunk
Tom Yu [Thu, 20 Oct 2011 19:27:46 +0000 (19:27 +0000)]
pull up r25385 from trunk

 ------------------------------------------------------------------------
 r25385 | ghudson | 2011-10-20 11:16:03 -0400 (Thu, 20 Oct 2011) | 9 lines

 ticket: 6988
 subject: Fix handling of null edata method in KDC preauth
 target_version: 1.10
 tags: pullup

 Correctly include an empty padata value if a KDC preauth system has no
 get_edata method.  This bug prevented the KDC from indicating FAST
 support in preauth-required errors.

ticket: 6988
version_fixed: 1.10
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25389 dc483132-0cff-0310-8789-dd5450dbe970

12 years agopull up r25384 from trunk
Tom Yu [Thu, 20 Oct 2011 19:27:43 +0000 (19:27 +0000)]
pull up r25384 from trunk

 ------------------------------------------------------------------------
 r25384 | ghudson | 2011-10-19 23:45:12 -0400 (Wed, 19 Oct 2011) | 12 lines

 ticket: 6987
 subject: Fix krb5_cc_set_config
 target_version: 1.10
 tags: pullup

 krb5_cc_set_config has been non-functional since r24753 on cache types
 which don't support removal of credential entries.  Fix it by only
 calling krb5_cc_remove_cred if data is NULL, since krb5_cc_store_cred
 will do it anyway in the positive case.

 Also fix an old memory leak in an uncommon error case.

ticket: 6987
version_fixed: 1.10
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25388 dc483132-0cff-0310-8789-dd5450dbe970

12 years agopull up r25368 from trunk
Tom Yu [Thu, 20 Oct 2011 19:27:38 +0000 (19:27 +0000)]
pull up r25368 from trunk

 ------------------------------------------------------------------------
 r25368 | tlyu | 2011-10-18 14:51:35 -0400 (Tue, 18 Oct 2011) | 8 lines

 ticket: 6981
 subject: SA-2011-006 KDC denial of service [CVE-2011-1527 CVE-2011-1528 CVE-2011-1529]
 target_version: 1.10
 tags: pullup

 Fix null pointer dereference and assertion failure conditions that
 could cause a denial of service.

ticket: 6981
version_fixed: 1.10
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25387 dc483132-0cff-0310-8789-dd5450dbe970

12 years agopull up r25367 from trunk
Tom Yu [Thu, 20 Oct 2011 19:27:32 +0000 (19:27 +0000)]
pull up r25367 from trunk

 ------------------------------------------------------------------------
 r25367 | ghudson | 2011-10-18 12:32:28 -0400 (Tue, 18 Oct 2011) | 12 lines

 ticket: 6980
 subject: Ensure termination in Windows vsnprintf wrapper
 target_version: 1.10
 tags: pullup

 The Windows _vsnprintf does not terminate its output buffer in the
 overflow case.  Make sure we do that in the wrapper.  Reported by
 Chris Hecker.

 (Not an issue for KfW 3.2 since we weren't using snprintf in 1.6.x
 except in Unix-specific code.)

ticket: 6980
version_fixed: 1.10
status: resolved

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25386 dc483132-0cff-0310-8789-dd5450dbe970

12 years agobranch for krb5-1.10 release
Tom Yu [Mon, 17 Oct 2011 22:55:44 +0000 (22:55 +0000)]
branch for krb5-1.10 release

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-10@25366 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoBump release numbers in definitions.texinfo
Tom Yu [Mon, 17 Oct 2011 22:54:12 +0000 (22:54 +0000)]
Bump release numbers in definitions.texinfo

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

12 years agoNoted that kadmind should be restarted if its acl file has been changed
Zhanna Tsitkov [Mon, 17 Oct 2011 20:17:08 +0000 (20:17 +0000)]
Noted that kadmind should be restarted if its acl file has been changed

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

12 years agoDelete Network Identity Manager
Tom Yu [Mon, 17 Oct 2011 19:34:08 +0000 (19:34 +0000)]
Delete Network Identity Manager

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

12 years agoMake reindent
Tom Yu [Mon, 17 Oct 2011 19:11:01 +0000 (19:11 +0000)]
Make reindent

Also fix pkinit_crypto_nss.c struct initializers and add parens to a
ternary operator in do_as_req.c for better indentation.

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

12 years agoExclude util/wshelper from reindent
Tom Yu [Mon, 17 Oct 2011 19:10:52 +0000 (19:10 +0000)]
Exclude util/wshelper from reindent

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

12 years agoAdd AC_LANG_SOURCE to PKINIT NSS version check
Greg Hudson [Mon, 17 Oct 2011 17:15:31 +0000 (17:15 +0000)]
Add AC_LANG_SOURCE to PKINIT NSS version check

The configure.in code for the PKINIT NSS back end version check was
copied from the k5crypto NSS back end version check, but from before
r25181 which added AC_LANG_SOURCE wrappers.

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

12 years agoStyle police
Greg Hudson [Mon, 17 Oct 2011 04:05:56 +0000 (04:05 +0000)]
Style police

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

12 years agogssalloc-related fixes to naming_exts.c
Sam Hartman [Mon, 17 Oct 2011 00:45:30 +0000 (00:45 +0000)]
gssalloc-related fixes to naming_exts.c

renamed kg_data_list_to_buffer_set_nocopy to data_list_buffer_set
(since nocopy is no longer guaranteed).
removed extra indirection to input krb5_data list.
ensured input krb5_data list is always completely freed.
no longer returns EINVAL when output buffer set is NULL.
fixed krb5_gss_get_name_attribute to use data_to_gss.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25358 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoRFC 4120 says that we should not canonicalize using DNS. We cannot get
Sam Hartman [Mon, 17 Oct 2011 00:45:23 +0000 (00:45 +0000)]
RFC 4120 says that we should not canonicalize using DNS. We cannot get
that far today, but there's no reason we should fail to use a
perfectly good principal name just because DNS is failing. For some
services there isn't even a requirement they be in DNS. With
AI_ADDRCONFIG there's no reason that Kerberos canonicalization should
fail simply because a v6 address is not present, for example.  So, if
getaddrinfo fails in krb5_sname_to_principal simply use the input
hostname uncanonicalized.

sn2princ: On getaddrinfo failure use the input

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

12 years agoAllow password changes over NATs
Greg Hudson [Sat, 15 Oct 2011 16:56:30 +0000 (16:56 +0000)]
Allow password changes over NATs

In the kpasswd server code, don't set a remote address in the auth
context before calling krb5_rd_priv, since the kpasswd protocol is
well-protected against reflection attacks.  This allows password
changes to work in cases where a NAT has changed the client IP address
as it is seen by the server.

ticket: 6979

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

12 years agoAllow rd_priv/rd_safe without remote address
Greg Hudson [Sat, 15 Oct 2011 16:56:26 +0000 (16:56 +0000)]
Allow rd_priv/rd_safe without remote address

Allow krb5_rd_priv and krb5_rd_safe to work when there is no remote
address set in the auth context, unless the KRB5_AUTH_CONTEXT_DO_TIMES
flag is set (in which case we need the remote address for the replay
cache name).  Note that failing to set the remote address can create a
vulnerability to reflection attacks in some protocols, although it is
fairly easy to defend against--either use sequence numbers, or make
sure that requests don't look like replies, or both.

ticket: 6978

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

12 years agoUpdate mit-krb5.pot
Greg Hudson [Sat, 15 Oct 2011 16:31:00 +0000 (16:31 +0000)]
Update mit-krb5.pot

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

12 years agoInstall krb5/preauth_plugin.h
Greg Hudson [Sat, 15 Oct 2011 16:29:28 +0000 (16:29 +0000)]
Install krb5/preauth_plugin.h

The clpreauth and kdcpreauth pluggable interfaces are public as of
krb5 1.10.  Install the header so that preauth modules can be built
outside of the krb5 source tree.

ticket: 6977

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

12 years agoRename PAC type constants to avoid conflicts
Greg Hudson [Sat, 15 Oct 2011 16:26:27 +0000 (16:26 +0000)]
Rename PAC type constants to avoid conflicts

Since the PAC type constants are now exposed in krb5.h, give them a
KRB5_ prefix so they don't conflict with similar PAC type constants
in other packages, like Samba.

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

12 years agoHide gak_fct interface and arguments in clpreauth
Greg Hudson [Sat, 15 Oct 2011 16:06:03 +0000 (16:06 +0000)]
Hide gak_fct interface and arguments in clpreauth

Remove the gak_fct, gak_data, salt, s2kparams, and as_key arguments
of krb5_clpreauth_process_fn and krb5_clpreauth_tryagain_fn.  To
replace them, add two callbacks: one which gets the AS key using the
previously selected etype-info2 information, and a second which lets
the module replace the AS key with one it has computed.

This changes limits module flexibility in a few ways.  Modules cannot
check whether the AS key was already obtained before asking for it,
and they cannot use the etype-info2 salt and s2kparams for purposes
other than getting the password-based AS key.  It is believed that
of existing preauth mechanisms, only SAM-2 preauth needs more
flexibility than the new interfaces provide, and as an internal legacy
mechanism it can cheat.  Future mechanisms should be okay since the
current IETF philosophy is that etype-info2 information should not be
used for other purposes.

ticket: 6976

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

12 years agoDrop retransmits while processing requests
Greg Hudson [Sat, 15 Oct 2011 15:35:46 +0000 (15:35 +0000)]
Drop retransmits while processing requests

Supporting asynchronous preauth modules means that the KDC can receive
a retransmitted request before it finishes processing the initial
request.  Ignore those retransmits instead of processing them.

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

12 years agoUntabify kdc_preauth_encts.c
Greg Hudson [Sat, 15 Oct 2011 15:08:02 +0000 (15:08 +0000)]
Untabify kdc_preauth_encts.c

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

12 years agoMake kdcpreauth edata method respond via callback
Greg Hudson [Sat, 15 Oct 2011 15:06:37 +0000 (15:06 +0000)]
Make kdcpreauth edata method respond via callback

From npmccallum@redhat.com with changes.

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

12 years agoMake get_preauth_hint_list respond via callback
Greg Hudson [Sat, 15 Oct 2011 15:03:17 +0000 (15:03 +0000)]
Make get_preauth_hint_list respond via callback

From npmccallum@redhat.com with changes.

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

12 years agoRemove enc-timestamp code from kdc_preauth.c
Greg Hudson [Sat, 15 Oct 2011 15:03:10 +0000 (15:03 +0000)]
Remove enc-timestamp code from kdc_preauth.c

This code should have been removed in r25319 but was not.

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

12 years agoExclude more stuff from make reindent
Tom Yu [Fri, 14 Oct 2011 23:14:53 +0000 (23:14 +0000)]
Exclude more stuff from make reindent

Apply exclusions to "make reindent" as well, to fully exclude some
files from whitespace cleanups.  Add fnmatch.c to exclusions.

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

12 years agomake depend
Tom Yu [Fri, 14 Oct 2011 18:19:36 +0000 (18:19 +0000)]
make depend

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

12 years agoUntabify a recent gssapi_alloc.h change
Greg Hudson [Fri, 14 Oct 2011 15:14:57 +0000 (15:14 +0000)]
Untabify a recent gssapi_alloc.h change

Also mark the file as using the krb5 C style.

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

12 years agoFix gssapi_strdup
Sam Hartman [Fri, 14 Oct 2011 15:07:01 +0000 (15:07 +0000)]
Fix gssapi_strdup

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

12 years agogssalloc memory management for gss_buffer_set
Sam Hartman [Fri, 14 Oct 2011 14:46:57 +0000 (14:46 +0000)]
gssalloc memory management for gss_buffer_set

compiles, but untested

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25341 dc483132-0cff-0310-8789-dd5450dbe970

12 years agobuild profile dll (xpprof32/64.dll) on windows
Sam Hartman [Fri, 14 Oct 2011 14:44:35 +0000 (14:44 +0000)]
build profile dll (xpprof32/64.dll) on windows

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25340 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoFurther attempt at removing K4 specific code from the leash executable
Sam Hartman [Fri, 14 Oct 2011 14:42:37 +0000 (14:42 +0000)]
Further attempt at removing K4 specific code from the leash executable
Updates to leash Makefile.in to make it link on Windows 64

Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
leash link fixes: fix mfc library and fix path to wshelper

MFC100D.lib for mscv2010; util\wshelper instead of windows\wshelper

Add ver.rc for leash

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25339 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoFixed some warnings and Windows 64 portability issues in the leash executable
Sam Hartman [Fri, 14 Oct 2011 14:40:36 +0000 (14:40 +0000)]
Fixed some warnings and Windows 64 portability issues in the leash executable

Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25338 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoFixed some warnings in libwin
Sam Hartman [Fri, 14 Oct 2011 14:40:32 +0000 (14:40 +0000)]
Fixed some warnings in libwin

Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25337 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoUpdated resource file dependencies for leashdll
Sam Hartman [Fri, 14 Oct 2011 14:40:28 +0000 (14:40 +0000)]
Updated resource file dependencies for leashdll

Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25336 dc483132-0cff-0310-8789-dd5450dbe970

12 years agore-remove windows/gss from windows build
Sam Hartman [Fri, 14 Oct 2011 14:40:24 +0000 (14:40 +0000)]
re-remove windows/gss from windows build

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25335 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoFix windows fork detection
Sam Hartman [Fri, 14 Oct 2011 14:40:20 +0000 (14:40 +0000)]
Fix windows fork detection

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25334 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoAdd "-dce" commandline option to gss-client.c to set GSS_C_DCE_STYLE flag
Sam Hartman [Fri, 14 Oct 2011 14:40:17 +0000 (14:40 +0000)]
Add "-dce" commandline option to gss-client.c to set GSS_C_DCE_STYLE flag

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25333 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoUse gssalloc memory management where appropriate
Sam Hartman [Fri, 14 Oct 2011 14:40:10 +0000 (14:40 +0000)]
Use gssalloc memory management where appropriate

gss_buffer_t may be freed in a different module from where they
are allocated so it is not safe to use strdup/malloc/calloc/free.
similarly, gss_OID_set need to use gssalloc functions.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25332 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoUtility functions to move allocations from k5buf/krb5_data to gss_buffer_t
Sam Hartman [Fri, 14 Oct 2011 14:40:05 +0000 (14:40 +0000)]
Utility functions to move allocations from k5buf/krb5_data to gss_buffer_t

On Unix, these simply move the buffer pointer, but on windows they need to
reallocated with gssalloc_malloc and coied since the gss_buffer_t may need
to be freed in a separate module with potentially mismatched c runtime.

Also fix a mismatched parameter warning in generic_gss_copy_oid_set().

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25331 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoAdd new header gssapi_alloc.h
Sam Hartman [Fri, 14 Oct 2011 14:39:01 +0000 (14:39 +0000)]
Add new header gssapi_alloc.h

Contains allocator methods for use with mechanisms and mechglues for
allocations that must be made in one module but freed in another.  On
windows, an allocation made in one module cannot safely be freed in
another using the usual c runtime malloc/free; runtime dll mismatch
will cause heap corruption in that case.  But it is safe to instead
directly use HeapAlloc()/HeapFree() specifying the default process
heap.  For now, this header is not public. If it becomes public
strncpy will need to be used instead of strlcpy.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25330 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoSimplify gss_indicate_mechs() by using generic_gss_copy_oid_set
Sam Hartman [Fri, 14 Oct 2011 14:37:14 +0000 (14:37 +0000)]
Simplify gss_indicate_mechs() by using generic_gss_copy_oid_set

...instead of hand-duplicating all the logic therein.  Also makes
the switch to using gssalloc functions with oid_sets easier.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25329 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoRemoved unused macros
Zhanna Tsitkov [Fri, 14 Oct 2011 14:25:23 +0000 (14:25 +0000)]
Removed unused macros

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

12 years agoAdd PKINIT NSS support
Greg Hudson [Thu, 13 Oct 2011 16:07:23 +0000 (16:07 +0000)]
Add PKINIT NSS support

Add an implementation of PKINIT using NSS instead of OpenSSL, from
nalin@redhat.com.

ticket: 6975

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

12 years agoFix the doxygen comments for krb5_pac_sign
Zhanna Tsitkov [Wed, 12 Oct 2011 17:57:33 +0000 (17:57 +0000)]
Fix the doxygen comments for krb5_pac_sign

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

12 years agoMake krb5_pac_sign public
Greg Hudson [Wed, 12 Oct 2011 16:34:07 +0000 (16:34 +0000)]
Make krb5_pac_sign public

krb5int_pac_sign was created as a private API because it is only
needed by the KDC.  But it is actually used by DAL or authdata plugin
modules, not the core KDC code.  Since plugin modules should not need
to consume internal libkrb5 functions, rename krb5int_pac_sign to
krb5_pac_sign and make it public.

ticket: 6974

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

12 years agoDocumentation pass over preauth_plugin.h
Greg Hudson [Wed, 12 Oct 2011 15:05:39 +0000 (15:05 +0000)]
Documentation pass over preauth_plugin.h

No functional changes.

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

12 years agoFix a memory leak in make_gss_checksum
Greg Hudson [Fri, 7 Oct 2011 22:17:06 +0000 (22:17 +0000)]
Fix a memory leak in make_gss_checksum

From greg.mcclement@sap.com.

ticket: 6972
target_version: 1.9.2
tags: pullup

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

12 years agoRemoved references to non-existing krb5_default_local_realm(3) and some source-code...
Zhanna Tsitkov [Fri, 7 Oct 2011 21:19:41 +0000 (21:19 +0000)]
Removed references to non-existing krb5_default_local_realm(3) and some source-code-defined macros from the administration programs documentation.
Also, minor cleanup & corrections.

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

12 years agoMinor updates and correction of the RST documents
Zhanna Tsitkov [Fri, 7 Oct 2011 16:33:25 +0000 (16:33 +0000)]
Minor updates and correction of the RST documents

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

12 years agoMinor cleanups to encrypted challenge
Greg Hudson [Fri, 7 Oct 2011 14:44:15 +0000 (14:44 +0000)]
Minor cleanups to encrypted challenge

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

12 years agoUse built-in modules for encrypted timestamp
Greg Hudson [Fri, 7 Oct 2011 14:26:25 +0000 (14:26 +0000)]
Use built-in modules for encrypted timestamp

Break out the encrypted timestamp code from kdc_preauth.c and
preauth2.c into built-in modules, allowing admins to disable it and
reducing the size of the framework code.

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

12 years agoAdd get_string, free_string kdcpreauth callbacks
Greg Hudson [Thu, 6 Oct 2011 20:08:29 +0000 (20:08 +0000)]
Add get_string, free_string kdcpreauth callbacks

String attributes should be useful to preauth modules without having
to link against libkdb5.  Add a callback to make client string
attributes accessible to modules.

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

12 years agoDitch fast_factor.h since it contains only stubs
Greg Hudson [Thu, 6 Oct 2011 19:24:56 +0000 (19:24 +0000)]
Ditch fast_factor.h since it contains only stubs

Leave a comment behind where we called fast_set_kdc_verified().
Remove the call to fast_kdc_replace_reply_key() since it's wrong
(encrypted challenge doesn't replace the reply key in that sense).

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

12 years agoInitialize localname on error in gss_localname
Greg Hudson [Thu, 6 Oct 2011 16:38:35 +0000 (16:38 +0000)]
Initialize localname on error in gss_localname

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

12 years agoUse type-safe callbacks in preauth interface
Greg Hudson [Thu, 6 Oct 2011 16:18:56 +0000 (16:18 +0000)]
Use type-safe callbacks in preauth interface

Replace the generic get_data functions in clpreauth and kdcpreauth
with structures containing callback functions.  Each structure has a
minor version number to allow adding new callbacks.

For simplicity, the new fast armor key callbacks return aliases, which
is how we would supply the armor key as a function parameter.  The new
client keys callback is paired with a free_keys callback to reduce the
amount of cleanup code needed in modules.

ticket: 6971

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

12 years agoRemove edata code in sample preauth plugins
Greg Hudson [Wed, 5 Oct 2011 22:11:19 +0000 (22:11 +0000)]
Remove edata code in sample preauth plugins

The code assumes unstructured edata and would be somewhat annoying to
reframe in terms of pa-data.

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

12 years agoReplace gss_pname_to_uid with gss_localname in gss-server.c
Sam Hartman [Wed, 5 Oct 2011 21:31:08 +0000 (21:31 +0000)]
Replace gss_pname_to_uid with gss_localname in gss-server.c

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25313 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoReplace gss_pname_to_uid with gss_localname in gssapi32.def
Sam Hartman [Wed, 5 Oct 2011 21:30:59 +0000 (21:30 +0000)]
Replace gss_pname_to_uid with gss_localname in gssapi32.def

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25312 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoDon't need to check for fork on windows
Sam Hartman [Wed, 5 Oct 2011 21:30:55 +0000 (21:30 +0000)]
Don't need to check for fork on windows

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25311 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoAdd krb5int_gettimeofday to k5sprt for platforms w/o native gettimeofday
Sam Hartman [Wed, 5 Oct 2011 21:30:50 +0000 (21:30 +0000)]
Add krb5int_gettimeofday to k5sprt for platforms w/o native gettimeofday

Microsecond accuracy on _WIN32, but only one second accuracy on other,
AFAIK purely hypothetical, platforms that lack native gettimeofday.
Shamelessly cribbed from Heimdal.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25310 dc483132-0cff-0310-8789-dd5450dbe970

12 years agogss_unwrap_iov crashes with stream buffers for 3des, des, rc4
Sam Hartman [Wed, 5 Oct 2011 21:30:42 +0000 (21:30 +0000)]
gss_unwrap_iov crashes with stream buffers for 3des, des, rc4

Use correct key to determine enctype for KG2 tokens in
kg_unseal_stream_iov

Tested with AES for a new enctype and 3DES for an old enctype.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 6970
tags: pullup

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

12 years agoFrom: Sam Hartman <hartmans@debian.org>
Sam Hartman [Wed, 5 Oct 2011 21:30:31 +0000 (21:30 +0000)]
From: Sam Hartman <hartmans@debian.org>

Pkinit: offer supported KDFs in client

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

12 years agoAdd tests to pkinit_kdf_test to test SHA-256/AES and SHA-512/DES3
Sam Hartman [Wed, 5 Oct 2011 21:30:28 +0000 (21:30 +0000)]
Add tests to pkinit_kdf_test to test SHA-256/AES and SHA-512/DES3

Signed-off-by: Margaret Wasserman <mrw@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25307 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoMake alg agility KDF work properly when the hash length differs from the key length
Sam Hartman [Wed, 5 Oct 2011 21:30:24 +0000 (21:30 +0000)]
Make alg agility KDF work properly when the hash length differs from the key length

Signed-off-by: Margaret Wasserman <mrw@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25306 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoClean up unused constants
Sam Hartman [Wed, 5 Oct 2011 21:30:20 +0000 (21:30 +0000)]
Clean up unused constants

From: Margaret Wasserman <mrw@painless-security.com>

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

12 years agoMake pkinit fall back to octetstring2key() if there are not matching KDFs
Sam Hartman [Wed, 5 Oct 2011 21:30:16 +0000 (21:30 +0000)]
Make pkinit fall back to octetstring2key() if there are not matching KDFs

From: Margaret Wasserman <mrw@painless-security.com>

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

12 years agoTreat the client's list of supported KDFs as an unordered list
Sam Hartman [Wed, 5 Oct 2011 21:30:12 +0000 (21:30 +0000)]
Treat the client's list of supported KDFs as an unordered list

Signed-off-by: Margaret Wasserman <mrw@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25303 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoMake KDF work when length of random data differs from length of hash
Sam Hartman [Wed, 5 Oct 2011 21:30:08 +0000 (21:30 +0000)]
Make KDF work when length of random data differs from length of hash

Signed-off-by: Margaret Wasserman <mrw@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25302 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoFix incorrect formatting of KDF fields, no substantive change
Sam Hartman [Wed, 5 Oct 2011 21:30:02 +0000 (21:30 +0000)]
Fix incorrect formatting of KDF fields, no substantive change

Signed-off-by: Margaret Wasserman <mrw@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25301 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoUse an opaque handle in the kdcpreauth callback
Greg Hudson [Wed, 5 Oct 2011 17:27:15 +0000 (17:27 +0000)]
Use an opaque handle in the kdcpreauth callback

Instead of passing a request and entry to the kdcpreauth get_data
callback, pass an opaque handle.  Remove DB entry and key data
parameters from kdcpreauth methods (but keep the request, since that's
transparent).

The SecurID plugin links against libkdb5 and needs access to the client
DB entry.  Rather than continue to pass a DB entry to kdcpreauth
methods, add a get_data callback to get the client DB entry for the few
plugins which might need it.

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

12 years agoFix initialization and pointer bugs in new code
Greg Hudson [Tue, 4 Oct 2011 22:40:10 +0000 (22:40 +0000)]
Fix initialization and pointer bugs in new code

Coverity found some minor-to-medium bugs in some recent changes; fix
them.

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

12 years agoCreate e_data as pa_data in KDC interfaces
Greg Hudson [Tue, 4 Oct 2011 20:16:07 +0000 (20:16 +0000)]
Create e_data as pa_data in KDC interfaces

All current known uses of e_data are encoded as pa-data or typed-data.
FAST requires that e_data be expressed as pa-data.  Change the DAL and
kdcpreauth interfaces so that e_data is returned as a sequence of
pa-data elements.  Add a preauth module flag to indicate that the
sequence should be encoded as typed-data in non-FAST errors.

ticket: 6969

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

12 years agoImprove k5_get_os_entropy for Windows
Greg Hudson [Tue, 4 Oct 2011 15:11:45 +0000 (15:11 +0000)]
Improve k5_get_os_entropy for Windows

When acquiring a crypto context for CryptGenRandom, pass
CRYPT_VERIFYCONTEXT to indicate that we don't need access to private
keys.  Appears to make OS entropy work on Windows XP.

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

12 years agoMinor RST adjustment
Zhanna Tsitkov [Mon, 3 Oct 2011 20:15:27 +0000 (20:15 +0000)]
Minor RST adjustment

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

12 years agoFix a Fortuna PRNG failure case
Greg Hudson [Mon, 3 Oct 2011 19:32:28 +0000 (19:32 +0000)]
Fix a Fortuna PRNG failure case

If we don't have entropy when krb5_c_random_make_octets is called,
unlock the mutex before returning an error.  From
kevin.wasserman@painless-security.com.

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

12 years agoMake kdcpreauth verify respond via callback
Greg Hudson [Mon, 3 Oct 2011 19:14:05 +0000 (19:14 +0000)]
Make kdcpreauth verify respond via callback

From npmccallum@redhat.com with changes.

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

12 years agoMake check_padata() respond via a callback
Greg Hudson [Mon, 3 Oct 2011 19:14:01 +0000 (19:14 +0000)]
Make check_padata() respond via a callback

From npmccallum@redhat.com with changes.

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

12 years agoMake do_as_req() respond via a callback
Greg Hudson [Mon, 3 Oct 2011 19:13:57 +0000 (19:13 +0000)]
Make do_as_req() respond via a callback

From npmccallum@redhat.com with changes.

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

12 years agoMake dispatch() respond via a callback
Greg Hudson [Mon, 3 Oct 2011 19:13:39 +0000 (19:13 +0000)]
Make dispatch() respond via a callback

From npmccallum@redhat.com with changes.

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

12 years agoMan page spelling corrections from ville.skytta@iki.fi
Greg Hudson [Sun, 2 Oct 2011 14:05:44 +0000 (14:05 +0000)]
Man page spelling corrections from ville.skytta@iki.fi

ticket: 6968

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

12 years agoRevert r25288 because it can remove parts of the source tree
Tom Yu [Thu, 29 Sep 2011 22:05:42 +0000 (22:05 +0000)]
Revert r25288 because it can remove parts of the source tree

Also, disable kdc_realm test until it works correctly on an
uninstalled build and when built outside of the source tree.

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

12 years agoAllow kdc_realm test run in case when the build and source directories are different
Zhanna Tsitkov [Thu, 29 Sep 2011 21:35:18 +0000 (21:35 +0000)]
Allow kdc_realm test run in case when the build and source directories are different

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

12 years agogit-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25287 dc483132-0cff-0310-8789-dd5450dbe970
Zhanna Tsitkov [Thu, 29 Sep 2011 20:16:46 +0000 (20:16 +0000)]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25287 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoUpdated MIT Kerberos "quick facts" with license information
Zhanna Tsitkov [Thu, 29 Sep 2011 16:53:31 +0000 (16:53 +0000)]
Updated MIT Kerberos "quick facts" with license information

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

12 years agoUpdated Copyrights dates
Zhanna Tsitkov [Thu, 29 Sep 2011 16:05:56 +0000 (16:05 +0000)]
Updated Copyrights dates

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

12 years agoInclude Domain Realm Referrals (per http://k5wiki.kerberos.org/wiki/Projects/domain_r...
Zhanna Tsitkov [Thu, 29 Sep 2011 14:13:57 +0000 (14:13 +0000)]
Include Domain Realm Referrals (per k5wiki.kerberos.org/wiki/Projects/domain_realm_referrals project) test suite into "make check"

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

12 years agoRevert r25274 and just don't include sys/cdefs.h
Greg Hudson [Wed, 28 Sep 2011 22:26:27 +0000 (22:26 +0000)]
Revert r25274 and just don't include sys/cdefs.h

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

12 years agoFix line endings
Sam Hartman [Wed, 28 Sep 2011 21:04:06 +0000 (21:04 +0000)]
Fix line endings

From: Sam Hartman <hartmans@painless-security.com>

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

12 years agoInstaller wip. Actually builds semi-functional kfw.msi
Sam Hartman [Wed, 28 Sep 2011 21:03:52 +0000 (21:03 +0000)]
Installer wip.  Actually builds semi-functional kfw.msi

Still many things missing and/or misplaced

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25281 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoWindows "make install" fixes
Sam Hartman [Wed, 28 Sep 2011 21:03:10 +0000 (21:03 +0000)]
Windows "make install" fixes

Install mit2ms.exe, leashdll, kfwlogon, kswithc, export .libs.
Also some tabs/spaces fixup.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25280 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoMoved Windows specific include files to src/windows/include
Sam Hartman [Wed, 28 Sep 2011 21:02:41 +0000 (21:02 +0000)]
Moved Windows specific include files to src/windows/include

Updated Windows specific Makefiles to search for header files in src/windows/include

Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25279 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoInitial import of KFW 3.2.2 Leash32 code
Sam Hartman [Wed, 28 Sep 2011 21:02:14 +0000 (21:02 +0000)]
Initial import of KFW 3.2.2 Leash32 code

Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25278 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoWindows fix: no longer building gss.exe, so don't try to install it
Sam Hartman [Wed, 28 Sep 2011 21:01:35 +0000 (21:01 +0000)]
Windows fix: no longer building gss.exe, so don't try to install it

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25277 dc483132-0cff-0310-8789-dd5450dbe970

12 years agoRemove windows/gss from build
Sam Hartman [Wed, 28 Sep 2011 21:01:17 +0000 (21:01 +0000)]
Remove windows/gss from build

It is both broken and redundant with appl/gss-sample

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25276 dc483132-0cff-0310-8789-dd5450dbe970