Remove preauth_sam2 from windows build

The source file preauth_sam2.c is not present on the krb5-1.10 branch,
so don't try building it.

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

[tlyu@mit.edu: clarify commit message]

ticket: 7277 (new)
version_fixed: 1.10.4
status: resolved
Fix version info for Leash.exe

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

(cherry picked from commit 25494149ab80332392db396fecaf3e1cea9c1cba)

ticket: 7235
status: resolved
Remove unused struct and switch_to stubs

Only one mslsa ccache is supported, so switch_to is not needed.
Likewise, struct krb5int_lcc_iterator is unneccesary.

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

(cherry picked from commit c19826ccddd0d712ca581d67cdcf317c36dfaa85)

ticket: 7236
version_fixed: 1.10.4
status: resolved
Fix leak in cci_os_ipc_thread_init()

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

(cherry picked from commit 1aac6932b77e7dd13a43f1d098b39313dc6474ae)

ticket: 7237
version_fixed: 1.10.4
status: resolved
Load additional krb5 and come_err funcs

Required for multiple identity management and for migration of code from
leashdll to leash proper.

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

(cherry picked from commit fd2d1932d262e6e342f795f9aaab2da62585fae2)

ticket: 7238
status: resolved
Change kfw destroy ticket confirmation message

OKCANCEL -> YESNO
Add MB_ICONEXCLAMATION
Change text

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

(cherry picked from commit 253b9a7f317d03c3392add07d3da2c4c4ecfc08f)

ticket: 7239
status: resolved
Target Windows Vista in leash/stdafx.h

Define WINVER and _WIN32_WINNT, to target Vista+ -- required for
ribbon ui.

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

(cherry picked from commit fed20805254a9b49c7e75ba83de2a95348b21c3b)

ticket: 7240
status: resolved
allow multiple Leash options; add -noribbon

Change option parsing to allow more than one option to be given.
Use the ribbon UI by default; -noribbon reverts to the old UI.

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

(cherry picked from commit d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2)

ticket: 7241
status: resolved
Leash UI menu updates

Eliminate Action menu:
 -move Ticket manipulation to File menu
 -eliminate "Reset Window Size/Pos", "Synchronize Time", and "Update Display"

Update Options menu:
 -eliminate all the "Properties" items:
	"Leash ", "Kerberos ", "Kerberos v4 ", "Kerberos v5 ", and "AFS"
	TODO: move functionality to advanced install/registry keys.

Update View menu:
 -add "Time Issued", "Renewable Until", "Flags", "Encryption Type",
   and "Valid Until"
 -remove "Large Icons", "Toolbar", "Status Bar", and "Debug Window"

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

(cherry picked from commit 3152a4c79e34b1954616a39e24c7d179cd08e0bb)

ticket: 7243
status: resolved
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