Prep for KfW conversion to ribbon toolbar

Upgrade classes: CWinApp->CWinAppEx, CFrameWnd->CFrameWndEx,
CStatusBar->CMFCStatusBar, CToolBar->CMFCToolBar.
Call AfxOleInit() from CLeashApp::InitInstance()
Do not call LoadBarState() (crashes)
or GetToolBarCtrl() (no longer exists)

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

(cherry picked from commit 7a53399722e129ed9c00f0c37d0c20c0387c829d)

ticket: 7244
status: resolved
Update leash icon and button graphics

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

[kaduk@mit.edu: While here, remove now-unused doghead icons.]

(cherry picked from commit 1f3db78954f891037120d45f9985470d6113421f)

ticket: 7245
status: resolved
MSVC-generated updates to support ribbon UI

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

[kaduk@mit.edu: manually tweak to remove gratuitious churn]

(cherry picked from commit bf4cd552cbd64b7ec07dd999602ace7196c9a5f6)

ticket: 7246
status: resolved
kfw "Initialize Ticket" -> "Get Ticket"

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

(cherry picked from commit d0b0d8e231b27ff9e27b4615fceee094b06cf60c)

ticket: 7247
status: resolved
kfw implement ribbon UI

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

(cherry picked from commit b32bad9b36671702d439ee1089ce0060280f213b)

ticket: 7248
status: resolved
Use ListView; add ViewColumn abstraction

Punting FormView since we really only need ListCtrl and using
ListView makes the header column and window resizing work.
The ViewColumn abstraction eliminates some copy/paste code blocks.
HDN_ITEMCHANGED tracks user changes to column widths.
Remove CTreeCtrl-related code.
Also remove some unused code that was generating warnings.

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

(cherry picked from commit 9bb69f8f328c763fb5f91e7a0198232eea0c2beb)

ticket: 7249
status: resolved
Only create toolbar when not using ribbon UI

When we do create the toolbar, dock it.

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

(cherry picked from commit 7fc182b343517278ba7c8dd5b338068c74d032c6)

ticket: 7250
status: resolved
kfw remove status bar

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

(cherry picked from commit 813ae03da33fc77e1fe0706a5fbbfd4070b79b7a)

ticket: 7251
status: resolved
kfw get tickets dialog tweaks

"Options" button -> "Advanced Settings"
"Renew Till" -> "Renew Until"
"Kerberos 5 Options" -> "Flag this ticket as"

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

(cherry picked from commit dbfd93ea15b12472e4612af928f8baabb2cda611)

ticket: 7252
status: resolved
kfw support for multiple identities

We need a sense of what the default identity is, then, with a way
to set it and list it.
The memory management model changes some, as well.
Use a bold font to indicate the current default identity in the
GUI; while here use an italic font for expired credentials.

In the process, rip out some krb4 remenants, and remove ancient
code conditional on the lack of KRB5_TC_NOTICKET.

Define USE_MESSAGE_BOX when building leash and use MessageBox().

[kaduk@mit.edu: adjust for style, flesh out commit message.]

(cherry picked from commit 9bc411e72fce5bed3ed00ae5b09f8c239309bae0)

ticket: 7253
status: resolved
Do not be over-restrictive in the presence of UAC

We used to explicitly check if a process was UAC-limited and deny all
access to the TGT in that case; however, this makes the MSLSA cache
effectively useless.
Do not try to outsmart UAC, and let it do its own checking -- this allows
UAC-limited access to the MSLSA ccache, which should mean read-write
access to service tickets, and write-only access to the TGT.

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

[kaduk@mit.edu: delete instead of comment out, move comment.]

(cherry picked from commit 8020c64554dd25a4f09df8a28dca924c6ecb5608)

ticket: 7254
status: resolved
Set fCachesTicket=TRUE when no credentials

It is not really clear this is correct, but neither was the
previous behavior.

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

(cherry picked from commit c654e9c7436cdd57cb61c0bd29b26c79e3675a01)

ticket: 7255
status: resolved
Tooltip text fixes

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

(cherry picked from commit 1fa7efce6f65550dde470700ac8abbc96d532c57)

ticket: 7256
status: resolved
Fix tooltips for ribbon

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

(cherry picked from commit 4325ac72975587bb04b6cd85d45b4c0d7743b2e3)

ticket: 7257
status: resolved
Remove ID_ABOUT, add ID_IMPORT_TICKETS

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

(cherry picked from commit 6a4d85a234d08492ce832b90c7a9687f6f120760)

ticket: 7258
status: resolved
Add defines for debug builds in win-pre.in

define DEBUG and _CRTDBG_MAP_ALLOC except for NODEBUG builds

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

(cherry picked from commit 768628d32f42027de9e591b2ef21d18bcb82f061)

ticket: 7259
status: resolved
Add leak tracking support to Leash

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

(cherry picked from commit 9d7ce5070d6d5f8390b941cdb617c670f1bf0989)

ticket: 7260
status: resolved
Update ribbon tooltip text

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

(cherry picked from commit 2db8f553df76e8086c0584e135701e584e83df87)

ticket: 7261
KfW GUI -- renew selected principals

The renew button should act on the current selection.
-auto-renew still only renews default ccache
-renew doesn't work for UAC-limited MSLSA

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

(cherry picked from commit ba46ce0c0024b58b3d1b2e79384ec6e422ef40dd)

ticket: 7262
status: resolved
Remove psapi.dll from installer

psapi.dll is a standard windows component; no need for kfw to redistribute.

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

(cherry picked from commit 2de056b925cc80982d9a1d1c6e9f7c81ad413d68)

ticket: 7263
status: resolved