summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKevin Wasserman <kevin.wasserman@painless-security.com>2012-07-20 11:33:51 -0400
committerBen Kaduk <kaduk@mit.edu>2012-08-23 15:29:50 -0400
commitd5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2 (patch)
treec0d335da97eb5ac998ff7929dc593f3263a223a1 /src
parentfed20805254a9b49c7e75ba83de2a95348b21c3b (diff)
downloadkrb5-d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2.tar.gz
krb5-d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2.tar.xz
krb5-d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2.zip
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> ticket: 7241 (new) queue: kfw target_version: 1.10.4 tags: pullup
Diffstat (limited to 'src')
-rw-r--r--src/windows/leash/Leash.cpp13
-rw-r--r--src/windows/leash/Leash.h1
2 files changed, 11 insertions, 3 deletions
diff --git a/src/windows/leash/Leash.cpp b/src/windows/leash/Leash.cpp
index a4469972ea..0ee617ab57 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 43c7da78a5..13b14381a6 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();