]> git.ipfire.org Git - thirdparty/krb5.git/log
thirdparty/krb5.git
11 years agoUpdates for krb5-1.12.1 krb5-1.12.1-final
Tom Yu [Wed, 15 Jan 2014 23:24:20 +0000 (18:24 -0500)] 
Updates for krb5-1.12.1

11 years agomake update-po
Tom Yu [Thu, 16 Jan 2014 00:17:08 +0000 (19:17 -0500)] 
make update-po

11 years agoSort file list for msgfmt
Tom Yu [Wed, 15 Jan 2014 23:40:57 +0000 (18:40 -0500)] 
Sort file list for msgfmt

The list of input files for msgfmt was unsorted find output, resulting
in excessively large changes when running "make update-po".

(cherry picked from commit f131c5a4e266d07753a1f219d35c1bf82d98c0fb)

ticket: 7821
version_fixed: 1.12.1
status: resolved

11 years agomake depend
Tom Yu [Wed, 15 Jan 2014 23:07:09 +0000 (18:07 -0500)] 
make depend

11 years agoRemove mentions of krb5-send-pr
Tom Yu [Tue, 14 Jan 2014 20:43:35 +0000 (15:43 -0500)] 
Remove mentions of krb5-send-pr

Start the process of deprecating krb5-send-pr.  In practice, it causes
frustration for some users, and free-form email is good enough for
most bug reports.

Continue to install krb5-send-pr for now, but plan to remove it from
the tree in the future, probably replaced by a script that instructs
the user to send email manually.

(cherry picked from commit e972ce069dd45aad74e4f4853570ab27cfea05c2)

ticket: 5566
version_fixed: 1.12.1
status: resolved

11 years agoFix typo in sphinx manpage output
Tom Yu [Tue, 14 Jan 2014 21:13:44 +0000 (16:13 -0500)] 
Fix typo in sphinx manpage output

Some versions of the sphinx manpage writer have a typo in the name
'reStructuredText' written into the comments.  Add a sed command to
fix this.

(cherry picked from commit 4d30cc5d0838f6b5b3873046b0dfe72df2bdad11)

ticket: 7817
version_fixed: 1.12.1
status: resolved

11 years agoRestrict AES-NI support to ELF platforms for now
Greg Hudson [Fri, 10 Jan 2014 16:54:13 +0000 (11:54 -0500)] 
Restrict AES-NI support to ELF platforms for now

Since we explicitly specify the ELF object format when building
iaesx86.s or iaesx64.s, we need to restrict it to operating systems we
know to be ELF platforms.  Otherwise we can break the build on OS X,
which uses the Mach-O object format.

(cherry picked from commit 220066d9544a1fb1d6100f18f3ada7265799e97b)

ticket: 7812
version_fixed: 1.12.1
status: resolved

11 years agoAvoid text relocations in iaesx86.s
Tom Yu [Fri, 10 Jan 2014 20:04:32 +0000 (15:04 -0500)] 
Avoid text relocations in iaesx86.s

Use PC-relative addressing to avoid runtime text relocations on i386.

Adapted patch from Nalin Dahyabhai.

(cherry picked from commit 3847aa109e8ff3f2781d53315f81e8d29ee35892)

ticket: 7815
version_fixed: 1.12.1
status: resolved

11 years agoWork around Linux session keyring write behavior
Greg Hudson [Thu, 9 Jan 2014 05:18:44 +0000 (00:18 -0500)] 
Work around Linux session keyring write behavior

If the session keyring matches the user session keyring, write
explicitly to the user session keyring.  Otherwise the kernel might
create a new session keyring for the process, making the resulting
cache collection invisible to other processes.

(cherry picked from commit 0642afa544b00054048775d0b9796923bf018e22)

ticket: 7814
version_fixed: 1.12.1
status: resolved

11 years agoMark AESNI files as not needing executable stacks
Greg Hudson [Fri, 3 Jan 2014 18:50:48 +0000 (13:50 -0500)] 
Mark AESNI files as not needing executable stacks

Some Linux systems now come with facilities to mark the stack as
non-executable, making it more difficult to exploit buffer overrun
bugs.  For this to work, object files built from assembly need a
section added to note whether they require an executable stack.

Patch from Dhiru Kholia with comments added.  More information at:
https://bugzilla.redhat.com/show_bug.cgi?id=1045699
https://wiki.gentoo.org/wiki/Hardened/GNU_stack_quickstart

(cherry picked from commit c64e39c69a9a7ee32c00b0cf7918f6274a565544)

ticket: 7813
version_fixed: 1.12.1
status: resolved

11 years agoTest bogus KDC-REQs
Tom Yu [Wed, 8 Jan 2014 22:45:29 +0000 (17:45 -0500)] 
Test bogus KDC-REQs

Send encodings that are invalid KDC-REQs, but pass krb5_is_as_req()
and krb5_is_tgs_req(), to make sure that the KDC recovers correctly
from failures in decode_krb5_as_req() and decode_krb5_tgs_req().  Also
send an encoding that isn't a valid KDC-REQ.

(back ported from commit dae7693f8bf970d89d4c697f3d66a7d458281b93)

ticket: 7811
version_fixed: 1.12.1
status: resolved

11 years agoFix possible null deref in previous
Tom Yu [Wed, 1 Jan 2014 00:41:12 +0000 (19:41 -0500)] 
Fix possible null deref in previous

My rework of the do_tgs_req.c patch introduced a null deref if
decode_krb5_tgs_req() failed.

(cherry picked from commit 30589b2a1636de9f9b68591f0e546cb0fa21989f)

ticket: 7802
version_fixed: 1.12.1
status: resolved

11 years agoLog service princ in KDC more reliably
rbasch [Mon, 16 Dec 2013 15:54:41 +0000 (10:54 -0500)] 
Log service princ in KDC more reliably

Under some error conditions, the KDC would log "<unknown server>" for
the service principal because service principal information is not yet
available to the logging functions.  Set the appropriate variables
earlier.

do_as_req.c: After unparsing the client, immediately unparse the
server before searching for the client principal in the KDB.

do_tgs_req.c: Save a pointer to the client-requested service
principal, to make sure it gets logged if an error happens before
search_sprinc() successfully completes.

[tlyu@mit.edu: commit message; fix TGS to catch more error cases]

(cherry picked from commit f37067776f9431879769f3874fdab6120ba3f155)

ticket: 7802

