]> git.ipfire.org Git - thirdparty/krb5.git/log
thirdparty/krb5.git
9 years agoUpdate for krb5-1.14.1-postrelease
Tom Yu [Mon, 29 Feb 2016 22:10:45 +0000 (17:10 -0500)] 
Update for krb5-1.14.1-postrelease

9 years agoUpdates for krb5-1.14.1 krb5-1.14.1-final
Tom Yu [Fri, 26 Feb 2016 23:28:28 +0000 (18:28 -0500)] 
Updates for krb5-1.14.1

9 years agoUpdate README
Tom Yu [Fri, 8 Jan 2016 23:17:36 +0000 (18:17 -0500)] 
Update README

Add Sarah Day to the list of Kerberos Team members in the README file.

Update lists of Consortium Sponsors and contributors.

[ci skip]

9 years agomake update-po
Tom Yu [Thu, 25 Feb 2016 23:35:06 +0000 (18:35 -0500)] 
make update-po

9 years agoUpdate man pages
Tom Yu [Thu, 25 Feb 2016 23:34:42 +0000 (18:34 -0500)] 
Update man pages

9 years agoUpdate copyright years to 2016
Michael Mattioli [Tue, 5 Jan 2016 03:17:39 +0000 (22:17 -0500)] 
Update copyright years to 2016

Update copyright years to 2016 where appropriate.

9 years agoUse blocking lock when creating db2 KDB
Greg Hudson [Tue, 23 Feb 2016 22:15:18 +0000 (17:15 -0500)] 
Use blocking lock when creating db2 KDB

In 1.11 we switched from non-blocking to blocking locks in the DB2
module, but we missed one call to krb5_lock_file() in ctx_create_db().
This non-blocking lock can cause krb5_db_promote() to fail if the
database is locked when we try to promote the DB, in turn causing
kdb5_util load to fail.  Correct this call to make krb5_db_promote()
more robust.

(cherry picked from commit 1868916dbb60a64b92da217257b4ed021262afd3)

ticket: 8367
version_fixed: 1.14.1

9 years agoFix leaks in kadmin server stubs [CVE-2015-8631]
Greg Hudson [Fri, 8 Jan 2016 18:16:54 +0000 (13:16 -0500)] 
Fix leaks in kadmin server stubs [CVE-2015-8631]

In each kadmind server stub, initialize the client_name and
server_name variables, and release them in the cleanup handler.  Many
of the stubs will otherwise leak the client and server name if
krb5_unparse_name() fails.  Also make sure to free the prime_arg
variables in rename_principal_2_svc(), or we can leak the first one if
unparsing the second one fails.  Discovered by Simo Sorce.

CVE-2015-8631:

In all versions of MIT krb5, an authenticated attacker can cause
kadmind to leak memory by supplying a null principal name in a request
which uses one.  Repeating these requests will eventually cause
kadmind to exhaust all available memory.

    CVSSv2 Vector: AV:N/AC:L/Au:S/C:N/I:N/A:C/E:POC/RL:OF/RC:C

(cherry picked from commit 83ed75feba32e46f736fcce0d96a0445f29b96c2)

ticket: 8343
version_fixed: 1.14.1

9 years agoCheck for null kadm5 policy name [CVE-2015-8630]
Greg Hudson [Fri, 8 Jan 2016 17:52:28 +0000 (12:52 -0500)] 
Check for null kadm5 policy name [CVE-2015-8630]

In kadm5_create_principal_3() and kadm5_modify_principal(), check for
entry->policy being null when KADM5_POLICY is included in the mask.

CVE-2015-8630:

In MIT krb5 1.12 and later, an authenticated attacker with permission
to modify a principal entry can cause kadmind to dereference a null
pointer by supplying a null policy value but including KADM5_POLICY in
the mask.

    CVSSv2 Vector: AV:N/AC:H/Au:S/C:N/I:N/A:C/E:POC/RL:OF/RC:C

(cherry picked from commit b863de7fbf080b15e347a736fdda0a82d42f4f6b)

ticket: 8342
version_fixed: 1.14.1

9 years agoVerify decoded kadmin C strings [CVE-2015-8629]
Greg Hudson [Fri, 8 Jan 2016 17:45:25 +0000 (12:45 -0500)] 
Verify decoded kadmin C strings [CVE-2015-8629]

In xdr_nullstring(), check that the decoded string is terminated with
a zero byte and does not contain any internal zero bytes.

CVE-2015-8629:

In all versions of MIT krb5, an authenticated attacker can cause
kadmind to read beyond the end of allocated memory by sending a string
without a terminating zero byte.  Information leakage may be possible
for an attacker with permission to modify the database.

    CVSSv2 Vector: AV:N/AC:H/Au:S/C:P/I:N/A:N/E:POC/RL:OF/RC:C

(cherry picked from commit df17a1224a3406f57477bcd372c61e04c0e5a5bb)

ticket: 8341
version_fixed: 1.14.1

9 years agoFix iprop server stub error management
Greg Hudson [Thu, 14 Jan 2016 22:51:53 +0000 (17:51 -0500)] 
Fix iprop server stub error management

The ipropd stubs free client_name and server_name in the cleanup
handler, so should not free them in out-of-memory conditions.
Reported by Will Fiveash.

(cherry picked from commit d998b088adb875bc0a4e13c184075f91fb23336b)

ticket: 8347
version_fixed: 1.14.1

9 years agoFix EOF check in kadm5.acl line processing
Robbie Harwood [Wed, 13 Jan 2016 23:17:09 +0000 (18:17 -0500)] 
Fix EOF check in kadm5.acl line processing

On platforms where the char type is unsigned, the check for EOF (which
is negative) will always fail, leaving a 255 byte at the end of the
line.  This can cause a syntax error, in turn causing the contents of
kadm5.acl to be ignored.  Fix this bug by removing the cast on EOF.

[ghudson@mit.edu: more precisely describe consequences of bug in
commit message]

(cherry picked from commit 8fd85a77789496b8d7f8092f6e8a2824bc09a6cf)

ticket: 8346
version_fixed: 1.14.1

9 years agoFix memory leak in SPNEGO gss_init_sec_context()
Greg Hudson [Wed, 25 Nov 2015 19:43:35 +0000 (14:43 -0500)] 
Fix memory leak in SPNEGO gss_init_sec_context()

After the initial call to spnego_gss_init_sec_context(), the context
handle can leak if init_ctx_cont() returns an error, because the
cleanup handler assumes that spnego_ctx contains the value of
*context_handle.  Fix this leak by setting spnego_ctx before the if
block which contains that call.  Reported by Adam Bernstein.

