Avoid a crash when attempting to change password

In some cases we could keep stack garbage in a local pointer
variable until the cleanup at the end of the function wherein
krb5_free_context() would choke on the invalid non-NULL value.
Initialize to zero to avoid the issue (should be written as NULL
but stick to the prevailing style).

ticket: 7329 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Update KfW installer graphics

Replace dogheads with the new 'K'.

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

ticket: 7330 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Refresh ticket display immediately after renew

Set the CLeashApp::m_bUpdateDisplay flag to cause the display to
update on the next WM_IDLE message to the main thread.

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

ticket: 7331 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Fix window close issues

Stop filtering out SC_CLOSE. 'X' button works more reliably, also alt-F4.
Remove minimize box from style.

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

ticket: 7332 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Fix kfw message box titles

"MIT Kerberos", not "Leash32"

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

ticket: 7333 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Upgrade from KfW betas, too

Instead of using 3.9.9 as a conditional for the maximum version to
upgrade from, just use the current version.
This seems to pick up beta tags properly (so we can upgrade
from, e.g., beta 6 to beta 7 using the installer's upgrade tools),
and is future-proof.

Note that a 64-bit installer will not pick up an existing 32-bit
install (or vice versa), but there does not seem to be infrastructure
to deal with this situation easily.
Also, "downgrading" by running an older installer with a newer version
already installed will cause both versions to be simultaneously
installed; only do this if you know what you're doing.

ticket: 7334 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Upgrade 64-bit KfW installations

We use separate UpgradeCodes for 32- and 64-bit installers, so
we must check for both of them when seeing if we are upgrading an
old/existing installation.

ticket: 7335 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Add version info for ccapi dll

Without version info, this library would not get installed during
an upgrade scenario, causing the MIT Kerberos application to crash
on startup.

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

[kaduk@mit.edu: add motivation to commit message]

ticket: 7336 (new)
subject: Fix KfW crash on startup after upgrade
queue: kfw
target_version: 1.10.4
tags: pullup
Make finding 32-bit libs easier

Our 64-bit installer provides 32-bit libraries as well as 64-bit
libraries, but not all 32-bit applications (e.g., PuTTY, Pidgin)
are able to locate them in C:\Program Files\MIT\Kerberos .
Including an InstallDir key under the Wow6432Node tree lets them
work out-of-the-box; while here set all the registry keys in this
component in the compatibility tree, for consistency.

ticket: 7337 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Kill running processes on upgrades/uninstalls

The InstallValidate action of the windows installer will bring up
a dialog informing us that some currently running processes must
be terminated before installation may proceed, and offers to do so,
but does not actually kill the processes.  We have our own code to
kill running processes which did not execute, for two reasons:
it was sequenced after InstallValidate, and we did not have a current
list of processes to look for.

Add the right processes to look for and kill, and use our own
process-killing code since it actually works.

ticket: 7343 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Replace NIM with "MIT Kerberos" in installer text

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

ticket: 7338 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Improve error translation for CCAPIv3 routines

We can't mix the KRB5 and CC error constants; standardize on the CC ones
and translate appropriately.

ticket: 7339 (new)
target_version: 1.10.4
tags: pullup
Fix KfW thread-local storage allocation issues

Allocate thread-local storage on demand; don't rely on
the DLL_THREAD_ATTACH case in DllMain() since pre-existing
threads will never execute that code.

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

ticket: 7340 (new)
target_version: 1.10.4
tags: pullup
Clean out dead code from ccapi

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

ticket: 7237
target_version: 1.10.4
tags: pullup
Fix KfW startup shortcut installation

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

ticket: 7341 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
Do not emit debug printfs under NODEBUG

These printfs spew to the console when command-line utilities
such as 'klist' and 'aklog' are run, reducing usability.

These printfs can also cause application hangs.
On a multiprocessor machine, when PuTTY and the ccapiserver are
running on different CPUs, PuTTY appears to deadlock with three
concurrent threads inside cci_debug_printf().

ticket: 7342 (new)
target_version: 1.10.4
tags: pullup