11 years agoAvoid keyctl purge in keyring ccache tests
Greg Hudson [Fri, 20 Dec 2013 20:19:06 +0000 (15:19 -0500)] 
Avoid keyctl purge in keyring ccache tests

keyctl purge was added in keyutils 1.5 (released in March 2011).  Use
keyctl unlink to clean up keys instead, as it is more universal.

(cherry picked from commit 94da4584645475272abec6259d1666e34bd59594)

ticket: 7810
version_fixed: 1.12.1
status: resolved

11 years agoUse an extended com_err hook in klist
Greg Hudson [Fri, 20 Dec 2013 16:06:52 +0000 (11:06 -0500)] 
Use an extended com_err hook in klist

Add an adapted version of extended_com_err_fn from kinit to klist and
use it.  In do_ccache(), rely on the ccache type to set a reasonable
message if krb5_cc_set_flags() or krb5_cc_get_principal() fails due to
a nonexistent or unreadable ccache, and don't confuse the user with
the name of the ccache operation that failed.

(cherry picked from commit ae027dd69fc80cca549c9198d10afad389f30873)

ticket: 7809
version_fixed: 1.12.1
status: resolved

11 years agoSet an error message when keyring get_princ fails
Nalin Dahyabhai [Thu, 5 Dec 2013 18:54:09 +0000 (13:54 -0500)] 
Set an error message when keyring get_princ fails

When attempting to use a keyring cache that doesn't exist, set an error
message when we fail to read a principal name, as we do when we return
the same error code when using a file ccache.

[ghudson: removed unnecessary check for d->name nullity.]

(cherry picked from commit c25fc42e8eac7350209df61e4a7b9960d17755ca)

ticket: 7809

11 years agoTest for verto_set_flags in system libverto
Greg Hudson [Fri, 20 Dec 2013 04:47:22 +0000 (23:47 -0500)] 
Test for verto_set_flags in system libverto

libkrad relies on verto_set_flags, which was added to libverto in
release 0.2.4.  Make sure the system libverto has this function before
choosing it over the built-in version.

(cherry picked from commit a47d639770f32418c6e3fa8a0503019c9b376d2a)

ticket: 7808
version_fixed: 1.12.1
status: resolved

11 years agoFix typo that broke 'make clean'
Zhanna Tsitkov [Fri, 20 Dec 2013 16:06:19 +0000 (11:06 -0500)] 
Fix typo that broke 'make clean'

(cherry picked from commit 28633f186a943721b6948875ca85a4a34bc87da4)

ticket: 7807
version_fixed: 1.12.1
status: resolved

11 years agoAdd a test program for krb5_copy_context
Greg Hudson [Wed, 18 Dec 2013 18:08:25 +0000 (13:08 -0500)] 
Add a test program for krb5_copy_context

This test program isn't completely proof against the kind of mistakes
we've made with krb5_copy_context in the past, but it at least
exercises krb5_copy_context and can detect some kinds of bugs.

(cherry picked from commit b78c3c8c5025aec870d20472f80d4a652062f921)

ticket: 7807

11 years agoFix krb5_copy_context
Tom Yu [Wed, 8 Jan 2014 22:40:19 +0000 (17:40 -0500)] 
Fix krb5_copy_context

krb5_copy_context has been broken since 1.8 (it broke in r22456)
because k5_copy_etypes crashes on null enctype lists.  Subsequent
additions to the context structure were not reflected in
krb5_copy_context, creating double-free bugs.  Make k5_copy_etypes
handle null input and account for all new fields in krb5_copy_context.
Reported by Arran Cudbard-Bell.

(back ported from commit c452644d91d57d8b05ef396a029e34d0c7a48920)

ticket: 7807

11 years agoClarify klist -s documentation
Greg Hudson [Tue, 17 Dec 2013 21:56:41 +0000 (16:56 -0500)] 
Clarify klist -s documentation

The documentation for klist -s erroneously suggests that it doesn't
affect the exit status behavior and that it merely checks for the
existence of the ccache (only mentioning the expired ticket check at
the end).  Make it clearer and simpler, but avoid going into a lot of
detail about the nature of the expiration check.

(cherry picked from commit bf1d3c7b0b060be4b3e9e793b633c07e489ac76f)

ticket: 7806
version_fixed: 1.12.1
status: resolved

11 years agoFix GSS krb5 acceptor acquire_cred error handling
Greg Hudson [Mon, 16 Dec 2013 20:37:56 +0000 (15:37 -0500)] 
Fix GSS krb5 acceptor acquire_cred error handling

When acquiring acceptor creds with a specified name, if we fail to
open a replay cache, we leak the keytab handle.  If there is no
specified name and we discover that there is no content in the keytab,
we leak the keytab handle and return the wrong major code.  Memory
leak reported by Andrea Campi.

(cherry picked from commit decccbcb5075f8fbc28a535a9b337afc84a15dee)

ticket: 7805
version_fixed: 1.12.1
status: resolved

11 years agoFix memory leak in SPNEGO initiator
Simo Sorce [Fri, 13 Dec 2013 17:00:41 +0000 (12:00 -0500)] 
Fix memory leak in SPNEGO initiator

If we eliminate a mechanism from the initiator list because
gss_init_sec_context fails, free the memory for that mech OID before
removing it from the list.

[ghudson@mit.edu: clarified commit message]

(cherry picked from commit 1cda48a7ed4069cfc052f974ec3d76a9137c8c5a)

ticket: 7803
version_fixed: 1.12.1
status: resolved

11 years agoFix SPNEGO one-hop interop against old IIS
Greg Hudson [Tue, 10 Dec 2013 17:04:18 +0000 (12:04 -0500)] 
Fix SPNEGO one-hop interop against old IIS

IIS 6.0 and similar return a zero length reponse buffer in the last
SPNEGO packet when context initiation is performed without mutual
authentication.  In this case the underlying Kerberos mechanism has
already completed successfully on the first invocation, and SPNEGO
does not expect a mech response token in the answer.  If we get an
empty mech response token when the mech is complete during
negotiation, ignore it.

[ghudson@mit.edu: small code style and commit message changes]

(cherry picked from commit 37af638b742dbd642eb70092e4f7781c3f69d86d)

ticket: 7797
version_fixed: 1.12.1
status: resolved

11 years agoAvoid malloc(0) in SPNEGO get_input_token
Greg Hudson [Fri, 6 Dec 2013 23:56:56 +0000 (18:56 -0500)] 
Avoid malloc(0) in SPNEGO get_input_token