(cherry picked from commit 159dbbd5ff14fdc2fa71fb3a8804eb401c914399)

ticket: 8281
version_fixed: 1.14.1

9 years agoMake ksu work with prompting clpreauth modules
Greg Hudson [Fri, 8 Jan 2016 16:54:55 +0000 (11:54 -0500)] 
Make ksu work with prompting clpreauth modules

Commit 5fd5a67c5a93514e7d0a64425baa007ad91f57de switched ksu from
using krb5_get_in_tkt_with_password() to
krb5_get_init_creds_password(), but did not supply a prompter
argument.  Pass krb5_prompter_posix so that clpreauth modules can
prompt for additional information during authentication.

(cherry picked from commit 23a16fb5eac733880e34a770882ed17b93b5d66c)

ticket: 8340
verion_fixed: 1.14.1

9 years agoAdd .travis.yml
Tom Yu [Wed, 30 Dec 2015 20:26:54 +0000 (15:26 -0500)] 
Add .travis.yml

Do Travis CI testing with clang and gcc, on 64-bit Ubuntu Trusty.
Performance would probably be better using the container-based Travis
infrastructure, but that is currently limited to Precise, and we would
need some important apt packages whitelisted, e.g., dejagnu.

(cherry picked from commit 09e8307da049cf90bb1f7b9b4b1608a0b9130fd9)

ticket: 8339 (new)
target_version: 1.13-next
target_version: 1.14-next
version_fixed: 1.14.1
tags: pullup

9 years agoIncrease hostname length in ipropd_svc.c
Tom Yu [Wed, 6 Jan 2016 20:46:40 +0000 (15:46 -0500)] 
Increase hostname length in ipropd_svc.c

On some systems, MAXHOSTNAMELEN is too short for valid fully qualified
domain names.  Use NI_MAXHOST instead in ipropd_svc.c.

(cherry picked from commit 39802ad406c294306a407ea3d1199941d8b5d773)

ticket: 8336
version_fixed: 1.14.1

9 years agoDon't canonicalize hostname in sim_client.c
Tom Yu [Wed, 30 Dec 2015 22:17:02 +0000 (17:17 -0500)] 
Don't canonicalize hostname in sim_client.c

krb5_mk_req() already canonicalizes the target hostname, so don't try
to use a buffer of size MAXHOSTNAMELEN to canonicalize the hostname
beforehand.  This buffer will be too short for some unusually long
FQDNs.

(cherry picked from commit 0491c778064e80aaf2aaeb4475a0db333542fed9)

ticket: 8336
version_fixed: 1.14.1

9 years agoWork around uninitialized warning in cc_kcm.c
Tom Yu [Wed, 6 Jan 2016 20:24:16 +0000 (15:24 -0500)] 
Work around uninitialized warning in cc_kcm.c

Some versions of clang erroneously detect use of an uninitialized
variable reply_len in kcmio_call() when building on non-Mac platforms.
Initialize it to work around this warning.

(cherry picked from commit 40b007c0d8e2a12c6f4205ac111dee731c9d970c)

ticket: 8335
version_fixed: 1.14.1

9 years agoFix interposed gss_accept_sec_context()
Robbie Harwood [Thu, 17 Dec 2015 00:31:22 +0000 (19:31 -0500)] 
Fix interposed gss_accept_sec_context()

If gss_accept_sec_context() is interposed, selected_mech will be an
interposer OID.  In this situation, pass the corresponding public OID
to gss_inquire_attrs_for_mech() to determine whether the mech is
allowed by default.

[ghudson@mit.edu: pared down from larger commit; rewrote commit message]

(cherry picked from commit 0b43d10333f4c4b29896cebc9447d8866b661217)

ticket: 8338
version_fixed: 1.14.1

9 years agoCheck internal context on init context errors
Simo Sorce [Tue, 5 Jan 2016 17:11:59 +0000 (12:11 -0500)] 
Check internal context on init context errors

If the mechanism deletes the internal context handle on error, the
mechglue must do the same with the union context, to avoid crashes if
the application calls other functions with this invalid union context.

[ghudson@mit.edu: edit commit message and code comment]

(cherry picked from commit 3beb564cea3d219efcf71682b6576cad548c2d23)

ticket: 8337
version_fixed: 1.14.1

9 years agoCheck context handle in gss_export_sec_context()
Tomas Kuthan [Tue, 29 Dec 2015 10:47:49 +0000 (11:47 +0100)] 
Check context handle in gss_export_sec_context()

After commit 4f35b27a9ee38ca0b557ce8e6d059924a63d4eff, the
context_handle parameter in gss_export_sec_context() is dereferenced
before arguments are validated by val_exp_sec_ctx_args().  With a null
context_handle, the new code segfaults instead of failing gracefully.
Revert this part of the commit and only dereference context_handle if
it is non-null.

(cherry picked from commit b6f29cbd2ab132e336b5435447348400e9a9e241)

ticket: 8334
version_fixed: 1.14.1

9 years agoSet TL_DATA mask flag for master key operations
Simo Sorce [Wed, 9 Dec 2015 23:09:18 +0000 (18:09 -0500)] 
Set TL_DATA mask flag for master key operations

When kdb5_util adds or removes master keys, it modifies tl-data but
doesn't set the KADM5_TL_DATA mask flag, causing KDB modules that rely
on this signaling (such as the LDAP module) not to store the tl-data
changes.  Fix this issue by setting the mask bit in add_new_mkey() and
kdb5_purge_mkeys().

[ghudson@mit.edu: edit commit message]

(cherry picked from commit c877f13c8985d820583b0d7ac1bb4c5dc36e677e)

ticket: 8327
version_fixed: 1.14.1

9 years agoAdd libkrb5support dependencies to test plugins
Greg Hudson [Fri, 11 Dec 2015 16:05:32 +0000 (11:05 -0500)] 
Add libkrb5support dependencies to test plugins

In some build environments, dependencies on libkrb5support can be
generated just from static inline functions in our header files, even
if those functions aren't used.  In two test plugin modules, use
$(KRB5_BASE_DEPLIBS) and $(KRB5_BASE_LIBS) to depend on libkrb5support
as well as libkrb5.  (This also pulls in libk5crypto, which is
unnecessary for these modules, but is inconsequential for a test
module.)  Reported by Will Fiveash.

(cherry picked from commit 5568d31f45fb78f505340a5b520b22d4dd3f6522)

ticket: 8326
version_fixed: 1.14.1

9 years agoFix k5crypto NSS iov processing bug
Greg Hudson [Mon, 7 Dec 2015 17:16:41 +0000 (12:16 -0500)] 
Fix k5crypto NSS iov processing bug

In k5_nss_gen_stream_iov(), don't stop processing the iov array if we
run across a zero-length iov.

