krb5 commit: allow multiple Leash options; add -noribbon
Benjamin Kaduk
kaduk at MIT.EDU
Thu Aug 23 15:32:46 EDT 2012
https://github.com/krb5/krb5/commit/d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2
commit d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2
Author: Kevin Wasserman <kevin.wasserman at painless-security.com>
Date: Fri Jul 20 11:33:51 2012 -0400
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 at painless-security.com>
ticket: 7241 (new)
queue: kfw
target_version: 1.10.4
tags: pullup
src/windows/leash/Leash.cpp | 13 ++++++++++---
src/windows/leash/Leash.h | 1 +
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/windows/leash/Leash.cpp b/src/windows/leash/Leash.cpp
index a446997..0ee617a 100644
--- a/src/windows/leash/Leash.cpp
+++ b/src/windows/leash/Leash.cpp
@@ -68,6 +68,7 @@ HINSTANCE CLeashApp::m_hToolHelp32 = 0;
krb5_context CLeashApp::m_krbv5_context = 0;
profile_t CLeashApp::m_krbv5_profile = 0;
HINSTANCE CLeashApp::m_hKrbLSA = 0;
+int CLeashApp::m_useRibbon = TRUE;
/////////////////////////////////////////////////////////////////////////////
// CLeashApp
@@ -190,10 +191,12 @@ BOOL CLeashApp::InitInstance()
// Check for args (switches)
LPCTSTR exeFile = __targv[0];
- LPCTSTR optionParam = __targv[1];
+ for (int argi = 1; argi < __argc; argi++) {
+ LPCTSTR optionParam = __targv[argi];
+
+ if (!optionParam)
+ continue;
- if (optionParam)
- {
if (*optionParam == '-' || *optionParam == '/')
{
if (0 == stricmp(optionParam+1, "kinit") ||
@@ -312,6 +315,10 @@ BOOL CLeashApp::InitInstance()
{
CreateConsoleEcho();
}
+ else if (0 == stricmp(optionParam+1, "noribbon"))
+ {
+ m_useRibbon = FALSE;
+ }
else
{
MessageBox(hMsg,
diff --git a/src/windows/leash/Leash.h b/src/windows/leash/Leash.h
index 43c7da7..13b1438 100644
--- a/src/windows/leash/Leash.h
+++ b/src/windows/leash/Leash.h
@@ -119,6 +119,7 @@ public:
static krb5_context m_krbv5_context;
static profile_t m_krbv5_profile;
static HINSTANCE m_hKrbLSA;
+ static int m_useRibbon; // temporary while ribbon UI in dev
CLeashApp();
virtual ~CLeashApp();
More information about the cvs-krb5
mailing list