If we read a zero-length token in spnego_mech.c's get_input_token(),
set the value pointer to NULL instead of calling malloc(0).

(cherry picked from commit 13fd26e1863c79f616653f6a10a58c01f65fceff)

ticket: 7794
version_fixed: 1.12.1
status: resolved

11 years agoFix S4U2Self against non-FAST KDCs
Greg Hudson [Fri, 6 Dec 2013 01:32:05 +0000 (20:32 -0500)] 
Fix S4U2Self against non-FAST KDCs

When we added FAST TGS support in 1.11, we broke S4U2Self against KDCs
which don't support FAST, because the S4U2Self padata is only present
within the FAST request.  For now, duplicate that padata in the outer
request so that both FAST and non-FAST KDCs can see it.

(cherry picked from commit 55c3a5f69919c2b5435bac0cb48ab09b11be869c)

ticket: 7791
version_fixed: 1.12.1
status: resolved

11 years agoTest SPNEGO error message in t_s4u.py
Greg Hudson [Wed, 18 Dec 2013 21:03:16 +0000 (16:03 -0500)] 
Test SPNEGO error message in t_s4u.py

Now that #7045 is fixed, we can check for the correct error message
from t_s4u2proxy_krb5 with --spnego.

(cherry picked from commit 4faca53e3a8ee213d43da8998f6889e7bfd36248)

ticket: 7045
version_fixed: 1.12.1
status: resolved

11 years agoLet SPNEGO display mechanism errors
Simo Sorce [Tue, 17 Dec 2013 21:15:14 +0000 (16:15 -0500)] 
Let SPNEGO display mechanism errors

To avoid potential recursion we use a thread local variable that tells
us whether the ancestor was called via spnego_gss_display_name().  If
we detect recursion, we assume that we returned a com_err code like
ENOMEM and call error_message(); in the worst case that will result in
an "Unknown error" message.

[ghudson@mit.edu: Edited comments and commit message; removed an
unneeded line of code.]

(cherry picked from commit d160bc733a3dbeb6d84f4e175234ff18738d9f66)

ticket: 7045

11 years agoUpdate for krb5-1.12-postrelease
Tom Yu [Wed, 11 Dec 2013 03:08:12 +0000 (22:08 -0500)] 
Update for krb5-1.12-postrelease

11 years agoUpdates for krb5-1.12 krb5-1.12-final
Tom Yu [Tue, 10 Dec 2013 21:48:54 +0000 (16:48 -0500)] 
Updates for krb5-1.12

11 years agomake depend
Tom Yu [Tue, 10 Dec 2013 21:48:14 +0000 (16:48 -0500)] 
make depend

11 years agoUpdate man pages
Tom Yu [Tue, 10 Dec 2013 17:33:07 +0000 (12:33 -0500)] 
Update man pages

11 years agoBetter keysalt docs
Tom Yu [Mon, 9 Dec 2013 20:48:02 +0000 (15:48 -0500)] 
Better keysalt docs

Add a new section to kdc_conf.rst to describe keysalt lists, and
update other documentation to better distinguish enctype lists from
keysalt lists.

(cherry picked from commit 23a75649277afc24a9dfea199689e18129fa390c)

ticket: 7608
version_fixed: 1.12
status: resolved

11 years agoFix error message quotations in install_kdc.rst
Tom Yu [Tue, 3 Dec 2013 19:47:51 +0000 (14:47 -0500)] 
Fix error message quotations in install_kdc.rst

Some error messages that kprop could print were quoted incorrectly in
install_kdc.rst.

Also fix minor typos.

(cherry picked from commit 68d7fcf11553c29a2e0c28a57896fbce4a3ef611)

ticket: 7785
version_fixed: 1.12
status: resolved

11 years agoUpdate for krb5-1.12-beta2-postrelease
Tom Yu [Wed, 27 Nov 2013 21:28:37 +0000 (16:28 -0500)] 
Update for krb5-1.12-beta2-postrelease

11 years agoUpdates for krb5-1.12-beta2 krb5-1.12-beta2
Tom Yu [Wed, 27 Nov 2013 20:54:45 +0000 (15:54 -0500)] 
Updates for krb5-1.12-beta2

11 years agoUpdate man pages
Tom Yu [Wed, 27 Nov 2013 20:54:27 +0000 (15:54 -0500)] 
Update man pages

11 years agoBump libgssrpc minor version
Tom Yu [Wed, 27 Nov 2013 20:15:14 +0000 (15:15 -0500)] 
Bump libgssrpc minor version

Bump minor version for the new log_badauth2 interfaces.

(cherry picked from commit af5f5d63efe938c568a33bfb64ba5154982d6fb2)

ticket: 7770
status: resolved

11 years agoCorrectly log IPv6 addresses in kadmind
Greg Hudson [Mon, 25 Nov 2013 16:46:47 +0000 (11:46 -0500)] 
Correctly log IPv6 addresses in kadmind

Define client_addr() in server_stubs.c and use it consistently in that
file and ipropd_svc.c to get the client address from a transport
handle.  In it, call getpeername() on the client socket and use
inet_ntop() on the result, instead of using inet_ntoa() on the IPv4
socket address.  Provide a log_badauth2 callback to GSSRPC, so that we
get a transport handle instead of an IPv4 socket address, and use
client_addr() within it instead of inet_ntoa().

(cherry picked from commit 5384f45e728957da20ecf82d8cf567945a2bbf6e)

ticket: 7770
version_fixed: 1.12
status: resolved

11 years agoAdd new versions of log_badauth gssrpc callbacks
Greg Hudson [Mon, 25 Nov 2013 16:33:35 +0000 (11:33 -0500)] 
Add new versions of log_badauth gssrpc callbacks

libgssrpc supports two callbacks for gss_accept_sec_context failures
on servers (one for AUTH_GSS and one for AUTH_GSSAPI), which are
IPv4-specific.  Provide an alternate version which supplies the
transport handle instead of the address, so that we can get the
address via the file descriptor for TCP connections.

(cherry picked from commit 4c57a429760a3b3aa89938a13708742675f9548b)

ticket: 7770

11 years agoUpdate doc for current kdb5_util dump version
Tom Yu [Fri, 22 Nov 2013 23:23:52 +0000 (18:23 -0500)] 
Update doc for current kdb5_util dump version

kdb5_util.rst incorrectly describes the current default dump format
version as 6 when it should be 7.  Reported by Jeff D'Angelo.