(cherry picked from commit 08fafff29a11e61036021196aaae8c303d1a5662)

ticket: 8300
version_fixed: 1.14.1

9 years agoCorrectly use k5_wrapmsg() in ldap_principal2.c
Tom Yu [Wed, 9 Dec 2015 18:49:22 +0000 (13:49 -0500)] 
Correctly use k5_wrapmsg() in ldap_principal2.c

Commit ebcdf02f8ec212555b1762007fa8454615900f36 incorrectly used
k5_prependmsg() in an error handling clause in
krb5_ldap_get_principal().  Use k5_wrapmsg() instead.

(cherry picked from commit 412c19f93a0d7fed853388194f55eaf0d778b9e6)

ticket: 8301
version_fixed: 1.14.1

9 years agoUpdate mitK5features.rst for krb5-1.14
Tom Yu [Mon, 14 Dec 2015 22:31:20 +0000 (17:31 -0500)] 
Update mitK5features.rst for krb5-1.14

9 years agoFix mechglue gss_acquire_cred_impersonate_name
Simo Sorce [Fri, 13 Nov 2015 19:44:54 +0000 (14:44 -0500)] 
Fix mechglue gss_acquire_cred_impersonate_name

Checking for the generic gss_acquire_cred() function is no guarantee
that gss_acquire_cred_impersonate_name() is also implemented.

[ghudson@mit.edu: edit commit message]

(cherry picked from commit 46a4e225d2ecaa4077aa65f12f64273bf4911d3a)

ticket: 8276
version_fixed: 1.14
status: resolved

9 years agoUpdate for krb5-1.14-postrelease
Tom Yu [Fri, 20 Nov 2015 21:27:29 +0000 (16:27 -0500)] 
Update for krb5-1.14-postrelease

9 years agoUpdates for krb5-1.14 krb5-1.14-final
Tom Yu [Thu, 19 Nov 2015 20:06:42 +0000 (15:06 -0500)] 
Updates for krb5-1.14

9 years agoUpdate for krb5-1.14-beta2-postrelease
Tom Yu [Fri, 13 Nov 2015 04:51:19 +0000 (23:51 -0500)] 
Update for krb5-1.14-beta2-postrelease

9 years agoUpdates for krb5-1.14-beta2 krb5-1.14-beta2
Tom Yu [Thu, 12 Nov 2015 21:17:48 +0000 (16:17 -0500)] 
Updates for krb5-1.14-beta2

9 years agomake update-po
Tom Yu [Thu, 12 Nov 2015 21:01:36 +0000 (16:01 -0500)] 
make update-po

9 years agoAdd test coverage for GSS context export/import
Greg Hudson [Mon, 2 Nov 2015 03:47:53 +0000 (22:47 -0500)] 
Add test coverage for GSS context export/import

Pass the -export flag to gss-server in t_gss_sample.py, in order to
test context export and import for each of the mechanisms.

(cherry picked from commit bee2d867248b24c627da4c2ef270c8de15fd96f9)

ticket: 8273
version_fixed: 1.14
status: resolved

9 years agoFix SPNEGO context import
Greg Hudson [Mon, 2 Nov 2015 03:46:56 +0000 (22:46 -0500)] 
Fix SPNEGO context import

The patches for CVE-2015-2695 did not implement a SPNEGO
gss_import_sec_context() function, under the erroneous belief that an
exported SPNEGO context would be tagged with the underlying context
mechanism.  Implement it now to allow SPNEGO contexts to be
successfully exported and imported after establishment.

(cherry picked from commit 222b09f6e2f536354555f2a0dedfe29fc10c01d6)

ticket: 8273
version_fixed: 1.14

9 years agoFix IAKERB context export/import [CVE-2015-2698]
Greg Hudson [Mon, 2 Nov 2015 03:45:21 +0000 (22:45 -0500)] 
Fix IAKERB context export/import [CVE-2015-2698]

The patches for CVE-2015-2696 contained a regression in the newly
added IAKERB iakerb_gss_export_sec_context() function, which could
cause it to corrupt memory.  Fix the regression by properly
dereferencing the context_handle pointer before casting it.

Also, the patches did not implement an IAKERB gss_import_sec_context()
function, under the erroneous belief that an exported IAKERB context
would be tagged as a krb5 context.  Implement it now to allow IAKERB
contexts to be successfully exported and imported after establishment.

CVE-2015-2698:

In any MIT krb5 release with the patches for CVE-2015-2696 applied, an
application which calls gss_export_sec_context() may experience memory
corruption if the context was established using the IAKERB mechanism.
Historically, some vulnerabilities of this nature can be translated
into remote code execution, though the necessary exploits must be
tailored to the individual application and are usually quite
complicated.

    CVSSv2 Vector: AV:N/AC:H/Au:S/C:C/I:C/A:C/E:POC/RL:OF/RC:C

(cherry picked from commit 3db8dfec1ef50ddd78d6ba9503185995876a39fd)

ticket: 8273
version_fixed: 1.14

9 years agoFix two IAKERB comments
Greg Hudson [Tue, 27 Oct 2015 04:44:24 +0000 (00:44 -0400)] 
Fix two IAKERB comments

The comment explaining why there is no iakerb_gss_import_sec_context()
erroneously referenced SPNEGO instead of IAKERB (noticed by Ben
Kaduk).  The comment above iakerb_gss_delete_sec_context() is out of
date after the last commit.

(cherry picked from commit 92d6dd045dfc06cc03d20b327a6ee7a71e6bc24d)

10 years agoZap secure cookie contents when freeing
Greg Hudson [Wed, 21 Oct 2015 17:21:48 +0000 (13:21 -0400)] 
Zap secure cookie contents when freeing

Secure cookies are intended to hold secret values which may contribute
to key data, and therefore should be sanitized when released.  Also
fix a memory leak in kdc_fast_make_cookie().

(cherry picked from commit 73f0ee229fdd2e888bdefe580bb183d2a6c57365)

ticket: 8271
version_fixed: 1.14
status: resolved

10 years agoUse fixed rcache directory when cross-compiling
Paul Fertser [Mon, 19 Oct 2015 18:46:14 +0000 (14:46 -0400)] 
Use fixed rcache directory when cross-compiling

When cross-compiling, looking at what directories are present on the
build machine makes no sense.  Default to /var/tmp instead.

[ghudson@mit.edu: use /var/tmp instead of /tmp; adjust commit message]

(cherry picked from commit db2acb6b06e469c6c12476bec68acc7964626523)

ticket: 8254
version_fixed: 1.14
status: resolved

