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
Fix memory leak in gss_add_cred

The most recent commit to g_acquire_cred.c allocates an OID set to
pass to the mech, but never releases it.  Fix that.
Support kdc_timesync offsets in memory ccache

When using v4 file credentials caches, client clock skew offsets
obtained when running with the kdc_timesync option set are persisted in
the ccache. This allows the offsets to be used across separate contexts,
e.g. when obtaining credentials using krb5 interfaces and subsequently
importing those credentials for use in gssapi. This patch adds similar
support for memory credentials caches.

[ghudson@mit.edu: Minor style corrections.]

ticket: 7346 (new)
Add support for GSS_C_NT_COMPOSITE_EXPORT

ticket: 7347 (new)
Use separate components for shortcuts

Since the Start Menu and Desktop are different folders, we should
use different components for the shortcuts in those folders, given
that components operate at directory granularity.

Take the opportunity to use the newer style for installing shortcuts
and registry keys, and make the names more descriptive.

Increment the buildlevel to ensure new files are installed.

ticket: 7348 (new)
subject: Use more meaningfully named registry keys for shortcuts
queue: kfw
target_version: 1.10.4
tags: pullup