(cherry picked from commit f0d7309a20665ac16a22856e0c8cffdb156f2d24)

ticket: 7777
version_fixed: 1.12
status: resolved

11 years agoEdit ccache_def.rst
Greg Hudson [Fri, 22 Nov 2013 21:53:35 +0000 (16:53 -0500)] 
Edit ccache_def.rst

Re-fill to 70 columns.  Replace non-ascii apostrophes with ASCII ones.
Edit wording slightly.

(cherry picked from commit 482869d393807d02668cf49ce74666d682cf77a6)

ticket: 7776
version_fixed: 1.12
status: resolved

11 years agoAdded a new ccache doc to "Kerberos V5 concepts"
Zhanna Tsitkov [Fri, 22 Nov 2013 19:02:57 +0000 (14:02 -0500)] 
Added a new ccache doc to "Kerberos V5 concepts"

This is to add a short introductory document on credential
caches to the Concepts section of Kerberos documentation.

(cherry picked from commit 251f94621328277044e3ae1a10ecd3ddfdda1dbb)

ticket: 7776

11 years agoImprove default ccache name API documentation
Greg Hudson [Thu, 21 Nov 2013 22:30:54 +0000 (17:30 -0500)] 
Improve default ccache name API documentation

Document the lifetime and caching behavior of the
krb5_cc_default_name() return value.  Document that
krb5_cc_set_default_name() may be called with NULL to purge the cached
value.  Correct a typo in the krb5_cc_default() summary and explicitly
reference krb5_cc_default_name().

(cherry picked from commit 3e5fe754b9f9742d1c9b1564633d4172277166db)

ticket: 7775
version_fixed: 1.12
status: resolved

11 years agoCorrect kadm5.acl back-reference documentation
Greg Hudson [Thu, 21 Nov 2013 21:22:48 +0000 (16:22 -0500)] 
Correct kadm5.acl back-reference documentation

In kadm5.acl, *N in the target principal name refers to the Nth
wildcard in the acting principal pattern, not the Nth component.

(cherry picked from commit 39bac22ed7f5ff583e92d082b34f0c5a2a3cad4c)

ticket: 7774
version_fixed: 1.12
status: resolved

11 years agoClarify lockout replication issues in docs
Greg Hudson [Mon, 18 Nov 2013 23:59:17 +0000 (18:59 -0500)] 
Clarify lockout replication issues in docs

In the "KDC replication and account lockout" section of lockout.rst,
specifically call out kprop and incremental propagation as the
mechanisms which do not replicate account lockout state, and add a
note that KDCs using LDAP may not be affected by that section's
concerns.

(cherry picked from commit 8eb9e6fe1b01faa875dcf91b618ad4cd7793438a)

ticket: 7773
version_fixed: 1.12
status: resolved

11 years agoRemove dangling --with-kdc-kdb-update references
Greg Hudson [Sun, 17 Nov 2013 17:37:09 +0000 (12:37 -0500)] 
Remove dangling --with-kdc-kdb-update references

This configure option hasn't done anything since 1.8, so don't mention
it in configure --help or the documentation.  The disable_last_success
and disable_lockout DB options are now used to turn it off.

(cherry picked from commit 0b3225d63f50d4e6297be5d751cae1d3368fcdb1)

ticket: 7771 (new)
version_fixed: 1.12
status: resolved

11 years agoAdd support to store time offsets in cc_keyring
Simo Sorce [Thu, 14 Nov 2013 22:23:59 +0000 (17:23 -0500)] 
Add support to store time offsets in cc_keyring

The code follows the same model used for the memory ccache type.  Time
offsets are stored in each credential cache in a special key just like
the principal name.  Legacy session caches do not store timestamps as
legacy code would fail when iterating over the new offset key.

[ghudson@mit.edu: minor formatting changes; note legacy session
exception in commit message]

(cherry picked from commit fb4817a32d0c369049e0868468dd2eb75487630d)

ticket: 7768
version_fixed: 1.12
status: resolved

11 years agoSet expiration time on keys and keyrings
Simo Sorce [Fri, 15 Nov 2013 21:36:05 +0000 (16:36 -0500)] 
Set expiration time on keys and keyrings

By setting the timeout based on the credetial's timeout we let the
system automatically cleanup expired credentials.

[ghudson@mit.edu: simplified code slightly]

(cherry picked from commit 29e60c5b7ac0980606971afc6fd6028bcf0c7f0f)

ticket: 7769
version_fixed: 1.12
status: resolved

11 years agoEnforce minimum PBKDF2 iteration count
Tom Yu [Fri, 15 Nov 2013 21:11:32 +0000 (16:11 -0500)] 
Enforce minimum PBKDF2 iteration count

Also add a testing interface to allow weak iteration counts.
(Published test vectors use weak iteration counts.)

(cherry picked from commit 7a7736a3ea321aeb4b281ae2712e27becb00d720)

ticket: 7465
version_fixed: 1.12
status: resolved

11 years agoCatch more strtol() failures when using KEYRINGs
Nalin Dahyabhai [Mon, 11 Nov 2013 18:10:08 +0000 (13:10 -0500)] 
Catch more strtol() failures when using KEYRINGs

When parsing what should be a UID while resolving a KEYRING ccache
name, don't just depend on strtol() to set errno when the residual
that we pass to it can't be parsed as a number.  In addition to
checking errno, pass in and check the value of an "endptr".

[ghudson@mit.edu: simplified slightly]

(cherry picked from commit 5ac159e220297a8f62dd5edcec6f9b988b0627ea)

ticket: 7764
version_fixed: 1.12
status: resolved

11 years agoUpdate for krb5-1.12-beta1-postrelease
Tom Yu [Fri, 8 Nov 2013 23:16:34 +0000 (18:16 -0500)] 
Update for krb5-1.12-beta1-postrelease

11 years agoUpdates for krb5-1.12-beta1 krb5-1.12-beta1
Tom Yu [Fri, 8 Nov 2013 17:36:33 +0000 (12:36 -0500)] 
Updates for krb5-1.12-beta1

11 years agoUpdate man pages
Tom Yu [Fri, 8 Nov 2013 18:23:27 +0000 (13:23 -0500)] 
Update man pages

11 years agoClarify realm and dbmodules configuration docs
Greg Hudson [Wed, 6 Nov 2013 18:33:04 +0000 (13:33 -0500)] 
Clarify realm and dbmodules configuration docs