10 years agoFix build_principal memory bug [CVE-2015-2697]
Greg Hudson [Fri, 25 Sep 2015 16:51:47 +0000 (12:51 -0400)] 
Fix build_principal memory bug [CVE-2015-2697]

In build_principal_va(), use k5memdup0() instead of strdup() to make a
copy of the realm, to ensure that we allocate the correct number of
bytes and do not read past the end of the input string.  This bug
affects krb5_build_principal(), krb5_build_principal_va(), and
krb5_build_principal_alloc_va().  krb5_build_principal_ext() is not
affected.

CVE-2015-2697:

In MIT krb5 1.7 and later, an authenticated attacker may be able to
cause a KDC to crash using a TGS request with a large realm field
beginning with a null byte.  If the KDC attempts to find a referral to
answer the request, it constructs a principal name for lookup using
krb5_build_principal() with the requested realm.  Due to a bug in this
function, the null byte causes only one byte be allocated for the
realm field of the constructed principal, far less than its length.
Subsequent operations on the lookup principal may cause a read beyond
the end of the mapped memory region, causing the KDC process to crash.

CVSSv2: AV:N/AC:L/Au:S/C:N/I:N/A:C/E:POC/RL:OF/RC:C

(cherry picked from commit f0c094a1b745d91ef2f9a4eae2149aac026a5789)

ticket: 8252
version_fixed: 1.14
status: resolved

10 years agoAdd more gss_inquire_context() tests
Greg Hudson [Fri, 11 Sep 2015 21:58:33 +0000 (17:58 -0400)] 
Add more gss_inquire_context() tests

Add tests for partial IAKERB and SPNEGO initiators, and for partial
krb5 (DCE-style), IAKERB, and SPNEGO acceptors.  Make flag checking
more strict for existing tests.

(cherry picked from commit a705b1160ce7f0c5f23b9859c4c6c707503fbfdc)

ticket: 8244
version_fixed: 1.14
status: resolved

10 years agoFix IAKERB context aliasing bugs [CVE-2015-2696]
Nicolas Williams [Mon, 14 Sep 2015 16:28:36 +0000 (12:28 -0400)] 
Fix IAKERB context aliasing bugs [CVE-2015-2696]

The IAKERB mechanism currently replaces its context handle with the
krb5 mechanism handle upon establishment, under the assumption that
most GSS functions are only called after context establishment.  This
assumption is incorrect, and can lead to aliasing violations for some
programs.  Maintain the IAKERB context structure after context
establishment and add new IAKERB entry points to refer to it with that
type.  Add initiate and established flags to the IAKERB context
structure for use in gss_inquire_context() prior to context
establishment.

CVE-2015-2696:

In MIT krb5 1.9 and later, applications which call
gss_inquire_context() on a partially-established IAKERB context can
cause the GSS-API library to read from a pointer using the wrong type,
generally causing a process crash.  Java server applications using the
native JGSS provider are vulnerable to this bug.  A carefully crafted
IAKERB packet might allow the gss_inquire_context() call to succeed
with attacker-determined results, but applications should not make
access control decisions based on gss_inquire_context() results prior
to context establishment.

    CVSSv2 Vector: AV:N/AC:M/Au:N/C:N/I:N/A:C/E:POC/RL:OF/RC:C

[ghudson@mit.edu: several bugfixes, style changes, and edge-case
behavior changes; commit message and CVE description]

(cherry picked from commit e04f0283516e80d2f93366e0d479d13c9b5c8c2a)

ticket: 8244
version_fixed: 1.14

10 years agoFix SPNEGO context aliasing bugs [CVE-2015-2695]
Nicolas Williams [Mon, 14 Sep 2015 16:27:52 +0000 (12:27 -0400)] 
Fix SPNEGO context aliasing bugs [CVE-2015-2695]

The SPNEGO mechanism currently replaces its context handle with the
mechanism context handle upon establishment, under the assumption that
most GSS functions are only called after context establishment.  This
assumption is incorrect, and can lead to aliasing violations for some
programs.  Maintain the SPNEGO context structure after context
establishment and refer to it in all GSS methods.  Add initiate and
opened flags to the SPNEGO context structure for use in
gss_inquire_context() prior to context establishment.

CVE-2015-2695:

In MIT krb5 1.5 and later, applications which call
gss_inquire_context() on a partially-established SPNEGO context can
cause the GSS-API library to read from a pointer using the wrong type,
generally causing a process crash.  This bug may go unnoticed, because
the most common SPNEGO authentication scenario establishes the context
after just one call to gss_accept_sec_context().  Java server
applications using the native JGSS provider are vulnerable to this
bug.  A carefully crafted SPNEGO packet might allow the
gss_inquire_context() call to succeed with attacker-determined
results, but applications should not make access control decisions
based on gss_inquire_context() results prior to context establishment.

    CVSSv2 Vector: AV:N/AC:M/Au:N/C:N/I:N/A:C/E:POC/RL:OF/RC:C

[ghudson@mit.edu: several bugfixes, style changes, and edge-case
behavior changes; commit message and CVE description]

(cherry picked from commit b51b33f2bc5d1497ddf5bd107f791c101695000d)

ticket: 8244
version_fixed: 1.14

10 years agoAllow clock skew in krb5 gss_accept_sec_context()
Greg Hudson [Thu, 8 Oct 2015 12:53:37 +0000 (08:53 -0400)] 
Allow clock skew in krb5 gss_accept_sec_context()

Remove an unnecessarily strict check for ticket expiration from
kg_accept_krb5() and kg_accept_dce().  Instead, add the maximum
allowable clock skew to the reported lifetime of acceptor contexts.

(cherry picked from commit b496ce4095133536e0ace36b74130e4b9ecb5e11)

ticket: 8268
version_fixed: 1.14
status: resolved

10 years agoMake ksu work when unsetenv() returns NULL
Greg Hudson [Sun, 4 Oct 2015 23:54:35 +0000 (19:54 -0400)] 
Make ksu work when unsetenv() returns NULL

Some older platforms (OS X 10.4, glibc 2.2.1) declare unsetenv() as
returning void, as does ksu's compatibility definition of unsetenv().
Don't use the return value in get_configured_defccname().

(cherry picked from commit 7eee546db10e907666e02fdded4f512e8d0faf4c)

ticket: 8267
version_fixed: 1.14
status: resolved

10 years agoFix installed message catalog uses in kdb tests
Greg Hudson [Sun, 4 Oct 2015 19:55:43 +0000 (15:55 -0400)] 
Fix installed message catalog uses in kdb tests

In src/tests/Makefile.in, rename RUN_SETUP to RUN_DB_TEST, and include
"LC_ALL=C" in the definition to avoid using the message catalog.  Also
include $(VALGRIND) for consistency with RUN_TEST.

