summaryrefslogtreecommitdiffstats
path: root/src/windows/leash/KrbProperties.cpp
diff options
context:
space:
mode:
authorSam Hartman <hartmans@mit.edu>2011-09-28 21:02:14 +0000
committerSam Hartman <hartmans@mit.edu>2011-09-28 21:02:14 +0000
commitcaef99b21536d9e8c2f9c637fcf020b4e082db5d (patch)
treeb360ec8449876ea170691685cde758d9849fc8ef /src/windows/leash/KrbProperties.cpp
parent8481c14298a1886f63bec0d7cdfd800a86b4c127 (diff)
downloadkrb5-caef99b21536d9e8c2f9c637fcf020b4e082db5d.tar.gz
krb5-caef99b21536d9e8c2f9c637fcf020b4e082db5d.tar.xz
krb5-caef99b21536d9e8c2f9c637fcf020b4e082db5d.zip
Initial import of KFW 3.2.2 Leash32 code
Signed-off-by: Alexey Melnikov <aamelnikov@gmail.com> git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25278 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/windows/leash/KrbProperties.cpp')
-rw-r--r--src/windows/leash/KrbProperties.cpp102
1 files changed, 102 insertions, 0 deletions
diff --git a/src/windows/leash/KrbProperties.cpp b/src/windows/leash/KrbProperties.cpp
new file mode 100644
index 0000000000..d26987e4af
--- /dev/null
+++ b/src/windows/leash/KrbProperties.cpp
@@ -0,0 +1,102 @@
+// File: KrbProperties.cpp
+// By: Arthur David Leather
+// Created: 12/02/98
+// Copyright @1998 Massachusetts Institute of Technology - All rights reserved.
+// Description: CPP file for KrbProperties.h. Contains variables and functions
+// for Kerberos Four Properties
+//
+// History:
+//
+// MM/DD/YY Inits Description of Change
+// 02/01/98 ADL Original
+// **************************************************************************************
+
+
+#include "stdafx.h"
+#include "KrbProperties.h"
+#include "Krb4Properties.h"
+
+#include "Leash.h"
+#include "wshelper.h"
+#include "lglobals.h"
+#include "reminder.h"
+
+CHAR CKrbProperties::m_krbPath[MAX_PATH];
+CHAR CKrbProperties::m_krbrealmPath[MAX_PATH];
+BOOL CKrbProperties::KrbPropertiesOn;
+
+///////////////////////////////////////////////////////////////////////
+// CKrbProperties
+
+IMPLEMENT_DYNAMIC(CKrbProperties, CPropertySheet)
+CKrbProperties::CKrbProperties(UINT nIDCaption, CWnd* pParentWnd,
+ UINT iSelectPage)
+:CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
+{
+}
+
+CKrbProperties::CKrbProperties(LPCTSTR pszCaption, CWnd* pParentWnd,
+ UINT iSelectPage)
+:CPropertySheet(pszCaption, pParentWnd, iSelectPage)
+{
+ KrbPropertiesOn = FALSE;
+
+#ifdef COMMENT
+ // If this will not be fatal, then it does not need to be performed here.
+ if (CLeashApp::m_hKrb5DLL)
+ {
+ char *realm = NULL;
+ pkrb5_get_default_realm(CLeashApp::m_krbv5_context, &realm);
+
+ if (!realm)
+ {
+ MessageBox("CKrbProperties::Unable to determine default Kerberos REALM.\
+ \n Consult your Administrator!",
+ "Error", MB_OK);
+ // I don't think this is necessarily fatal. - jaltman
+ // return;
+ }
+ }
+#endif /* COMMENT */
+
+ CLeashApp::GetKrb4ConFile(m_krbPath,sizeof(m_krbPath));
+ CLeashApp::GetKrb4RealmFile(m_krbrealmPath,sizeof(m_krbrealmPath));
+
+
+ AddPage(&m_configOptions);
+ AddPage(&m_miscConfigOpt);
+
+ if (CLeashApp::m_hKrb4DLL && !CLeashApp::m_hKrb5DLL)
+ {
+ AddPage(&m_krb4RealmHostMaintenance);
+ AddPage(&m_krb4DomainRealmMaintenance);
+ }
+ else if (CLeashApp::m_hKrb5DLL)
+ {
+ AddPage(&m_realmHostMaintenance);
+ AddPage(&m_domainRealmMaintenance);
+ }
+
+ KrbPropertiesOn = TRUE;
+}
+
+CKrbProperties::~CKrbProperties()
+{
+ KrbPropertiesOn = FALSE;
+}
+
+void CKrbProperties::OnHelp()
+{
+ AfxGetApp()->WinHelp(HID_KERBEROS_PROPERTIES_COMMAND);
+}
+
+
+BEGIN_MESSAGE_MAP(CKrbProperties, CPropertySheet)
+ //{{AFX_MSG_MAP(CKrbProperties)
+ // NOTE - the ClassWizard will add and remove mapping macros here.
+ ON_COMMAND(ID_HELP, OnHelp)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+///////////////////////////////////////////////////////////////////////
+// CKrbProperties message handlers