In kdc_conf.rst, add examples showing how to configure a realm
parameter and a database parameter.  Document that the default DB
configuration section is the realm name, and use that in the example.
Move the db_module_dir description to the end of the [dbmodules]
documentation since it is rarely used and could confuse a reader about
the usual structure of the section.

(cherry picked from commit 689d769c10c53bd4fa40e82421c89b96cc86cbae)

ticket: 7759
version_fixed: 1.12
status: resolved

12 years agoMulti-realm KDC null deref [CVE-2013-1418]
Tom Yu [Mon, 4 Nov 2013 18:44:29 +0000 (13:44 -0500)] 
Multi-realm KDC null deref [CVE-2013-1418]

If a KDC serves multiple realms, certain requests can cause
setup_server_realm() to dereference a null pointer, crashing the KDC.

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

A related but more minor vulnerability requires authentication to
exploit, and is only present if a third-party KDC database module can
dereference a null pointer under certain conditions.

(cherry picked from commit 5d2d9a1abe46a2c1a8614d4672d08d9d30a5f8bf)

ticket: 7755
version_fixed: 1.12
status: resolved

12 years agoClarify kpropd standalone mode documentation
Greg Hudson [Wed, 30 Oct 2013 22:22:00 +0000 (18:22 -0400)] 
Clarify kpropd standalone mode documentation

The kpropd -S option is no longer needed to run kpropd in standalone
mode, but its functionality is not deprecated; standalone mode is
automatically activated when appropriate.  Clarify the kpropd
documentation on standalone mode to avoid giving the impression that
the mode is deprecated.

(cherry picked from commit bfec0671ca6df811453d46a2f47afc7168b980fc)

ticket: 7751
version_fixed: 1.12
status: resolved

12 years agoDocument master key rollover
Greg Hudson [Fri, 25 Oct 2013 16:30:48 +0000 (12:30 -0400)] 
Document master key rollover

Add a new section to database.rst documenting the procedure for
rolling the master key.

(cherry picked from commit e4b5d426a1e1e00367cc44a9619535ab71b20393)

ticket: 7732
version_fixed: 1.12
status: resolved

12 years agoImprove LDAP KDB initialization error messages
Greg Hudson [Mon, 28 Oct 2013 15:23:11 +0000 (11:23 -0400)] 
Improve LDAP KDB initialization error messages

In krb5_ldap_initialize, don't just blat the LDAP error into the
extended message; give an indication of which LDAP operation we were
trying to do and show what parameters we gave to it.