(cherry picked from commit 9a6dcd4b56df245556e77b9b1db6a8c3f486cf9e)

ticket: 8264
version_fixed: 1.14
status: resolved

10 years agoUse RUN_TEST and fix installed krb5.conf uses
Greg Hudson [Sun, 4 Oct 2015 18:45:29 +0000 (14:45 -0400)] 
Use RUN_TEST and fix installed krb5.conf uses

Use $(RUN_TEST) to run most C test programs, for simplicity and to fix
accidental uses of the installed krb5.conf.  Where a particular
krb5.conf must be used instead of the one in src/config-files, use a
locally defined variant like RUN_TEST_LOCAL_CONF.

Accidental references to the installed krb5.conf were present when
running t_pac, t_princ, t_etypes, t_trace, t_attr, t_attrset,
t_packet, t_remote, t_client, pkinit_kdf_test, test_chpw_message,
text_cxx_krb5, and test_cxx_k5int.

Based on a patch from Robbie Harwood.

(cherry picked from commit 4eea9c287e43ab40936e25094cd093f2f3f32bd9)

ticket: 8266
version_fixed: 1.14
status: resolved

10 years agoAdd RUN_TEST make variable
Greg Hudson [Sun, 4 Oct 2015 15:09:28 +0000 (11:09 -0400)] 
Add RUN_TEST make variable

Add a pre.in variable to simplify running C test programs from
Makefile rules.

(cherry picked from commit 45c6e285be8042ffccdab13b5f78cd5ada8e7973)

ticket: 8266

10 years agoAccept new passwords as const char pointers
Andreas Schneider [Tue, 6 Oct 2015 11:35:03 +0000 (13:35 +0200)] 
Accept new passwords as const char pointers

In krb5_change_password(), krb5_set_password(), and
krb5_set_password_using_ccache(), accept the new password as a const
char * instead of a char *.  Propagate this change to the necessary
internal functions.

[ghudson@mit.edu: commit message rewrite]

(cherry picked from commit 03c5058f2a1315aa718f0a083f5568bedaf187e8)

ticket: 8269
version_fixed: 1.14
status: resolved

10 years agoSet plugin_base_dir for kadmin tests
Nalin Dahyabhai [Thu, 1 Oct 2015 22:59:34 +0000 (18:59 -0400)] 
Set plugin_base_dir for kadmin tests

In the krb5.conf used by the kadmin tests, include a plugin_base_dir
setting.  Otherwise the KDC can load and run code from kdcpreauth
modules in the install tree.

[ghudson@mit.edu: commit message]

(cherry picked from commit 3db59d81bbbe389553d13efeee1c99117b459b24)

ticket: 8262
version_fixed: 1.14
status: resolved

10 years agoUpdates for krb5-1.14-beta1-postrelease
Tom Yu [Fri, 9 Oct 2015 20:45:24 +0000 (16:45 -0400)] 
Updates for krb5-1.14-beta1-postrelease

10 years agoUpdates for krb5-1.14-beta1 krb5-1.14-beta1
Tom Yu [Fri, 9 Oct 2015 18:10:34 +0000 (14:10 -0400)] 
Updates for krb5-1.14-beta1

10 years agomake update-po
Tom Yu [Fri, 9 Oct 2015 18:18:19 +0000 (14:18 -0400)] 
make update-po

10 years agoUpdate mitK5features.rst for krb5-1.14
Tom Yu [Mon, 5 Oct 2015 19:59:25 +0000 (15:59 -0400)] 
Update mitK5features.rst for krb5-1.14

10 years agoFix gss_store_cred() minor code on acceptor cred
Tomas Kuthan [Wed, 30 Sep 2015 13:44:11 +0000 (15:44 +0200)] 
Fix gss_store_cred() minor code on acceptor cred

In krb5_gss_store_cred_into(), if the credential is acceptor-only, set
the minor status to G_STORE_ACCEPTOR_CRED_NOSUPP instead of
G_BAD_USAGE.

[ghudson@mit.edu: edit commit message]

(cherry picked from commit c0e16bb2f654038ad81602e89851f232916da051)

ticket: 8260
version_fixed: 1.14
status: resolved

10 years agoCheck output params on GSS OID set functions
Tomas Kuthan [Wed, 30 Sep 2015 13:18:05 +0000 (15:18 +0200)] 
Check output params on GSS OID set functions

Add sanity checks for the output parameters of
generic_gss_create_empty_oid_set() and
generic_gss_add_oid_set_member(), which are used directly by the API
functions gss_create_empty_oid_set() and gss_add_oid_set_member().

[ghudson@mit.edu: edit commit message]

(cherry picked from commit c9e035794caa784b6cdf416e2b3f1d641d011390)

ticket: 8259
version_fixed: 1.14
status: resolved

10 years agoCorrect GSS major code for non-default QOP values
Tomas Kuthan [Wed, 30 Sep 2015 13:34:26 +0000 (15:34 +0200)] 
Correct GSS major code for non-default QOP values

This patch fixes several krb5 mech error cases to comply with RFC
2743; non-default QOP arguments should result in GSS_S_BAD_QOP, not
GSS_S_FAILURE.

[ghudson@mit.edu: edit commit message]

(cherry picked from commit 45ccc1c85f42e4f41f2042df8a51dd7826533029)

ticket: 8258
version_fixed: 1.14
status: resolved

10 years agoFix gss_inquire_names_for_mech() on MS krb5 mech
Tomas Kuthan [Wed, 30 Sep 2015 13:24:24 +0000 (15:24 +0200)] 
Fix gss_inquire_names_for_mech() on MS krb5 mech

Allow the krb5 mech to query names for the gss_mech_krb5_wrong OID
(the erroneous OID used in old Microsoft SPNEGO implementations).

[ghudson@mit.edu: edit commit message]

(cherry picked from commit 95736f7d51cce7551c3c20450ff56831a71043df)

ticket: 8257
version_fixed: 1.14
status: resolved

10 years agoFix typo in GSS_S_UNAUTHORIZED error message
Tomas Kuthan [Wed, 30 Sep 2015 13:14:40 +0000 (15:14 +0200)] 
Fix typo in GSS_S_UNAUTHORIZED error message

Remove an erroneous double space in the gss_display_status() result
for GSS_S_UNAUTHORIZED.

[ghudson@mit.edu: edit commit message]

(cherry picked from commit 36732bf2084803eef52ad56576e5a50f37ccd115)

ticket: 8256
version_fixed: 1.14
status: resolved

10 years agoDefine error status GSS_S_BAD_MIC
Tomas Kuthan [Wed, 30 Sep 2015 13:11:03 +0000 (15:11 +0200)] 
Define error status GSS_S_BAD_MIC

