Fix uninitialized variable bugs

The previous few commits introduced a couple of bugs where variables
could be used without being initialized.  Fix them.
WiX support for building with VS 2012

The merge modules need to reference VC110 paths.
Use a variable for VC100 versus VC110 so that we don't copy a lot
of boilerplate around.

ticket: 7666 (new)
queue: kfw
tags: pullup
target_version: 1.11.4
Require Windows Installer 4.5 or higher

As advised by the VC 11 merge modules.

Windows Installer 4.5 requires Windows Server 2008, Windows Vista, Windows XP
with Service Pack 2 (SP2) and later, or Windows Server 2003 with Service
Pack 1 (SP1) and later.  I believe we already enforce these restrictions
manually elsewhere, so this should not restrict our set of valid target
machines.

ticket: 7667 (new)
queue: kfw
tags: pullup
target_version: 1.11.4
Update windows README for VS2012/Windows SDK 8

The Windows SDK 8 dropped the command-line build environment, so
provide instructions for building with the Visual Studio (2012)
command-line build environment.

ticket: 7669 (new)
queue: kfw
tags: pullup
target_version: 1.11.4
Install ccselect_plugin.h

The ccselect pluggable interface was added in release 1.10, but we
neglected to install its header file.

ticket: 7671 (new)
target_version: 1.11.4
tags: pullup
Install localauth_plugin.h

The localauth pluggable interface was added on master in February, but
we neglected to install its header file.
Document dict_file format

Briefly describe the format of the kadmin dictionary file in
kdc_conf.rst.
KDC null deref due to referrals [CVE-2013-1417]

An authenticated remote client can cause a KDC to crash by making a
valid TGS-REQ to a KDC serving a realm with a single-component name.
The process_tgs_req() function dereferences a null pointer because an
unusual failure condition causes a helper function to return success.

While attempting to provide cross-realm referrals for host-based
service principals, the find_referral_tgs() function could return a
TGS principal for a zero-length realm name (indicating that the
hostname in the service principal has no known realm associated with
it).

Subsequently, the find_alternate_tgs() function would attempt to
construct a path to this empty-string realm, and return success along
with a null pointer in its output parameter.  This happens because
krb5_walk_realm_tree() returns a list of length one when it attempts
to construct a transit path between a single-component realm and the
empty-string realm.  This list causes a loop in find_alternate_tgs()
to iterate over zero elements, resulting in the unexpected output of a
null pointer, which process_tgs_req() proceeds to dereference because
there is no error condition.

Add an error condition to find_referral_tgs() when
krb5_get_host_realm() returns an empty realm name.  Also add an error
condition to find_alternate_tgs() to handle the length-one output from
krb5_walk_realm_tree().

The vulnerable configuration is not likely to arise in practice.
(Realm names that have a single component are likely to be test
realms.)  Releases prior to krb5-1.11 are not vulnerable.

Thanks to Sol Jerome for reporting this problem.

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

ticket: 7668 (new)
tags: pullup
target_version: 1.11.4
Add test case for CVE-2013-1417

ticket: 7670 (new)
tags: pullup
target_version: 1.11.4
Reference correct preauth header files

The clpreauth and kdcpreauth header files are split up for 1.12.  In
clpreauth.rst and kdcpreauth.rst, reference the correct header files
for each.
Mention old preauth header file in docs

The previous commit updated the header file references for 1.12 in the
clpreauth and kdcpreauth plugin interface documentation.  Add a
parenthetical so that the reference is still useful for prior
releases.
Add libkrad

The new library libkrad provides code for the parsing of RADIUS packets
as well as client implementation based around libverto.  This library
should be considered unstable.

ticket: 7678 (new)
Add server-side otp preauth plugin

This plugin implements the proposal for providing OTP support by
proxying requests to RADIUS. Details can be found inside the
provided documentation as well as on the project page.

http://k5wiki.kerberos.org/wiki/Projects/OTPOverRADIUS

ticket: 7678
Fix skip logic in t_otp.py

Reorder (and trim) the imports in t_otp.py so that k5test is pulled in
before we try to import pyrad and multiprocessing.  Otherwise
success() isn't defined in the case where we decide to skip the entire
test script.
Add k5calloc internal helper function

Letting calloc() do multiplication helps avoid overflow bugs, so
provide an internal k5calloc() helper which accepts both calloc
arguments, and reimplement k5alloc() in terms of it.
Use k5calloc instead of k5alloc where appropriate

Wherever we use k5alloc with a multiplication in the size parameter,,
use the new k5calloc helper function instead.
Fix minor type issues in krad tests

Use unsigned char for test encodings, since the initializers use
values greater than 127.
Use pipe instead of sigwait for krad tests

We've never used sigwait() before, and it has some problems on Solaris
10 (a nonconformant prototype by default, and experimentally it didn't
seem to work correctly with _POSIX_PTHREAD_SEMANTICS defined).  Use a
pipe instead.  Make t_daemon.py less chatty on stdout to avoid filling
the pipe buffer.
Don't leak the reply key's memory during PKINIT
Don't leak PKINIT CMS signed data certs and CRLs

The stacks of certificates and CRLs that we retrieve from CMS objects
include newly-owned references to the certificates and CRLs, so when we
go to free them, we need to remember to free those.

[ghudson@mit.edu: minor formatting change; removed unrelated style fix]