Make doc/coding-style point to wiki page

The old doc/coding-style file was out of date; replace its content
with a pointer to the wiki page.

ticket: 7147 (new)
Export gss_mech_krb5_wrong from libgssapi_krb5

Although there are few legitimate reasons to use gss_mech_krb5_wrong,
it's declared in the public header and exported in the Windows DLL.
So export it from the Unix library as well.

ticket: 7148 (new)
target_version: 1.10.2
tags: pullup
Modified the Sphinx HTML page layout

1. The Feedback button is moved into the footer;
2. The default page/doc width are set to 960px;
Document "{keytab}" trace format specifier
Add support for "{ptype}" trace format specifier

Add the "{ptype}" trace format specifier, for principal name types.
Also document the new option in the "k5-trace.h" comments.

ticket: 7151
Add tests for trace.c formatting

This improves the previously minimal test coverage of "trace.c".

ticket: 7151
Convert DEBUG_REFERRALS to TRACE_* framework

The referrals debugging code under DEBUG_REFERRALS ceased building
correctly at some point.  Convert this debugging code to use the
tracing framework instead, including adding new trace macros to
k5-trace.h.

ticket: 7151
Fix S4U user identification in preauth case

In 1.10, encrypted timestamp became a built-in module instead of a
hardcoded padata handler.  This changed the behavior of
krb5_get_init_creds as invoked by s4u_identify_user such that
KRB5_PREAUTH_FAILED is returned instead of the gak function's error.
(Module failures are not treated as hard errors, while hardcoded
padata handler errors are.)  Accordingly, we should look for
KRB5_PREAUTH_FAILED in s4u_identify_user.

On a less harmful note, the gak function was returning a protocol
error code instead of a com_err code, and the caller was testing for a
different protocol error code (KDC_ERR_PREAUTH_REQUIRED) which could
never be returned by krb5_get_init_creds.  Clean up both of those by
returning KRB5_PREAUTH_FAILED from the gak function and testing for
that alone.

Reported by Michael Morony.

ticket: 7136
target_version: 1.10.2
tags: pullup
Fix TRACE_GET_CRED_VIA_TKT_EXT format string
Null pointer deref in kadmind [CVE-2012-1013]

The fix for #6626 could cause kadmind to dereference a null pointer if
a create-principal request contains no password but does contain the
KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix
name").  Only clients authorized to create principals can trigger the
bug.  Fix the bug by testing for a null password in check_1_6_dummy.

CVSSv2 vector: AV:N/AC:M/Au:S/C:N/I:N/A:P/E:H/RL:O/RC:C

[ghudson@mit.edu: Minor style change and commit message]

ticket: 7152
target_version: 1.10.2
tags: pullup
Add a copy of the BSD <sys/queue.h> as k5-queue.h

queue.h implements various types of linked lists as cpp macros,
without needing any library support.
Use a hash table in the KDC lookaside cache

Add a hash table to kdc/replay.c for fast lookup of incoming packets.
Continue to keep a time-ordered linked list of all entries for fast
expiry of stale entries.  The preprocessor constant
LOOKASIDE_HASH_SIZE can be used to change the size of the hash table.
Turn off use of a replay cache in krb5_verify_init_creds(). The library isn't attempting a replay attack on itself, so any detected replays are only going to be false-positives.
Add a -C flag to klist to have it show configuration entries. The output format could use some tweaking.
Remember all of the etype-info values from a preauth challenge, and instead of just using the first one, try to use each in succession until we stop getting KRB5_KT_NOTFOUND errors.
Add persistent-but-not-guaranteed state storage for preauth plugins using the ccache.

* Save the list of preauth mechanisms used in the gic_opt out_ccache
  as KRB5_CONF_PA_TYPES.
* Add preauth plugin callbacks for saving per-preauth-mech state blobs
  in the gic_opt out_ccache as KRB5_CONF_PA_CONFIG_DATA, bumping the
  version of that structure to 3, reusing the wire encoding for preauth
  data to store the per-mechanism state.
* Add get-init-creds options for setting the list of allowed/disallowed
  preauth mechanisms, so that a caller can either force the same set of
  mechanisms which was used previously (using a recovered
  KRB5_CONF_PA_TYPES value), or its own list.
* Add a get-init-creds option for passing in the per-preauth-mech state
  blob that we saved to the ccache as KRB5_CONF_PA_CONFIG_DATA.