RFC 2743 adds GSS_S_BAD_MIC as an alias for GSS_S_BAD_SIG.

[ghudson@mit.edu: edit commit messsage]

(cherry picked from commit be87852a12737eed448032875fb74f23e9cbf26b)

ticket: 8255
version_fixed: 1.14
status: resolved

10 years agoFix minor utf8-to-ucs2s read overrun bug
Greg Hudson [Fri, 25 Sep 2015 21:31:53 +0000 (17:31 -0400)] 
Fix minor utf8-to-ucs2s read overrun bug

k5_utf8s_to_ucs2s() reads and ignores one extra byte from the input
string before terminating its loop, possibly overrunning the input
buffer of its caller.  This overrun is typically without consequence,
but can show up in tools like asan or valgrind during RC4
string-to-key operations.  Fix the bug by swapping the order of the
loop conditions.

(cherry picked from commit eb52da21d72faa3d00b1205a5a0fdbabc45c9e6d)

ticket: 8253
version_fixed: 1.14
status: resolved

10 years agoFix kadmin with e2fsprogs libss
Greg Hudson [Wed, 23 Sep 2015 22:20:41 +0000 (18:20 -0400)] 
Fix kadmin with e2fsprogs libss

The libss in e2fsprogs exports ss_execute_command(), but does not
prototype it (as of this writing; a patch has been submitted
upstream).  When using the system ss library, check if a prototype is
needed and provide one if so.

(cherry picked from commit fd0b693f00f4d0b7b603bf4a2b8812869ad1df19)

ticket: 8251
version_fixed: 1.14
status: resolved

10 years agoFail during configure if stdint.h missing
Tom Yu [Mon, 21 Sep 2015 21:20:06 +0000 (17:20 -0400)] 
Fail during configure if stdint.h missing

We now require stdint.h to build this software.  Gracefully fail
during configure time if stdint.h is missing.

(cherry picked from commit 33441e6376d5b1606089a3621798493027816010)

ticket: 8221
version_fixed: 1.14
status: resolved

10 years agoUpdates for krb5-1.14-alpha1-postrelease
Tom Yu [Fri, 18 Sep 2015 19:18:50 +0000 (15:18 -0400)] 
Updates for krb5-1.14-alpha1-postrelease

10 years agoUpdates for krb5-1.14-alpha1 krb5-1.14-alpha1
Tom Yu [Fri, 18 Sep 2015 17:03:05 +0000 (13:03 -0400)] 
Updates for krb5-1.14-alpha1

10 years agomake update-po
Tom Yu [Thu, 17 Sep 2015 19:27:41 +0000 (15:27 -0400)] 
make update-po

10 years agoUpdate manpages
Tom Yu [Thu, 17 Sep 2015 19:20:38 +0000 (15:20 -0400)] 
Update manpages

10 years agomake depend
Tom Yu [Thu, 17 Sep 2015 18:53:57 +0000 (14:53 -0400)] 
make depend

10 years agoUpdate acknowledgments
Tom Yu [Wed, 16 Sep 2015 21:13:53 +0000 (17:13 -0400)] 
Update acknowledgments

10 years agoFix error mappings for IOV MIC mechglue funcs
Tomas Kuthan [Wed, 16 Sep 2015 10:13:26 +0000 (12:13 +0200)] 
Fix error mappings for IOV MIC mechglue funcs

The mechglue functions gss_get_mic_iov(), gss_get_mic_iov_length(),
and gss_verify_mic_iov() don't call map_error() to map
mechanism-specific error codes.  As a result, a subsequent call to
gss_display_status() fails with GSS_S_BAD_MECH, because no translation
for the error code is found in the error table.

This patch adds the missing map_error call.

[ghudson@mit.edu: correct a whitespace issue, edit commit message]

ticket: 8246 (new)
target_version: 1.13.3
tags: pullup

10 years agoUntabify kerberos.schema and kerberos.ldif
Greg Hudson [Wed, 16 Sep 2015 16:06:08 +0000 (12:06 -0400)] 
Untabify kerberos.schema and kerberos.ldif

Tabs are not equivalent to spaces in LDIF.

ticket: 8245

10 years agoFix memory leak in t_accname test program
Greg Hudson [Tue, 1 Sep 2015 16:17:18 +0000 (12:17 -0400)] 
Fix memory leak in t_accname test program

In t_accname.c, release real_acceptor_name and namebuf before
returning from main().

10 years agoFix krb5_rd_req() memory leak
Nicolas Williams [Tue, 1 Sep 2015 15:58:30 +0000 (11:58 -0400)] 
Fix krb5_rd_req() memory leak