(Also, krb5_set_error_message can handle a null context argument, so
don't bother to check before calling.)

(cherry picked from commit 5a77bb85294f37d1dfa4c7faedfdfb0d7faaf8dc)

ticket: 7739
version_fixed: 1.12
status: resolved

12 years agoUse correct default principal for kadmin -n
Greg Hudson [Mon, 28 Oct 2013 17:33:05 +0000 (13:33 -0400)] 
Use correct default principal for kadmin -n

Use WELLKNOWN/ANONYMOUS@realm as the default principal for kadmin -n,
just like we do for kinit -n.

(cherry picked from commit a30a82abc72c2a1a8d25948fe9cd1af49eaf62ec)

ticket: 7741
version_fixed: 1.12
status: resolved

12 years agoAccept anonymous GSS names in kadmind
Greg Hudson [Mon, 28 Oct 2013 17:09:15 +0000 (13:09 -0400)] 
Accept anonymous GSS names in kadmind

The krb5 implementation of gss_display_name() reports the name type as
GSS_C_NT_ANONYMOUS if the client uses an anonymous principal.  Accept
this name type in gss_name_to_string and gss_to_krb5_name so that
anonymous kadmin can work.

Also improve code hygiene: call gss_name_to_string from
gss_to_krb5_name to reduce code repetition; use gss_oid_equal instead
of pointer comparison for name types; and don't assume that the
gss_display_name result buffer is zero-terminated.

(cherry picked from commit 664f0d779ddc0aaf54a118a98a21ce7d53d81e08)

ticket: 7740
version_fixed: 1.12
status: resolved

12 years agoFix decoding of mkey kvno in mkey_aux tl-data
Greg Hudson [Sun, 27 Oct 2013 00:17:10 +0000 (20:17 -0400)] 
Fix decoding of mkey kvno in mkey_aux tl-data

krb5_dbe_lookup_mkey_aux was decoding a 16-bit value directly into an
int, resulting in the wrong value on big-endian platforms.  The
consequences are mostly invisible because we ignore this field and try
all mkey_aux nodes in krb5_def_fetch_mkey_list.

(cherry picked from commit 64ec2941af1561ef06e7e885b2ffb65a675516ce)

ticket: 7738
version_fixed: 1.12
status: resolved

12 years agoReset key-generation parameters for each enctype
Ben Kaduk [Fri, 25 Oct 2013 18:00:29 +0000 (14:00 -0400)] 
Reset key-generation parameters for each enctype

In add_key_pwd, initialize s2k_params to NULL inside the loop over
enctypes instead of outside the loop, so that if the afs3 salt type
is used it does not contaminate later enctype/salt pairs in the list.

(cherry picked from commit 381cf01afb13ad28de0927de37f8e1d12749bf49)

ticket: 7733
version_fixed: 1.12
status: resolved

12 years agoCorrectly activate master keys in pre-1.7 KDBs
Greg Hudson [Thu, 24 Oct 2013 16:51:18 +0000 (12:51 -0400)] 
Correctly activate master keys in pre-1.7 KDBs

Starting with 1.7, databases are created with actkvno tl-data in the
K/M entry which gives the initial master key version an activation
time of 0.  A database created before 1.7 will not have this tl-data,
but we should behave in the same way as we do for a more recent
database.

Move the actkvno list synthesis code from krb5_dbe_fetch_act_key_list
to krb5_dbe_lookup_actkvno so it applies to kdb5_util commands as well
as libkadm5.  Synthesize the same list as we would have initialized
the KDB with, with an activation time of 0 for the earliest master
key.

(cherry picked from commit ec560fac83912abaa15fb158101c8174497081c5)

ticket: 7686
version_fixed: 1.12
status: resolved

12 years agoDon't cache active master key list in kadmind
Greg Hudson [Wed, 23 Oct 2013 22:56:20 +0000 (18:56 -0400)] 
Don't cache active master key list in kadmind

"kdb5_util use_mkey" should not require a kadmind restart to take
effect.  At the cost of fetching the K/M principal once for each key
change operation, make kadmind use the current active master key list
for each operation.

(cherry picked from commit 74c1420ea4dffc1105247e362decf608440751ae)

ticket: 7685
version_fixed: 1.12
status: resolved

12 years agoReload master keys to find active mkey if needed
Greg Hudson [Wed, 23 Oct 2013 22:56:14 +0000 (18:56 -0400)] 
Reload master keys to find active mkey if needed

Refactor krb5_dbe_find_act_mkey and make it reload the master key list
if it doesn't find a master key matching the active mkvno.

(cherry picked from commit f9d6353922393936ab7125d1f04e577857909a99)

ticket: 7685

12 years agoUse active master key in update_princ_encryption
Greg Hudson [Wed, 23 Oct 2013 15:55:19 +0000 (11:55 -0400)] 
Use active master key in update_princ_encryption

kdb5_util update_princ_encryption should update to the active master
key version, not the most recent.

(cherry picked from commit 4ccc18bc3ddc49d0fd0d2de00ec91c0fa44c53a8)

ticket: 6507
version_fixed: 1.12
status: resolved

12 years agoFix typos in kdb5_util master key command outputs
Greg Hudson [Mon, 21 Oct 2013 20:46:15 +0000 (16:46 -0400)] 
Fix typos in kdb5_util master key command outputs

kdb5_util list_mkeys was beginning lines with "KNVO" instead of
"KVNO".  kdb5_util purge_mkeys was displaying "follwing" instead of
"following" for both dry-run and normal cases.

(cherry picked from commit 7fee58ccadf1b61eec9a8c62f47dac43986e2ad1)

ticket: 7730
version_fixed: 1.12
status: resolved

12 years agoDiscuss cert expiry, no-key princs in PKINIT docs
Greg Hudson [Mon, 14 Oct 2013 22:14:00 +0000 (18:14 -0400)] 
Discuss cert expiry, no-key princs in PKINIT docs

In pkinit.rst, add "-days" options to the example commands for
creating certificate and briefly discuss the issue of expiration dates
so that the administrator thinks about it.  In troubleshoot.rst, add
an entry for the "certificate has expired" error which results from
PKINIT (when linked with OpenSSL) when a certificate has expired.

(cherry picked from commit f3977b6883f0172a2af9006522a1b35546f86749)

ticket: 7719
version_fixed: 1.12
status: resolved

12 years agoUse protocol error for PKINIT cert expiry
Greg Hudson [Mon, 14 Oct 2013 21:02:31 +0000 (17:02 -0400)] 
Use protocol error for PKINIT cert expiry

If we fail to create a cert chain in cms_signeddata_create(), return
KRB5KDC_ERR_PREAUTH_FAILED, which corresponds to a protocol code,
rather than KRB5_PREAUTH_FAILED, which doesn't.  This is also more
consistent with other error clauses in the same function.

(cherry picked from commit cd59782cb32b79e4001a86b0fe47af8b6275ef0c)

ticket: 7718
version_fixed: 1.12
status: resolved

12 years agoFix gss_accept_sec_context error tokens
Greg Hudson [Tue, 8 Oct 2013 21:07:34 +0000 (17:07 -0400)] 
Fix gss_accept_sec_context error tokens

A GSS krb5 error response contains a KRB-ERROR message, which is
required to have a server principal name, although few recipients
actually use it.  Starting in 1.3, accept_sec_context would fail to
encode the error in the GSS_C_NO_NAME/GSS_C_NO_CREDENTIAL case
(introduced by #1370) because cred->princ (which became
cred->name->princ in 1.8) is unset.

This problem got worse in 1.10 because we stopped setting the server
field in all cases due to the changes for #6855.  In 1.11 the problem
got worse again when a misguided change to the mechglue started
discarding output tokens when the mechanism returns an error; the
mechglue should only do so when it itself causes the error.

Fix krb5 gss_accept_sec_context by unconditionally decoding the AP-REQ
and using krb5_rd_req_decoded, and then using the requested ticket
server in the KRB-ERROR message.  Fix the mechglue
gss_accept_sec_context by reverting that part of commit
56feee187579905c9101b0cdbdd8c6a850adcfc9.  Add a test program which
artificially induces a replay cache failure (the easiest failure we
can produce which has an associated RFC 4120 error code) and checks
that this can be communicated back to the initiator via an error
token.

(cherry picked from commit c547bc16f2ab6ee66c076ef944c3fbac8a66f5d4)

ticket: 1445
version_fixed: 1.12
status: resolved

12 years agoAdd missing entries to tests/gssapi Makefile.in
Greg Hudson [Tue, 8 Oct 2013 16:35:51 +0000 (12:35 -0400)] 
Add missing entries to tests/gssapi Makefile.in

Some test sources files, objects, or programs were missing from SRCS,
OBJS, all, check-pytests, or clean.  t_oid was also out of order in a
couple of places.

(cherry picked from commit e547a515f837a7c59c0fe73d192a374593b70263)

ticket: 7722 (new)
version_fixed: 1.12
status: resolved

12 years agoChange KRB5KDC_ERR_NO_ACCEPTABLE_KDF to 100
Greg Hudson [Wed, 9 Oct 2013 17:37:17 +0000 (13:37 -0400)] 
Change KRB5KDC_ERR_NO_ACCEPTABLE_KDF to 100

draft-ietf-krb-wg-pkinit-alg-agility-07 specifies
KDC_ERR_NO_ACCEPTABLE_KDF as 82, but this value conflicts with
KRB_AP_ERR_PRINCIPAL_UNKNOWN from RFC 6111.  The former value has been
reassigned to 100 to fix the conflict.  Use the correct value.

We believe that this error won't crop up in practice for a long time
(when SHA-2 has been superceded by other hash algorithms and people
are desupporting it), by which time implementations will mostly have
been upgraded to use the new value.

(cherry picked from commit 2938851a5ec77ab68bcd1f5cfd07991c7ccabea6)

ticket: 7715
version_fixed: 1.12
status: resolved

12 years agoFix GSSAPI krb5 cred ccache import
Greg Hudson [Mon, 7 Oct 2013 13:51:56 +0000 (09:51 -0400)] 
Fix GSSAPI krb5 cred ccache import

json_to_ccache was incorrectly indexing the JSON array when restoring
a memory ccache.  Fix it.

Add test coverage for a multi-cred ccache by exporting/importing the
synthesized S4U2Proxy delegated cred in t_s4u2proxy_krb5.c; move
export_import_cred from t_export_cred.c to common.c to facilitate
this.  Make a note in t_export_cred.py that this case is covered in
t_s4u.py.

(cherry picked from commit 48dd01f29b893a958a64dcf6eb0b734e8463425b)

ticket: 7706
version_fixed: 1.12
status: resolved

12 years agoUpdate for krb5-1.12-alpha1-postrelease
Tom Yu [Fri, 11 Oct 2013 22:44:30 +0000 (18:44 -0400)] 
Update for krb5-1.12-alpha1-postrelease

12 years agoUpdates for krb5-1.12-alpha1 krb5-1.12-alpha1
Tom Yu [Fri, 11 Oct 2013 18:47:39 +0000 (14:47 -0400)] 
Updates for krb5-1.12-alpha1

12 years agoUpdate man pages
Tom Yu [Fri, 11 Oct 2013 19:48:50 +0000 (15:48 -0400)] 
Update man pages

12 years agomake depend
Tom Yu [Fri, 11 Oct 2013 19:11:35 +0000 (15:11 -0400)] 
make depend

12 years agoFix audit test module initialization
Greg Hudson [Sun, 6 Oct 2013 00:13:39 +0000 (20:13 -0400)] 
Fix audit test module initialization

Check if the fopen result is NULL, not whether it's less than zero.

(cherry picked from commit 5036f91e7b61a73a1ec2d39ce1cc6bbf60dd82ab)

ticket: 7713
version_fixed: 1.12
status: resolved

12 years agoKDC Audit infrastructure and plugin implementation
Zhanna Tsitkov [Sat, 20 Jul 2013 19:47:42 +0000 (15:47 -0400)] 
KDC Audit infrastructure and plugin implementation

Per project http://k5wiki.kerberos.org/wiki/Projects/Audit

The purpose of this project is to create an Audit infrastructure to monitor
security related events on the KDC.

The following events are targeted in the initial version:
- startup and shutdown of the KDC;
- AS_REQ and TGS_REQ exchanges.  This includes client address and port, KDC
  request and request ID, KDC reply, primary and derived ticket and their
  ticket IDs, second ticket ID, cross-realm referral, was ticket renewed and
  validated, local policy violation and protocol constraints, and KDC status
  message.

Ticket ID is introduced to allow to link tickets to their initial TGT at any
stage of the Kerberos exchange. For the purpose of this project it is a private
to KDC ticket ID: each successfully created ticket is hashed and recorded
into audit log. The administrators can correlate the primary and derived
ticket IDs after the fact.

Request ID is a randomly generated alpha-numeric string. Using this ID an
administrator can easily correlate multiple audit events related to a single
request. It should be informative both in cases when the request is sent to
multiple KDCs, or to the same KDC multiple times.

For the purpose of testing and demo of the Audit, the JSON based modules are
implemented: "test" and "simple" audit modules respectively.
The file plugins/audit/j_dict.h is a dictionary used in this implememtations.

The new Audit system is build-time enabled and run-time pluggable.

[kaduk@mit.edu: remove potential KDC crashes, minor reordering]

ticket: 7712
target_version: 1.12

12 years agoBe smarter about installing debug symbols
Ben Kaduk [Tue, 2 Jul 2013 20:45:59 +0000 (16:45 -0400)] 
Be smarter about installing debug symbols

We know when we're going to generate debug symbols, so only attempt
to install them when we know they should be present.

This eliminates the need to tell make to ignore errors from the shell
on these steps.

ticket: 7317
tags: pullup
target_version: 1.11.4

12 years agoUse better URL for kerberos documentation
Ben Kaduk [Tue, 2 Jul 2013 20:02:43 +0000 (16:02 -0400)] 
Use better URL for kerberos documentation

We have added a krb5-latest symlink for the latest stable release,
which is preferred to the krb5-current link (which points to a nightly
build of master).

ticket: 7673 (new)
ticket: 7493
queue: kfw
tags: pullup
target_version: 1.11.4

12 years agoRemove OldCC/rpc.cxx
Ben Kaduk [Mon, 1 Jul 2013 18:22:58 +0000 (14:22 -0400)] 
Remove OldCC/rpc.cxx

It is only linked on one place, which does not use any of the
exported routines, since an alternate implementation is linked first.

Remove the dead code and reduce the number of warnings omitted by
the build process.

12 years agoUse new-style variable expansion for light.exe
Ben Kaduk [Fri, 28 Jun 2013 22:08:21 +0000 (18:08 -0400)] 
Use new-style variable expansion for light.exe

With WiX 3.x, the preprocessor candle.exe expands variables using
$(); the linker light.exe expands localization and similar variables
using !(), though it accepts the $() form and prints a warning.

Switch to using the expected form to silence the warnings.

ticket: 7390
tags: pullup
target_version 1.11.4

12 years agoRemove unneeded variable enc_tkt_transited
Ben Kaduk [Fri, 4 Oct 2013 16:58:30 +0000 (12:58 -0400)] 
Remove unneeded variable enc_tkt_transited

There's no need to use an intermediate variable to initialize the
contents of enc_tkt_reply.transited.

Instead of setting each field to zero individually (and misspelling NULL),
use memset and set the one field which is being initialized to a nonzero
value explicitly.

12 years agoZero out stack variables in process_tgs_req()
Ben Kaduk [Thu, 3 Oct 2013 17:57:40 +0000 (13:57 -0400)] 
Zero out stack variables in process_tgs_req()

It is general good hygeine, preventing stack garbage from accidentally
leaking out into other consumers.

Don't bother with variables that are only used in a single place, but
do initialize the 'magic' field of nolrentry before it is used.

12 years agoUse constant-time comparisons for checksums
Greg Hudson [Wed, 2 Oct 2013 21:58:06 +0000 (17:58 -0400)] 
Use constant-time comparisons for checksums

12 years agoAdd an internal constant-time comparison function
Greg Hudson [Wed, 2 Oct 2013 21:55:28 +0000 (17:55 -0400)] 
Add an internal constant-time comparison function

k5_bcmp acts similarly to the deprecated Unix bcmp() function,
returning zero if two memory regions are equal and nonzero if they are
not.  It is implemented such that it should take the same amount of
time regardless of how many bytes are equal within the memory regions.

12 years agoConditionally test KEYRING ccache type
Greg Hudson [Sat, 28 Sep 2013 20:29:36 +0000 (16:29 -0400)] 
Conditionally test KEYRING ccache type

If the keyctl command is found and klist recognizes the KEYRING
credential cache type, then run several tests against keyring ccaches:
the collection test program in lib/krb5/ccache, the command-line
collection tests in tests/t_ccache.py, and some new tests to verify
legacy session cache behavior.  Much of the Python code in t_ccache.py
is moved into a new function named "collection_test" so we can run it
once against a DIR collection and once against a KEYRING collection.

Also: fix a memory leak in the collection test program; add a test for
iteration when the default cache name is a subsidiary name; use a
process keyring ccache in t_cc.c to avoid leaving behind empty
collections in the session keyring after each test run.

Adapted from a patch by simo@redhat.com.

ticket: 7711

12 years agoSupport new KEYRING anchor names and big_key keys
Greg Hudson [Sat, 28 Sep 2013 18:12:58 +0000 (14:12 -0400)] 
Support new KEYRING anchor names and big_key keys

Add support for the new anchor names persistent, user, and session.
The persistent anchor attempts to use a persistent keyring for a
specified uid, and falls back to the user keyring if it cannot; the
collection is stored at a fixed name within the persistent or user
keyring.  The session anchor uses the session keyring without legacy
semantics.

For all keyring types except legacy, attempt to use the "big_key" key
type on systems which have keyctl_get_persistent.  (They are
essentially unrelated features, but were added at the same time.)
This key type is stored in a kernel tmpfs and can store larger
tickets.

Since kernel commit 96b5c8fea6c0861621051290d705ec2e971963f1, new keys
created by add_key() only have VIEW permission for the user, and the
rest of the permissions require "possession," which means there is a
path from the thread, process, or session keyring to the key.  For the
user and persistent anchor types, we link the collection into the
process keyring to ensure that we have a possession rights on the
collection.

Adapted from a patch by simo@redhat.com.

ticket: 7711

12 years agoAdd collection support for KEYRING ccache type
Greg Hudson [Fri, 27 Sep 2013 22:45:29 +0000 (18:45 -0400)] 
Add collection support for KEYRING ccache type

Augment the KEYRING ccache type to support collection semantics
similar to those of the DIR type.  For keyrings with no anchor prefix,
maintain compatibility with old code by linking the initial primary
cache directly from the session keyring and naming it after the
collection.

See http://k5wiki.kerberos.org/wiki/Projects/Keyring_collection_cache
for more information.  Adapted from a patch by simo@redhat.com.

ticket: 7711 (new)

12 years agoClarify variable names in cc_keyring.c
Greg Hudson [Thu, 26 Sep 2013 16:23:23 +0000 (12:23 -0400)] 
Clarify variable names in cc_keyring.c

Consistently use "cache_name" and "cache_id" to talk about the name
and ID of the keyring containing the cache.  In krb5_krcc_resolve, use
"residual" for the residual string as we are no longer using it for
the cache keyring name, and use "anchor_id" for the keyring identified
by the prefix to make it clear that it is not the cache keyring.

Adapted from a patch by simo@redhat.com.

12 years agoDefer KEYRING key creation until initialize
Greg Hudson [Thu, 26 Sep 2013 15:40:13 +0000 (11:40 -0400)] 
Defer KEYRING key creation until initialize

If we resolve a KEYRING cache and the key does not exist, wait until
initialize time to create it, to avoid wasting precious kernel memory
on a cache which might not ever be created.  Properly error out if
store_cred or start_seq_get is called on an uninitialized cache, as we
would for a FILE cache.

Adapted from a patch by simo@redhat.com.

12 years agoAdd "which" function to k5test
Greg Hudson [Sat, 28 Sep 2013 18:56:22 +0000 (14:56 -0400)] 
Add "which" function to k5test

Add a utility function in k5test.py to look for a command in the
executable path, and remove it from t_kdb.py.

12 years agoImprove kinit output credential cache selection
Greg Hudson [Thu, 26 Sep 2013 09:38:46 +0000 (05:38 -0400)] 
Improve kinit output credential cache selection

If kinit chooses a client principal based on anything other than the
current default ccache's principal name, apply collection rules if
possible.  When applying collection rules, if we don't find an
existing cache for the client principal, use the default cache if it
is uninitialized, instead of creating a new one.

ticket: 7689

12 years agoSupport authoritative KDB check_transited methods
Greg Hudson [Wed, 25 Sep 2013 14:40:23 +0000 (10:40 -0400)] 
Support authoritative KDB check_transited methods

In kdc_check_transited_list, consult the KDB module first.  If it
succeeds, treat this as authoritative and do not use the core
transited mechanisms.  Modules can return KRB5_PLUGIN_NO_HANDLE to
fall back to core mechanisms.

ticket: 7709

12 years agoAdd ccache collection tests using API
Greg Hudson [Tue, 24 Sep 2013 16:20:17 +0000 (12:20 -0400)] 
Add ccache collection tests using API

Create a new test program in lib/krb5/ccache named t_cccol.c which
verifies collection semantics using the API.  Run it with an empty DIR
collection in t_cccol.py.

12 years agoFactor out krb5int_random_string() routine
Zhanna Tsitkov [Tue, 24 Sep 2013 14:13:26 +0000 (10:13 -0400)] 
Factor out krb5int_random_string() routine

Make krb5int_random_string() function available outside ccache code.
Move it into a separate file under lib/krb5/krb hierarchy.

12 years agoRe-factoring of service processing code in AS-REQ
Zhanna Tsitkov [Mon, 23 Sep 2013 21:25:13 +0000 (17:25 -0400)] 
Re-factoring of service processing code in AS-REQ

Take one step toward re-factoring of the KDC code:
keep the service principal related code in one place.

The code pattern was changed from:
   - unparse client -
   - unparse service -
   - db_get_ client -
   - client referrals -
   - db_get_ service -
   - validate policies etc
into:
   - unparse client -
   - db_get_ client -
   - client referrals -
   - unparse service -
   - db_get_ service -
   - validate policies etc

12 years agoErr codes in KRB_ERROR protocol messages are < 128
Zhanna Tsitkov [Thu, 19 Sep 2013 17:11:15 +0000 (13:11 -0400)] 
Err codes in KRB_ERROR protocol messages are < 128

If the error code is out of [0,127] range, assign it to KRB_ERR_GENERIC.
This fix is to correct the previous behavior with [0,128] range.
For more information see  krb5_err.et