In release 1.13, commit eba8c4909ec7ba0d7054d5d1b1061319e9970cc7
(ticket #7232) introduced a memory leak when skipping keytab entries
which do not match the application-provided server specification.  Fix
it by freeing the keytab entry before continuing the loop on a failure
to match.

[ghudson@mit.edu: commit message]

ticket: 8239 (new)
target_version: 1.13.3
tags: pullup

10 years agoFix error handling in gss_export_sec_context()
Nicolas Williams [Tue, 1 Sep 2015 23:42:58 +0000 (19:42 -0400)] 
Fix error handling in gss_export_sec_context()

In the mechglue gss_export_sec_context(), make sure to delete the
union context if the underlying mech context has been deleted.  This
can happen if the mech's gss_export_sec_context() returns a failure
and deletes the context (not a behavior exhibited by any of our
in-tree mechanisms, but an allowed behavior for other mechs), or if we
fail to allocate space for the wrapped token.

[ghudson@mit.edu: commit message; rename exit label to "cleanup" and
make it valid for all exit cases]

ticket: 8240 (new)
target_version: 1.13.3
tags: pullup

10 years agoAdd test cases for client referrals
Greg Hudson [Thu, 3 Sep 2015 16:46:39 +0000 (12:46 -0400)] 
Add test cases for client referrals

Add support for out-of-realm referrals to the test KDB modlule, and
add some tests to t_referral.py to exercise the KDC and client logic.

10 years agoFix KDC client referrals
Greg Hudson [Thu, 3 Sep 2015 16:38:44 +0000 (12:38 -0400)] 
Fix KDC client referrals

Although our built-in KDB modules do not support client referrals for
AS requests, the KDC is supposed to return one if a third-party module
returns a DB entry containing a principal in a foreign realm.
Unfortunately, this code has never worked; in prepare_error_as(), we
erroneously compare the protocol code errcode against the com_err code
KRB5KDC_ERR_WRONG_REALM; as a result, we never supply the canonical
client principal.  Fix this by comparing errcode against the protocol
code KDC_ERR_WRONG_REALM instead.

Discovered by Alexander Bokovoy and Simo Sorce.

ticket: 8241 (new)
target_version: 1.13.3
tags: pullup

10 years agoDocument tabdump 325/head
Tom Yu [Wed, 9 Sep 2015 20:02:13 +0000 (16:02 -0400)] 
Document tabdump

ticket: 8243

10 years agoAdd tests for tabdump
Tom Yu [Wed, 9 Sep 2015 19:46:18 +0000 (15:46 -0400)] 
Add tests for tabdump

ticket: 8243

10 years agoAdd tabular dump capability to kdb5_util
Tom Yu [Wed, 9 Sep 2015 18:06:06 +0000 (14:06 -0400)] 
Add tabular dump capability to kdb5_util

This new kdb5_util tabdump command provides a reporting-friendly
tabular dump format for the KDC database.  This format is also
suitable for importing into relational databases for queries.  Output
is in tab-separated or CSV format.  The user can select an output
table with a fixed number of columns.

Currently, this only provides tables for a subset of the available
principal data.  This includes making visible some data that is hidden
in hexadecimal strings in the tl_data of the ordinary dump format.

ticket: 8243

10 years agoAdd utility functions for tabular dumps
Tom Yu [Wed, 9 Sep 2015 18:05:24 +0000 (14:05 -0400)] 
Add utility functions for tabular dumps

These utility functions allow for tab-separated and comma-separated
(CSV) output.  These are primarily to support the tabular dump
capability for kdb5_util.  Additional output options can be added
later.

ticket: 8243 (new)
subjetct: Add tabular dump capability to kdb5_util

10 years agoFix missing success() in t_preauth.py
Greg Hudson [Thu, 10 Sep 2015 17:22:24 +0000 (13:22 -0400)] 
Fix missing success() in t_preauth.py

Add a success() call at the end to avoid displaying the debugging help
message on completion.

ticket: 8233

10 years agoImprove PKINIT OpenSSL error reporting 324/head
Greg Hudson [Mon, 7 Sep 2015 18:32:06 +0000 (14:32 -0400)] 
Improve PKINIT OpenSSL error reporting

When a non-trivial OpenSSL function fails during PKINIT processing,
try to ensure that the error message includes an indication of the
what PKINIT was doing and the reason for the first queued OpenSSL
error, and flush all queued OpenSSL errors to the trace log.  For
certificate verification failures, also include the higher-level error
from the cert store.  Add new helper functions oerr() and oerr_cert()
to minimize the amount of code needed to handle each error.

ticket: 8242 (new)

10 years agoCheck for null name_type in gss_display_name_ext
Solly Ross [Thu, 27 Aug 2015 19:55:35 +0000 (15:55 -0400)] 
Check for null name_type in gss_display_name_ext

It is possible for the input name's name_type to be GSS_C_NO_OID.
g_OID_equal() does not account for GSS_C_NO_OID, so we have to
manually check before use to prevent null pointer dereferences.

ticket: 8238 (new)
target_version: 1.13.3
tags: pullup

10 years agoRemove windows/gina
Thomas Sondergaard [Wed, 12 Aug 2015 19:29:27 +0000 (21:29 +0200)] 
Remove windows/gina

It has only received cosmetic and build fix changes since it was
introduced in 1997 and doesn't do anything useful.  The motivation for
removal at this point is to avoid spending time on build fixes for
newer tool chains like VS2015, and because GINA modules are only
supported by Windows versions prior to Windows Vista.

https://support.microsoft.com/en-us/kb/925520

ticket: 8231

10 years agoLink ucrt.lib and vcruntime.lib for VS2015
Thomas Sondergaard [Tue, 11 Aug 2015 06:52:20 +0000 (08:52 +0200)] 
Link ucrt.lib and vcruntime.lib for VS2015

The Visual C++ runtime libraries have been rearranged in VS2015:

http://blogs.msdn.com/b/vcblog/archive/2015/03/03/introducing-the-universal-crt.aspx

[ghudson@mit.edu: wrap a long line in lib/Makefile.in; edit commit
summary]

ticket: 8231

10 years agoPick MFC version based on VisualStudioVersion
Thomas Sondergaard [Tue, 11 Aug 2015 06:31:53 +0000 (08:31 +0200)] 
Pick MFC version based on VisualStudioVersion

Rather than hardcode support for VS2010 and VS2012, assume that the
right MFC version can be obtained by removing the "." in the
VisualStudioVersion variable.  This is true for VS2010, VS2012,
VS2013, and VS2015 at least.  If VisualStudioVersion it is not set,
fall back to using MFC100(D) as before.

ticket: 8231

10 years agoFix Windows regression in prof_file.c
Thomas Sondergaard [Wed, 12 Aug 2015 19:09:42 +0000 (21:09 +0200)] 
Fix Windows regression in prof_file.c

Commit 13bfcda8de68 (Add support for directories in profile paths)
introduced use of S_ISDIR, but this macro is not defined by Windows
SDK stat.h.

ticket: 8030

10 years agoAdd etype-info2 to MORE_PREAUTH_DATA_REQUIRED 316/head
Greg Hudson [Mon, 17 Aug 2015 22:26:36 +0000 (18:26 -0400)] 
Add etype-info2 to MORE_PREAUTH_DATA_REQUIRED

A multi-round-trip preauth mechanism may require key information, but
not for the initial message from the client.  To support optimistic
preauth for such mechanisms, make the KDC include etype-info2
information in a MORE_PREAUTH_DATA_REQUIRED error if the client didn't
include a PA-FX-COOKIE in its request.

Add optimistic preauth support to the test preauth module and to
etinfo.c, and add a test case to t_etype_info.py to verify that
etype-info2 is included in the optimistic multi-hop scenario.

ticket: 8234 (new)

10 years agoRefactor finish_check_padata() in KDC
Greg Hudson [Mon, 17 Aug 2015 21:41:22 +0000 (17:41 -0400)] 
Refactor finish_check_padata() in KDC

Use a helper function to filter the error codes from preauth modules.
Use a cleanup handler so that we aren't separately considering the
disposition of state and state->pa_e_data along different exit paths.

10 years agoDocument secure cookie format and callbacks 314/head
Greg Hudson [Sun, 16 Aug 2015 04:30:46 +0000 (00:30 -0400)] 
Document secure cookie format and callbacks

In kdcpreauth.rst, describe the set_cookie and get_cookie callbacks
and explain how to generate a KDC_ERR_MORE_PREAUTH_DATA_REQUIRED error
for multi-round-trip mechanisms.  Add a new file formats/cookie.rst
documenting the secure cookie format.

ticket: 8233

10 years agoAdd cookie tests
Greg Hudson [Sun, 16 Aug 2015 04:28:53 +0000 (00:28 -0400)] 
Add cookie tests

Add cookie and KDC_ERR_MORE_PREAUTH_DATA_REQUIRED functionality to the
test preauth plugins modules.  Create a new test script t_preauth.py
and move a test there from t_etype_info.py which is only marginally
related to etype-info.  Add a new test which exercises a multi-hop
preauth scenario and generates different cookies for each KDC error.

ticket: 8233

10 years agoAdd secure cookie support
Greg Hudson [Wed, 12 Aug 2015 15:58:17 +0000 (11:58 -0400)] 
Add secure cookie support

Remove the existing support for creating trivial cookies.  Add new
functions to fast_util.c for reading and generating secure cookies.
Add new kdcpreauth callbacks "get_cookie" and "set_cookie" to allow
preauth mechs to retrieve and set cookie values.

Based on a patch by Nathaniel McCallum.

ticket: 8233 (new)

10 years agoAdd ASN.1 encoder and decoder for secure cookie
Nathaniel McCallum [Sat, 2 May 2015 02:52:47 +0000 (22:52 -0400)] 
Add ASN.1 encoder and decoder for secure cookie

Add an internal type declaration, ASN.1 encoder and decoder functions,
an internal free function, and ASN.1 tests for krb5_secure_cookie.
The reference DER encoding was constructed by hand.

To save on space, we don't use context tags, and use an integer rather
than a KerberosTime for the timestamp.  The timestamp is stored in a
time_t; this requires a bugfix to the 64-bit case in
asn1_encode.c:store_int().

[ghudson@mit.edu: reference encoding; decode test; minor adustments to
free functions; added comments; alterations for space savings; commit
message]

10 years agoUpdate SPNEGO hintName value to current spec 319/head
Greg Hudson [Fri, 21 Aug 2015 22:48:06 +0000 (18:48 -0400)] 
Update SPNEGO hintName value to current spec

[MS-SPNG] currently specifies that the hintName field of NegHints
should contain "not_defined_in_RFC4178@please_ignore".  Heimdal
implements this behavior, but we instead try to include a display
name.  Implement the currently specified behavior, and add a test to
t_spnego.c to verify that the expected hint token is generated.

Further cleanup is possible; the negHints encoding is now constant (so
it does not need to be generated dynamically), and we could avoid
abusing the mechListMIC parameter of make_spnego_tokenInit_msg() to
transport it.

ticket: 8236 (new)

10 years agoCheck mech in gss_accept_sec_context w/ no cred 318/head
Greg Hudson [Thu, 20 Aug 2015 16:26:57 +0000 (12:26 -0400)] 
Check mech in gss_accept_sec_context w/ no cred

If no verifier_cred_handle is passed to gss_accept_sec_context(),
accept the same mechs as we would with a default acceptor
credential--that is, not those which assert the GSS_C_MA_DEPRECATED or
GSS_C_MA_NOT_DFLT_MECH attributes.

ticket: 8021

10 years agoAdjust SPNEGO Microsoft krb5 OID tests
Greg Hudson [Fri, 21 Aug 2015 16:26:17 +0000 (12:26 -0400)] 
Adjust SPNEGO Microsoft krb5 OID tests

In the Microsoft krb5 OID tests in t_spnego.c, use the proper krb5 OID
for the framing of the mech token, which better reflects the behavior
of Microsoft clients that use the wrong OID.  Move the test to a
separate function and run it twice, once with an acceptor cred and
once without.

Also add a comment noting that the reselection test no longer
exercises what it was designed to.  We can't really fix that until we
add gss_acquire_cred_with_cred() or similar.

10 years agoKeep valgrind happy after time_rec change
Simo Sorce [Fri, 21 Aug 2015 16:16:07 +0000 (12:16 -0400)] 
Keep valgrind happy after time_rec change

In gss_acquire_cred_from(), initialize initTimeOut and acceptTimeOut
so valgrind does not complain.  All these values are ignored if
time_rec is NULL, so not having those variables initialized is
harmless, but it is annoying to get noise in the valgrind output.

[ghudson@mit.edu: clarify commit message]

ticket: 8235

10 years agoResolve krb5 GSS creds if time_rec is requested
Simo Sorce [Mon, 17 Aug 2015 17:21:42 +0000 (13:21 -0400)] 
Resolve krb5 GSS creds if time_rec is requested

The code normally tries to defer credential acquisition to a later
time.  However, if the application requests the lifetime, the code
needs to resolve the credential and return the actual expiration time.
Returning 0 would cause the application to think credentials are
expired.

In the mechglue, pass through null time_rec pointers to the mech so
that the mech knows whether it was requested.  In SPNEGO, pass through
time_rec to the mech when acquiring creds, via a new parameter to
get_available_mechs().

[ghudson@mit.edu: minor style changes; edit and expand commit message]

ticket: 8235 (new)

10 years agoFix gss_inquire_name() name_is_MN result
Isaac Boukris [Wed, 12 Aug 2015 23:28:36 +0000 (02:28 +0300)] 
Fix gss_inquire_name() name_is_MN result

Currently name_is_MN is left uninitialized for non-mechanism names due
to a typo.

[ghudson@mit.edu: edited commit message]

ticket: 8232 (new)
target_version: 1.13.3
tags: pullup

10 years agoMake cross-realm S4U2Self work 305/head
Greg Hudson [Tue, 4 Aug 2015 00:45:17 +0000 (20:45 -0400)] 
Make cross-realm S4U2Self work

When sending a S4U2Self query to a foreign realm, send an enterprise
server principal so that the foreign KDC can identify the home realm
of the server principal.

To make this work, adjust the memory management of
krb5_get_self_cred_from_kdc().  s4u_creds is now a shallow copy of
in_creds which owns no memory.  A new variable eprinc owns the
enterprise form of the server principal, constructed using a new
helper function convert_to_enterprise().  Since we have to set the
server realm for KDC-REQ encoding to work, a new temporary variable
sprinc holds a shallow copy of *eprinc with the realm pointing to the
realm we are currently querying.

Based on a patch by Sumit Bose.

ticket: 7790

10 years agoFix new doxygen parameter lists 311/head
Greg Hudson [Tue, 11 Aug 2015 15:32:56 +0000 (11:32 -0400)] 
Fix new doxygen parameter lists

Use [out] instead of [in] for the output parameters of
krb5_c_prfplus() and krb5_c_derive_prfplus().  Also use "out" instead
of "output" for krb5_c_derive_prfplus() to match the parameter name in
the definition.

ticket: 8228